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 |
|
mike123
Master Smack Fu Yak Hacker
1462 Posts |
Posted - 2002-02-25 : 19:07:56
|
I'm working a bit over my head here as far as my knowledge on design goes so all this help I really appreciate guysHeres my situation: I have to normalize the following table "Topstates". I think that there is alot of redundant data in there right now. I am going to populate this table every 24 hours and each row is going to be calculated by an aggregate function run on the main table "tblUserDetails". Select count(points) from tbluserdetails where genderid='1' and stateprovID='30' ..... etc I know I can eliminate the 2 "rating" columns but was wondering if I should ( and how ) break down the votes and points columns?. |
|
|
byrmol
Shed Building SQL Farmer
1591 Posts |
Posted - 2002-02-25 : 19:48:10
|
| Mike,You are asking us to normalise a table thats primary purpose is to store denormalised data..The correct answer is... DELETE IT!Since the data contained in the table can be derived from the tblUserDetails, there is no need to store the data else whereMaybe a better solution is to create a view....DavidMTomorrow is the same day as Today was the day before. |
 |
|
|
mike123
Master Smack Fu Yak Hacker
1462 Posts |
Posted - 2002-02-26 : 02:46:20
|
| thanks, I have no previuos experience with views. I read a bit about them tho.. interesting.... Ok so views are going to be a bit slower right? Let me be the devils advocate so I have a better understanding.My tbluserdetails has over 20k records and is growing fast, is it that bad to have a redundant table with only a few dozen recordsets? This table is a one shot deal it will never grow in size. Would this be a big nono? :)I was going to use application variables but a table gives me a slight bit more flexibility..cheers |
 |
|
|
byrmol
Shed Building SQL Farmer
1591 Posts |
Posted - 2002-02-26 : 02:55:50
|
| Mike,How often will you be using tblTopStates?You populate it every day, but what about its use?DavidMTomorrow is the same day as Today was the day before. |
 |
|
|
mike123
Master Smack Fu Yak Hacker
1462 Posts |
Posted - 2002-02-26 : 12:56:03
|
| It will be fewed a few thousand times per day, eventually more.Thanks,MIkeEdited by - mike123 on 02/26/2002 12:57:07 |
 |
|
|
|
|
|