List:General Discussion« Previous MessageNext Message »
From:Michael Dykman Date:March 24 2012 4:09am
Subject:Re: OT: SQL Question
View as plain text  
A many-to-many is generally best accomplished with a third linking
table which contains the ids of the 2 records being linked ie.

create table tflink (
flightid int;
teacherid int;
);

On Fri, Mar 23, 2012 at 10:28 PM, Mark Phillips
<mark@stripped> wrote:
> My question is not specific to MySQL, even though I am using a MySQL db for
> this project. I have a servlet/jsp/MySQL web site in production, and there
> are about 2,000 records in the flights table. One of the foreign keys is
> teacher_id. Up to this point, there is a one to many relationship between
> teacher_id and the data in the flights table. I need to change the data
> model to allow for a many to many relationship between teacher_id and the
> data in the flight table. What is the best way to do this?
>
> Thanks,
>
> Mark



-- 
 - michael dykman
 - mdykman@stripped

 May the Source be with you.
Thread
OT: SQL QuestionMark Phillips24 Mar
  • Re: OT: SQL QuestionMichael Dykman24 Mar
  • Re: OT: SQL QuestionDavid Turner25 Mar