Categories

wrinkle35

New member
Local time
Yesterday, 20:09
Joined
May 19, 2005
Messages
8
Okay here is my silly little issue, my boss decided to add sub categories, just when I get the database set-up.
Table 1
Category
Category_ID
Category_Name

Table 2
Sub_Category
SUb_Category_Name

Table 3
Contacts
Company
Contact
Adress
Ect Ect

I would like to be able to have each contact grouped by category, then sub category..but I am not sure how to get the relationship to work.
 
In your Subcategory, add a field for CategoryID. Each category may have multiple subcats, correct?

You have a one-to-many relationship between those two tables.

May a contact belong to more than one subcategory?

If yes...you need another table that would link the ContactID and SubCatID.

If no, add a subcat field to your Contact table. I determine a contact record's category through its subcat.

Make sense?
 
In your Subcategory, add a field for CategoryID. Each category may have multiple subcats, correct?

Yes

You have a one-to-many relationship between those two tables.
What does that mean? and how do I make it?

May a contact belong to more than one subcategory?

Yes

If yes...you need another table that would link the ContactID and SubCatID.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom