Hi Igor,

>> So is there no better way to achieve this result?
>
> I couldn't think of one.

Hmm, OK. That's bad news for elegance, but I guess good news that I'm  
not going crazy and not seeing the obvious.

> It might help to denormalize a little by adding InvoiceId to Orders  
> table.

Unfortunately I can't do away with the intermediate "Moves" table,  
since the Order - Invoice relationship is many-to-many. That is,  
although each Order usually belongs to just one Invoice, sometimes one  
Order for may include products that are invoiced separately.

Surely it's a common requirement for a mail order business to track  
goods moving in and out, related to the Invoice and Order that each  
generates. Is there another approach?

Any other ideas welcome.

Thanks,
Tom
BareFeet

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to