Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Normalization question
Message
From
12/08/1999 11:52:13
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00253018
Message ID:
00253035
Views:
15
>I've been working on a larger project (for me) lately where there will ultimately be 150+ tables. On most of the other projects I've done, I haven't given much thought to normalization. I've looked back on them and most of them seem to be normalized anyways. On this project I've started really looking at how tables are related, etc.
>
> The one issue that has come up is how foreign keys are handled in the normalization process. I started noticing some of my tables (let's call it "Main") have a foreign key to another table ("middle")a foreign key to some third table. Is it bad form to include a direct foreign key in my "main" table? Or is this a case of "it depends"?

Please forgive if I'm stating obvious stuff to you...

This three table arrangement is usually employed to solve the many-to-many data relationship.

e.g. a student can take many classes and each class contains many students.

Because relational databases cannot handle this scenario directly, a third intermediate table is used - in this case it might be called StudentAttendsClass.

The three tables are then set up in a one-to-many-to-one relationship which gives the same outcome as the many-to-many required.

SO, in short, if this is the case, NO - don't link directly to the third table.
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Reply
Map
View

Click here to load this message in the networking platform