Click here to Skip to main content
15,905,323 members
Home / Discussions / Database
   

Database

 
QuestionUsing Crystal Reprot 10 within MS Access 2003 Pin
aftab8318-Jul-09 0:44
aftab8318-Jul-09 0:44 
AnswerRe: Using Crystal Reprot 10 within MS Access 2003 Pin
Jerry Hammond18-Jul-09 6:34
Jerry Hammond18-Jul-09 6:34 
GeneralRe: Using Crystal Reprot 10 within MS Access 2003 Pin
Mycroft Holmes18-Jul-09 15:23
professionalMycroft Holmes18-Jul-09 15:23 
QuestionStoring an array in a string or ...? Pin
Ehsan Baghaki17-Jul-09 21:36
Ehsan Baghaki17-Jul-09 21:36 
AnswerRe: Storing an array in a string or ...? Pin
Luc Pattyn18-Jul-09 0:08
sitebuilderLuc Pattyn18-Jul-09 0:08 
AnswerRe: Storing an array in a string or ...? Pin
riced18-Jul-09 0:29
riced18-Jul-09 0:29 
AnswerRe: Storing an array in a string or ...? Pin
Mycroft Holmes18-Jul-09 15:34
professionalMycroft Holmes18-Jul-09 15:34 
GeneralRe: Storing an array in a string or ...? Pin
Luc Pattyn18-Jul-09 18:03
sitebuilderLuc Pattyn18-Jul-09 18:03 
I don't mind a little pedant discussion, so here it goes.

For a simultaneous vote on N products the one-table approach takes N records of 4 fields each; the two-table approach takes N records of 3 fields each plus one record of 3 fields.

So the storage break-even would be where 4N=3N+3, hence N=3 (that is assuming IDs and dates have same cost). Therefore the 2-table approach would save space only for N>=3. How likely that is depends much on the correlation between products, and the kind of GUI used for voting.
Also selecting/searching/ordering the votes would take an extra join in the 2-table approach.

Having heard no real arguments in favor of 2-table (e.g. "we expect users to vote on an average of 5 products), I would call it over-normalized; to carry it somewhat further, one could come up with 3 tables, by listing all (product_id, vote) combinations in a third table. That would favor situations where some products always get high votes, and others always get low votes. However there are no facts to justify this approach.

Hence I'm with Einstein, who said something along the line "the simplest approach that covers it, is the right approach" or was it "you should simplify as much as possible, but no more". So I'll stick with the 1-table design.

Cheers.

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

modified on Sunday, July 19, 2009 12:23 AM

GeneralRe: Storing an array in a string or ...? Pin
Mycroft Holmes18-Jul-09 22:31
professionalMycroft Holmes18-Jul-09 22:31 
GeneralRe: Storing an array in a string or ...? Pin
Luc Pattyn19-Jul-09 2:24
sitebuilderLuc Pattyn19-Jul-09 2:24 
QuestionSQL High Availabilty Pin
Member 259952517-Jul-09 0:08
Member 259952517-Jul-09 0:08 
QuestionDISTINCT and MAX in SQL Query Pin
jishbalan16-Jul-09 20:34
jishbalan16-Jul-09 20:34 
AnswerRe: DISTINCT and MAX in SQL Query Pin
vica dianto16-Jul-09 20:49
vica dianto16-Jul-09 20:49 
AnswerRe: DISTINCT and MAX in SQL Query Pin
abcurl17-Jul-09 10:16
abcurl17-Jul-09 10:16 
GeneralRe: DISTINCT and MAX in SQL Query Pin
jishbalan19-Jul-09 18:27
jishbalan19-Jul-09 18:27 
QuestionChange the dataset name in Typed Dataset Pin
Neeraj Kr16-Jul-09 8:20
Neeraj Kr16-Jul-09 8:20 
AnswerRe: Change the dataset name in Typed Dataset Pin
Adam Maras16-Jul-09 8:23
Adam Maras16-Jul-09 8:23 
GeneralRe: Change the database name in Typed Dataset Pin
Neeraj Kr16-Jul-09 8:44
Neeraj Kr16-Jul-09 8:44 
QuestionPassing Arrays to Stored Proc Pin
ferronrsmith16-Jul-09 7:40
ferronrsmith16-Jul-09 7:40 
AnswerRe: Passing Arrays to Stored Proc Pin
Ashfield16-Jul-09 21:01
Ashfield16-Jul-09 21:01 
QuestionDatetime in sqlserver Pin
kurangu16-Jul-09 6:26
kurangu16-Jul-09 6:26 
AnswerRe: Datetime in sqlserver Pin
Neeraj Kr16-Jul-09 8:18
Neeraj Kr16-Jul-09 8:18 
AnswerRe: Datetime in sqlserver Pin
Ashfield16-Jul-09 21:03
Ashfield16-Jul-09 21:03 
GeneralRe: Datetime in sqlserver Pin
dan!sh 17-Jul-09 1:43
professional dan!sh 17-Jul-09 1:43 
GeneralRe: Datetime in sqlserver Pin
David Skelly17-Jul-09 2:05
David Skelly17-Jul-09 2:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.