I have a database that stores thousands of bookmarks and the table BM_Table has following columns
Name Location
Since multiple same names has different location and multiple different names has same location.
Someone suggested me to normalize the relation to avoid this duplication of values.
But as you can see the no attribute Name or Location can be used as a primary key only candidate key is formed
So how can I normalize the table ?
Please explain in detail.
I suppose whoever suggested this to you meant for you to create three tables:
and use
tbl_name_locationto bind the other two together.This approach will create some ‘artificial’ ids which you will only use to relate one table to another. As long as you will save some space for multiple name and location entries, the question is: will this be beneficial to you? It’s hard to tell without knowing how you will use this database. Every request will require some joins after normalization so I suppose benchmarking and profiling would be a best way to determine if you gain anything by normalization.