Hi, I am currently moving from a MS Access background to SQL. Found both the speed, access to stored procedures and userdefined functions amazing.
I have an invoicing system that stores; invoiceID, invoiceDate, address etc, goods total and a discountTotal, in a related table I have invoiceID, discountReason and discountValue, you can have more than one discount per invoice.
Do I need the discountTotal in the invoice table or should I simply sum the discountValues in the discounts table with the correct invoiceID ??
My question is what is the best practice and performance issues on SQL
Many thanks
Mark
I have an invoicing system that stores; invoiceID, invoiceDate, address etc, goods total and a discountTotal, in a related table I have invoiceID, discountReason and discountValue, you can have more than one discount per invoice.
Do I need the discountTotal in the invoice table or should I simply sum the discountValues in the discounts table with the correct invoiceID ??
My question is what is the best practice and performance issues on SQL
Many thanks
Mark
Comment