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.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Database normalization issue

Author  Topic 

reachb4
Starting Member

1 Post

Posted - 2008-11-23 : 07:02:22
There will be n number of main categories (Coffee,Tea)
There will be n number of SubCategories under main categories (Cappuccino,Black,...etc)
There will be n number of products under each sub categories.

I created the following Tables
1) MainCategory
---------------
MainID(Primary),MainCategoryName
2) SubCategory
---------------
MainID,SubID(Primary),SubCategoryName

3) Products
---------------
ProductCode(Primary), ProductName,ProductPrice

4)ProductCategoryMap
----------------------
ProductCode,SubID,ID(Primary)



The (4)ProductCategoryMap links Product with the subcategory.Please tell me whether i am following 3nf. Also,let me know should ProductCategoryMap really need to exist to follow 3nf?

Thanks,
John.

cvraghu
Posting Yak Master

187 Posts

Posted - 2008-11-24 : 04:54:04
Ideally, SubCategory should not have MainID. Create a seperate table connecting Category and SubCategory.

Yes you need ProductCategoryMap.
Go to Top of Page
   

- Advertisement -