#mysql - Fri 4 May 2007 between 03:13 and 03:28

Lathiatthey may be the same, but they may not
i guess you could argue you could do it another way
keep a history of all addresses in an addresses table
majikmanspacefrog, IF is the keyword
Lathiatand when they change it, create a new address
but still link to the old address from the invocies
spacefrogi suppose, but that would involve yet another table
ive normalized almost everything else
majikmanspacefrog, if a customer places 100 orders, thats a 100 copies of redundant data
spacefroghmm yes.
i'm not really sure if i should do this or not, but i guess it's one of those things that i might regret later
majikmanand i'm assuming you want your business to be successful such that everyone places 100+ orders =)
spacefrogSo an additional table for addresses, instead of the address in the clients table.
majikmanumm... client_addr invoice_addr
actually, you could just store them all in the same table
spacefrogno, clients, client_addr, invoice_addr.
Client links to clients_addr for the current client address.
majikmanwhy separate the addresses?
well, there are reasons why
but i'm betting you don't have any of those reasons
spacefrogi have a reason, which is what ive tried to explain. just a sec
majikmanoh, ok
spacefrogThe clients table have an AddressID which links to the Clients_addr table. When an order is processed, the DeliveryAddress becomes the current AddressID from the clients table. When the client changes their address, the AddressID changes to the new row in the Client_addr table.
Lathiatyeh thats what i said :)
spacefrog3 tables
not 2
probably best the changes are made now, before the site goes live.
majikmani still don't see why you need 3 tables
spacefrogBecause if the client changes their address, the addressID will change in the history of orders
the old rows
The 3rd table is the client him/herself
majikmaneh? why would you change the addressid in the invoice history if the client changes his current address?
nnnv(Off Topic =]) Does anyone here use the gillette deodorant body spray? how is it?
test34_it stinks, thats why I use it
nnnvit stinks?
nnnvwhy do you want something that stinks then

Page: 2 9 16 23 30 37 44 51 58