MySQL Forums
Forum List  »  Newbie

finding it hard to setup the relationships
Posted by: Brian Conlan
Date: January 11, 2009 08:46AM

I Have built a database which i need for a driving school directory.
As you could understand i need a many to many relation ship setup for a number of tables.

(business_type, category_type, contact_type, county, covered)

And then the table where the information is stored

I have a structure of questions but i must get answers 1 at a time

I have PK in all tables.
Is this the correct thing to do?

In the master_info table i have all PK fields duplicated, (business_type_id, category_type_id etc)
Is this correct when i want relationship?

In the fields (business_type_id etc) i store information as varchar, this is only for the relationship fields and i store the id (1, 2, 4, 7,)as the value in the field. So if i need to change a word it will change everywhere.
I submit values via an Array.
Is this the correct way to do this?

PK and FK
How are the parent and child relationship defined?

Please answer questions as i cant go on till this is sorted

Thank you

Edited 2 time(s). Last edit at 01/12/2009 06:58AM by Brian Conlan.

Options: ReplyQuote

Written By
finding it hard to setup the relationships
January 11, 2009 08:46AM
January 11, 2009 04:53PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.