View Single Post

   
  #3 (permalink)  
Old 02-28-2008, 09:37 AM
guitarromantic@gmail.com
 
Posts: n/a
Default Re: Recording votes.

strawberry wrote:

> No, and no.
>
> I think I'd probably structure the database something like this
> (simplified obviously):
>
> voters(voter_id*,firstname)
> 1 'Guy'
> 2 'Gwyneth'
>
> records(record_id*,title)
> 1 'Like a Virgin'
> 2 'Hung Up'
> 3 'Clocks'
> 4 'Yellow'
>
> votes(voter_id*,record_id*,points)
> 1, 1, 3
> 1, 2, 2
> 1, 3, 1
> 2, 3, 3
> 2, 4, 2
> 2, 1, 1
>
> * = Primary Key
>
> >From this it should be easy to see which songs Guy and Gwyneth like

> best, which song is liked best overall (in this case a tie between
> 'Like a Virgin' and 'Clocks') and which song is nominated least often
> (a tie between 'Hung up' & 'Yellow').


Thank you, this is the solution that should've been obvious to me. I'm
on it!

Reply With Quote