Home > database >  Across the table derived attributes, how to do?
Across the table derived attributes, how to do?

Time:11-17

The great god guide, learned to use in table computed columns can solve the problem of derived attributes in a table, but still don't understand to cross table derived properties,
For example there are three tables,
The product (the number of goods, name, price, discount)
The customer (member number, grade, membership discount)
Sale (commodity number, membership number, sales amount, amount payable, real pay amount)

Amount payable and the actually paid amount is derived attribute, the amount payable for the price by selling quantity, amount actually paid for the amount payable * member discount merchandise discount
Could you tell me how to realize the two derived attribute? How to initialize? How to update? Thank you very much!

CodePudding user response:

Should be on the front end program implementation, the database side.

CodePudding user response:

Don't build a view is ok? Road ten million, see the one you use
  • Related