Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A rather complicated database scenario

Status
Not open for further replies.

tektippee

IS-IT--Management
Jun 15, 2008
6
US
How do I handle this Mysql 4-table scenario:

SCHOOLS to STUDENTS is a 1 to many relationship.
AUCTIONS to PRIZES is also 1 to many.

Now, a school can participate in many auctions,
or one auction can be registered with many schools.
That is, SCHOOLS to AUCTIONS is a many to many realtionship.

Since STUDENTS to PRIZES can be 1 to many,
how do I handle this table setup - to query winners of prizes or auctions?
 
You'd want to 'normalize' it by having a middle man table "School_Auctions" that makes the relationships 1 to many instead of many to many.

You can use that table in your query to identify schools that are involved in the same auction or Auctions pertaining to the same school etc...








----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top