Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ElCapitan
Starting Member
28 Posts |
Posted - 2009-03-19 : 07:02:33
|
Hi all,There are a few tables in my database that have up to 40 columns in. One in particular is the Product table (tblProduct). Should I split this table of 40 columns into two tables? The first table will be the master with the original unique autoincrement primary key (ProductID) and a couple of other columns whose information I use regularly like Price and linking columns like SupplierID and ManufacturerID. Then, in the second table I would have as the first column a unique ID called ProductID but does not autoincrement, rather it will match one instance of the ProductID in the 'master' Product table (tblProduct). Around 30ish other columns will be in the second table that describes the rest of the product information like DisplayOrder, ProductName, ProductDescription etc.This is just an example so a Product table might be a bad example in this case but the point I am making is should I keep tables as small as possible i.e. break up a bigger table into smaller tables where the columns are of similar grouping. If this is done, would queries be quicker or does it not have much relevance?I hope this makes sense and any help will be appreciated. |
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-03-19 : 07:05:49
|
Its called normalization. This should be a good read. http://en.wikipedia.org/wiki/Database_normalization |
|
|
|
|
|