so they cant keep voting.
On Thu, 9 Sep 2004 07:38:38 -0400, Daniel Kessler <[EMAIL PROTECTED]> wrote:
> I'm doing a poll and determined this morning that I should use a
> relational DB. It's pretty basic, but it is my first one so I'd
> appreciate it if y'all could check out the code before I go down this
> path.
>
> <!-- a list of polls. Write to db once for each answer and then
> group on display ** is this right? **. Hopefully there's a way to get
> the first GROUP of an output, just in case there're multiple -->
>
> create table fsnep_polls (
> p_id NUMBER Primary Key,
> p_date_added date,
> p_date_last_used date,
> p_question VARCHAR2(400),
> p_answer NUMBER Foreign Key REFERENCES fsnep_pollAnswers(pA_id),
> p_status INT
> )
>
> CREATE SEQUENCE unique_poll_Num_s START WITH 1
>
> <!-- all possible answers for any poll available -->
>
> create table fsnep_pollAnswers (
> pA_id NUMBER Primary Key,
> pA_answer INT
> )
>
> CREATE SEQUENCE unique_pollAnswers_Num_s START WITH 1
>
> <!-- all votes with their poll and answer ID -->
>
> create table fsnep_pollVotes (
> pV_id NUMBER Primary Key,
> pV_date_added date,
> pV_poll_id NUMBER Foreign Key REFERENCES fsnep_polls(p_id),
> pV_poll_Answer INT Foreign Key REFERENCES fsnep_pollAnswers(pA_id)
> )
>
> CREATE SEQUENCE unique_pollVotes_Num_s START WITH 1
>
> Thanks and good morning!
>
> --
> Daniel Kessler
>
> Department of Public and Community Health
> University of Maryland
> Suite 2387 Valley Drive
> College Park, MD 20742-2611
> 301-405-2545 Phone
> www.phi.umd.edu
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

