Have not done a similar project, ask a general idea.
Probably means that A,b,c is a three-layer agent, C from B to purchase, b from a stock, a has a total product inventory table.
My current design idea is to create an incoming table, each time the arrival of the data into the table, and then the data integration statistics when the time to traverse the entire stock table to calculate the required data?
But this design is equivalent to each call to the incoming data will need to be the entire stock table to calculate traverse, this will not be unreasonable?
is a small project, the amount of data is not particularly large.
Ask the experienced predecessors, how to design more reasonable, thank you ~ ~ ~
Reply to discussion (solution)
Invoicing system is the simulation material accounting business process system, has strict operating standards
Mainly is the design idea on the question, my above thought I thought is not quite reasonable.
This invoicing is just an add-on function, not the kind of special comprehensive invoicing system, just to achieve the most most of the main body on the line.
The entire stock table calculates what data is needed to be traversed every time? Can you not accumulate it?
Can look at the ERP invoicing documents.