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 |
Keitherj
Starting Member
1 Post |
Posted - 2008-12-23 : 01:11:19
|
Anyone smart....The table structures below is what I am trying to accomplish. Kind of a 1-Many from Cities to Groups and then a 1-many from Groups to GroupAttributes.tblCities:CityName varchar(50), PKtblGroups:CityName varchar(50), PK, FKGroupName varchar(50), PKtblGroupAttributes:CityName varchar(50), PK, FKGroupName varchar(50), PK, FKGroupAttributeName varchar(50), PK It seems as though every db design I see in SQL uses an identity for the PK. I do not want to do this becasue I do not want dups in my data. Could someone critique my design on how it should be done in SQL more efficiently? Maybe I do not need these composite keys? Brand new to SQL.ThanksKeitherj |
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2008-12-30 : 02:02:43
|
Based on what you are trying to accomplish - do you need "CityName" in the tblGroupAttributes table?You already have the relationship in in "tblGroups" .Jack Vamvas--------------------http://www.ITjobfeed.com |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-30 : 04:03:38
|
can one city be in more than 1 group? also why are you including cityname in groupattributes table? does attributename value differ for same group based on associated city value? |
|
|
|
|
|