>>Actually, we've found that keeping the stock is best done by totalling the transactions, completely ignoring the current stock. Any new transaction (or update to existing) will trigger this recalculation for the item involved, but the number in the stock table is pretty much read only. Turned out to be much cleaner than relying on any previously stored stock amount/price/quantity. But, OTOH, yes, ONE transaction table.
>
>Cleaner yes, but certainly I/O intensive to get the current stock. It depends on what fits best.
Getting the current stock is read operation, that's read from the stock table. It's the maintenance of it, which we did only by totalling the transactions. Any attempt to calculate it from current stock and the current transaction failed sooner or later. Pretty much any guy, whom I know to have tried that, also had to have a routine which would recalculate it from scratch from transactions alone.