Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One to many/many to many???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00216719
Message ID:
00217029
Vues:
23
If you have many chapters per manual and many sections per chapter, but each section has one and only one chapter then just use parent/child/grandchild tables. The PK (primary key) of the parent is the FK (foreign key) of the child. The PK of the child is the FK of the grandchild table. No 'linking' tables are necessary.

In your Click or DblClick method in your first grid, you'd run code that requeried the recordsource for the second grid. Parameterized views look like your best approach.

If you need a different organization, than please describe it more fully.
Thanks,
Barbara

>I need help on how to proceed with a database I'm building. The database will be for tracking Manuals that contain chapters and sections. I would like to show the chapters and sections in two grid views (one grid for chapters and then a grid for sections). Here is a simplified list of the fields in table(s)
>
>Manual_number(unique)
>
>chapter_number, chapter title
>
>section_number, section title
>
>What I want to do is display the chapters in a grid and allow the user to click on a row (chapter number) and then display the sections (section_number) for the selected chapter in a second grid below.
>
>I'm not sure how I should set this up. Should I create 3 tables? do I need a junction table? etc. Any help would be appreciated.
>
>Thanks
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform