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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Subcategories = the physical impementation of

Author  Topic 

tribune
Posting Yak Master

105 Posts

Posted - 2004-02-27 : 01:27:13
I've got a table named "Units" which can be of the type "condo" "cabin" "hotel room" etc...

Each unit has several attributes in common but also distinct attributes. For example, a cabin can have "lofts", but condos does not. Each unit in this example exclusively relates to one subcategory.

Units
-----
UnitID (PK)
UnitType (FK)
Rooms
Baths

UnitTypes
---------
UnitType (FK)
Name

Subcategories:

UnitCabins
----------
UnitID (PK)
Lofts

UnitCondos
----------
UnitID (PK)
SpecialAttribute1
SpecialAttribute2

Is this good normalization design? Since each subcategory is unique, the subcategory primary keys should enforce uniqueness per-table, but how about per-unit? The UnitID may only appear in one of the subcategory tables. How should I handle this issue? If there are 5-6 subcategory tables how will this affect performance?

Thanks for any suggestions or thoughts















   

- Advertisement -