Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interesting data structure problem
Message
De
21/05/2009 15:24:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/05/2009 15:13:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01401408
Message ID:
01401414
Vues:
53
>I am trying to figure out the best way to approach the creation of some new data. I have a table containing a list of about 1600 items. There is a committee of about 40 people who will be selecting the 10 best and the 10 worst of these items. Each committee member will vote independantly and we want to record their individual ballots. My problem is how to structure the ballot recordkeeping. I can see a couple of options.
>
>1. Create a separate ballot table for each user containing 3 columns, ItemID, Good, Bad. The finished table would contain 20 records containing the 10 best and the 10 worst according to the user.
>
>2. Create a single table for all the users where each user has a row and 10 Good columns and 10 Bad columns which contain the ItemID for the items they identified as good or bad.
>
>3. Variations on either of these where the Good/Bad data is kept in memo fields.
>
>Eventually we will want to summarize the voting and score the items according to the individual voting. And, this will all be done through a web interface.
>
>I'm not real excited with either solution and was wondering if there was another approach or thoughts regarding these two ideas. Constructive criticism appreciated.
>Thanks.

That is a typical many-to-many case. I would go with 3 columns (similar to one but comitteMemberID, itemId, isBest). Keep in mind SQL works best with this type of layout rather than 'cross tabbed' data.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform