Invoice & Invoice lines: How do you store customer address information?
Posted
by elviejo
on Stack Overflow
See other posts from Stack Overflow
or by elviejo
Published on 2010-06-02T00:21:52Z
Indexed on
2010/06/02
0:23 UTC
Read the original article
Hit count: 551
database-design
|invoices
Hi I'm developing an invoicing application.
So the general idea is to have two tables:
Invoice (ID, Date, CustomerAddress, CustomerState, CustomerCountry, VAT, Total); InvoiceLine (Invoice_ID, ID, Concept, Units, PricePerUnit, Total);
As you can see this basic design leads to a lot of repetiton of records where the client will have the same addrres, state and country.
So the alternative is to have an address table and then make a relationship Address<-Invoice.
However I think that an invoice is immutable document and should be stored just the way it was first made. Sometimes customers change their addresses, or states and if it was coming from an Address catalog that will change all the previously made invoices.
So What is your experience?
How is the customer address stored in an invoice? In the Invoice table? an Address Table? or something else?
Can you provide pointers to a book, article or document where this is discussed in further detail?
© Stack Overflow or respective owner