Results 1 to 4 of 4

Thread: Database Design

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    7

    Lightbulb

    Hi to all. I am trying to make a database but I cannot find out how
    to build it. The problem I have is that I must store several values
    according to a date and a Title. For example, suppose I will store a
    test for students. I will need as a primary key the date of the exam
    or the title of it. Then I will have to store all the questions for that
    exam, do you get the point? I do not know how to explain it... let me
    think... I mean, for each test (ie for each day) there will be many
    questions (only numbers, I will have the questions in another table) so
    how can I do to store a lot of questions for one day. Obviously, I want
    to store, for instance, 3 examns, so I wil have to store the questions
    for each exam. How can I achieve this? Do you understand?

    Thanks
    Things must be easy, but not easier than they are.

  2. #2
    Addicted Member
    Join Date
    Sep 1999
    Location
    Philippines
    Posts
    196

    Wink

    Ok. here...

    Reference tables...

    r_questions
    question_code char(3)
    question_desc varchar(100)

    Primary key on question_code

    r_titles
    title_code char(3)
    title_desc varchar(30)

    Primary key on title_code

    t_exam
    exam_date char(8) --'MMDDYYYY'
    title_code char(3) FK on r_titles
    question_code char(3) FK on r_questions

    Primary key on exam_date, title_code, question_code

  3. #3
    Lively Member
    Join Date
    Jul 1999
    Posts
    99
    i don't fully understand your question.. but here's what i think it is:

    Tables:

    tblExams
    Fields:
    ExamDate (PrimaryKey)

    tblQuestions
    Fields:
    ExamDate (ForeignKey)
    ExamNumber
    ExamQuestion
    ExamTitle




  4. #4
    Addicted Member
    Join Date
    Sep 2000
    Posts
    138
    Hi, Lechugas, I don¡¯t quite understand what you mean, either. Do you want to build:
    1. a database with two tables one of which is used to store the Exam Paper (the problem numbers) and the other the date and title; and
    2. another with one (or more, if the problems are classified) table to store the problems?

    Or:
    Only one database with all the above-mentioned tables?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width