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 |
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2002-03-27 : 12:16:13
|
I recently came across a table that a former co worker had created. The entire table is part of the primary key! Why would someone do this?Mike"..still no custom title"  |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-03-27 : 12:27:36
|
Because that former co-worker despises identity columns like the plague!It's called 5th Normal Form (possibly even Domain-Key Normal Form) Mike! And they all have to be unique anyway!You KNEW a looooooooooong time ago that my databases don't make sense, what's the big deal now??? |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-03-27 : 12:39:01
|
Because the table doesn't have any updateable attributes? It implies that the table is never updated which is a good thing.Is there anything on the table which shouldn't be part of the key?Sounds like you should post more about this structure and severly criticise the designer in the time honoured way .==========================================Cursors are useful if you don't know sql.Beer is not cold and it isn't fizzy. |
 |
|
|
LordXmen
Starting Member
1 Post |
Posted - 2002-03-27 : 16:20:57
|
| Horror. someone took uniqueness and compound key creation to a whole new levelSeriously, If you need to make the whole darn table a primary key, it is a BAD Design.Edited by - LordXmen on 03/27/2002 16:21:14 |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-03-27 : 16:42:47
|
| Ummm - would disagree with that.What about conjoint tables?user (id, description)role (id, description)userrole (user_id, role_id)PK for userrole would be whole table.==========================================Cursors are useful if you don't know sql.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|