Think of the tables in your database as linked sets.
I have a college database where school description as info associated
in three other tables, allowing one school description, one or more
contacts, requirements for one or more programs, and each program has
one or more degrees associated, in the last table.
In each table, the School name is replicated, serving as the primary
key in only the first. The primary key of the second is replicated in
the third, and so on. Only degrees have a number as the key, with
School name and the key of the previous table entered as fields, to
link everything together.
How you use tables will be defined by how your data needs to be
organized. Understanding your data needs is your first step.
On 5 Feb 2001, at 10:55, Chris Toth wrote:
>
>
> I'm having a extremely hard time grasping the concept of multiple
> tables. So far, I've been using just one table when designing a
> database. But now I have to design a database for a trouble-ticket
> system for our department. I've written out the design of the tables,
> but the part I don't understand is how the tables relate to each
> other. Do I need to use foreign keys? But if I do, I thought MySQL
> didn't support foreign keys?
>
> BTW, I've read most of the O'rielly mSQL/MySQL book and couldn't find
> my answers.
>
> Just in case it matters, I'm going to have one table full of faculty
> info, one of staff info, one for the trouble ticket itself, and
> possibly one for actions performed on the trouble ticket.
>
John Jensen
520 Goshawk Court
Bakersfield, CA 93309
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php