In my database I have a table called Person with rows for ID and name and this works fine for the time being. Later on, after deployment, I realized I want a Person to also have an address (a single address per person). What is the best way to do this? Update the table with a new column for the address or create a new table Address for the address and link the two tables with a reference? Or, maybe, I should have one table Person, one table Address, and one table PersonAddressRelation with keys for both.
I know a bit about table normalization. My question is: how to build a set a tables if you predict they might change?
always, in each table, use a primary, auto increment key; and make sure that you have the best db structure from the start; why ? because once you start pomping info, the db tables will increase, and you dont know how big they will get; if lets say at 10 millions info's per table you need to add a new field, it's ok, it will take some time ... but if you try at 100 millions ... you are done ... game over ... so , do your best from the start and always identify each information by an unique id