Beginning MySQL Tutorial One of the fastest SQL (Structured Query Language) database servers currently on the market is the MySQL server, developed by T.c.X. DataKonsultAB. MySQL, available for download at http://www.mysql.com, offers the data base programmer with an array of options and capabilities rarely seen in other database servers. What's more, MySQL is free of charge for those wishing to use it for private and commercial use.
| Name: |
Greg |
| Subject: |
Database Design |
| Date: |
12-06-1999 02:34PM |
Hello,
I'm a new user of MySQL and I'm trying to design a relational database. I'm a little confused on how to I should create the tables so that they make the most sense.
Here's a summary: I'm creating a studyguide to assist people with algebra problems. I have (so far) three tables. Exam, Question, and Answer. The Exam Table holds the students name, id, password, and a list of random Questions (though this is the part I don't know how to implement). It's open-permission so that people may add rows and alter contents of their row. I'd also like for there to be a column that could hold the persons answers, and modify the contents of that Cell as the person answers each Question.
The Question Table holds a question string, an enumerated type that describes if it's Multiple Choice or Essay, and a list of Answer IDs (stored as a comma-separated string because I don't know how to implement this effectively either). This list contains all the possible choices for the Multiple Choice type Question including the correct one. The number of Answer choices is not constant and may vary from Question to Question.
The Answer Table merely stores an answer string (and of course a UNIQUE ID as do all the other Tables).
I'm used to object-oriented programming and because of that, I'd like to store an array as a Column in both the Exam and Question Tables. I don't think this is possible however so I'm wondering how to do this. Do I need to redesign my database? Are foreign keys the answer (even though it says that MySQL doesn't have functionality for them yet)?
Any help would be greatly appreciated.
Greg
|
Other posts in this thread:
| Top | | Database Design | Greg | 12-06-1999 02:34PM |
Reply to this post:
|
 |
Visit the MySQL Forum!
New On DevShed:
Hot Forum Topics:
|