★ wanayoo — archive 1999 http://www.devshed.com/Server_Side/MySQL/Intro/comments.html/c2113/Nouvelle recherche | Portail wanayoo

Developer Shed
Thursday, 08.17.2000  
One of the fastest SQL (Structured Query Language) database servers currently on the market is the MySQL server, developed by <A HREF=/old?u=http%3A%2F%2Fwww.devshed.com%2FServer_Side%2FMySQL%2FIntro%2Fcomments.html%2Fc2113%2F%26quot%3Bhttp%3A%2Fwww.tcx.se%26quot%3B%26gt%3BT.c.X.&y=1999 DataKonsultAB</A>. MySQL, available for download at <A HREF=/old?u=http%3A%2F%2Fwww.devshed.com%2FServer_Side%2FMySQL%2FIntro%2Fcomments.html%2Fc2113%2F%26quot%3Bhttp%3A%2Fwww.mysql.com%26quot%3B%26gt%3Bhttp%3A%2Fwww.mysql.com%26lt%3B%2FA%26gt%3B%2C&y=1999 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.

HOME > SERVER SIDE > MYSQL > ARTICLE > COMMENTS    PHP SOURCE

Power Search
Free Newsletter:


Client Side
DHTML
Flash
Graphics
JavaScript
XML

Server Side
Administration
JServ
MySQL
Perl
PHP
Python
Roxen
Zend
Zope

Tools
HTML Editors
Graphic Editors
FTP Programs

Dev Talk
Forums
Mailing List
Book Samples
Brain Dump
Developer News
Feedback

ClipScripts
Add script
Edit script

Other Stuff
DevShed RDF
Propaganda!


Advertise
on DevShed
.
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:
Name:

Preview Comment.
Notify me of replies to this message.
Email:
Subject:
Tip: Put any source code between [code][/code] tags to increase readability


Visit the MySQL Forum!

New On DevShed:
• MySQL Developer Contests PostgreSQL Benchmarks
• PHP 101 (part 3) - Chocolate Fudge And Time Machines
• MaxSQL Announced
•  PHP 101 (Part 2) - Shakespeare's Rose
• PHP 101 (Part 1) - Secret Agent Man
• The Search For The Perfect Web Host
• Perl 101 (Part 5) - Sub-Zero Code
•  Submit Your News..

Hot Forum Topics:
• Credit Cards
• Backing-up in Netscape
• Want help from advanced PHP users
• making mysql timestamp look friendly
• display performance
• display performance


Adsmart Network ad
Copyright © 1997-2000 ngenuity. All rights reserved. Privacy Policy.