List:General Discussion« Previous MessageNext Message »
From:tj marlin Date:July 20 2001 5:05am
Subject:Re: Multiple Tables
View as plain text  
yes. the user table must reference the sysid. and the sysid must be unique 
in the computer system table.

some how  or another the input data must make the association.

you could also have a unique name in the computer system table. then the 
input data could say john doe uses computer xyz. the code that updates the 
user table can extract the sysid from the computer system table based on 
the name. then the user table is updated with the user name and the sysid.

hth



At 10:00 PM 7/19/01 -0500, you wrote:
>I have been looking through the documentation and searching through the 
>list for answers to this question, but have not yet figured out how to do so.
>
>Basically, I want to have multiple tables linked together.  I have seen a 
>lot of talk about foreign keys and that MySQL does not support them.  I am 
>not sure if foreign keys is the answer to my problem, but I could 
>definetly use some suggestions from the more experienced MySQL users.
>
>I want to have one table with information about computer systems such as 
>system name, os, and cpu speed which used an integer , called sysid, for 
>the primary key.  I also wanted to have a table which listed the people 
>who use a particular system.  I figured that I would need to have 
>the  user table reference the sysid so that I could make sure that the 
>right people were listed for the right system.
>
>I also wanted to avoid having to set the sysid manually when inserting 
>data into the user table.
>
>Please let me hear what you think the best solution would be.
>
>Thanks,
>
>Phil

_________________________________________________________________________________
tom marlin
tjmarlin@<nospam>surfree.com
My mind wanders a lot; sometimes it leaves completely.

Thread
Multiple Tablestemu-jin20 Jul
  • Re: Multiple Tablestj marlin20 Jul
Re: Multiple TablesPhilip Montgomery26 Jul
  • Re: Multiple TablesSinisa Milivojevic26 Jul
  • Re: Multiple TablesRafal Jank26 Jul
    • Re: Multiple TablesSinisa Milivojevic27 Jul