On 9/16/11, Always Learning centos@u61.u22.net wrote:
Data is generally stored once. However because of legal requirements a customer's invoicing name and address and delivery address will be copied from the customer file and permanently stored in an invoice's header record. This means when the customer's record details are changed, the invoice continues to show the original name and address data valid at the time of creating that invoice.
Each table as a unique reference number.
A simple retrieval illustration ...
select * from p2 where p2ref = '$p1ref' ....
select p3surname, p3forename, p3add1, p3add2, p3add3, p3add4 (etc) from p3 where p3customer = '$e7customer' ....
select w1note from w1 where w1date = '$s5date' ....
This looks rather similar to what I am doing nowadays instead of massive queries with sub-selects. Glad to see I'm not alone in this direction. Hopefully this is a case of great minds think alike than fools seldom differs! :D