Re: Newbie - restructuring to eliminate many-to-many
Date: Sat, 03 Mar 2001 00:12:08 GMT
Message-ID: <3aa035b2.28505158_at_news.gte.net>
This is like the simplest possible case of many-to-many. Just put an
"association table" in between with plan and partner fields. There is
nothing wrong with this, for gosh sakes, it's what relational
databases are all about!
You then use "joins" in select statements to look up what you want.
Table Plan
Table PlanPartner
Table Partner
(Also maybe subject/teacher/whatever tables, of course)
select plan.*, partner.*
* plankey
* plankey
* partnerkey
from plan
inner join planpartner
on planpartner.partnerkey=partner.partnerkey
where plan.subject = 'science'
or
partner.partnerkey="GEDallas"
etc.
J. Received on Sat Mar 03 2001 - 01:12:08 CET
