Re: Single item inventory?



Good point. But then the design would just become more like a normal
DB.

The more I think about it, the more I think I should make separate
"sale" and "purchase" tables and just make them union-compatible. Then
in the query, just do the math to adjust the sales to be "plus cash,
minus fuel" and the purchases to be the reverse. Then I need to just
add a field for fuel type, because as you say, diesel fuel and airplane
fuel are not interchangeable.

Bear with me - I'm still teasing the complexity of this thing out. So
this represents my somewhat simple understanding of the whole thing.

Maybe I'm better off splitting the two tables and then I can have
normal "Supplier" and "Customer" tables and their related "Purchase
Order" and "Invoice" tables. Then everything follows a pretty much
standard design.

Purchased [X] qty/volume of [product] on [date] from [vendor] at
[price]

Sold [X] qty/volume of [product] on [date] to [Customer] at [price]

Then as long as my tables are reasonably union compatible, I can get a
normal running sum.

Thanks for the input!
Pieter

.


Quantcast