|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Relationships ??
Hi all,
I'm trying to learn to build a database and have a question: In each record will be a field "category" each category should have sub categories. What is the most efficient means of doing this? Should I have seperate tables for category and sub category and relate these to the main table? I'm having trouble getting my mind around this relationship thing. I would be thankful for any help. Carl |
|
#2
|
|||
|
|||
|
YES
Main Table: CategoryID(FK From Category), SubCategoryID(FK From SubCategory) Category Table: CategoryID(PK) SubCategory Table: SubCategoryID(PK), CategoryID(FK From Category) Depending on how you use category you may or may not need it in the Main table. I typically include it S- |
|
#3
|
|||
|
|||
|
(FK), (PK) ????
|
|
#4
|
|||
|
|||
|
Primary Key (the unique identifier for that record)
Foreign Key (the link to the primary information, established through relationships. Hence the term "relational database") S- |
|
#5
|
|||
|
|||
|
S,
Thanks so much for the help. I'm going to try this tonight. Carl |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Relationships ?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|