Hey guys
i d like to pick your brains about something..
Suppose i want to create a database for storing, lets say computer stuff, parts, hardware, peripherals etc....

Which way would be better?

Create a Basictable with all the common fields (like ProductName, Price,Guarantee....)
and then create multiple other tables with each categorie's specific fields and binding those tables with the Basictable with one-to-one relationships..

Create just one table with all possible fields and keep Null values in the fields that are not needed for specific categories..

or maybe a third way.. ?

Thanx in advance..

6 Years
Discussion Span
Last Post by AdeelM

zuko, I agree with debasisdas. To begin with, I would strong recommend against your approach #2 for many reasons. It is simply better practice and better database design to keep your data correctly "normalized". What that means is that instead of having one enormous table with every field, you should split the structure up into various tables that hold similarly categorized records, and that have correct foreign key associations. This way no data ever needs to be repeated either, which saves actual disk space, and also saves from having to update spread across multiple records unnecessarily, which will increase your performance.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.