Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table with 2 parents?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Table with 2 parents?
Divers
Thread ID:
00408872
Message ID:
00408872
Vues:
52
How do I set up a table with 2 parents.

I have a contract table:

Contract
pk_id (I)


A child table that lists spaces for the contract (like "office", "warehouse", "retail", etc...)

ContSpace
pk_id (I)
fk_space (I)
fk_contract (I)

A child table that lists tasks for the contract (like "Space plan", "permit drawings", etc...)

ContTask
pk_id (I)
fk_task (I)
fk_contract (I)

Now I need a table to hold the fee minimum for each space/task combination.

ContFee
pk_id (I)
fk_task (I)
fk_space (I)
fk_contract (I)
Minimum (N)
Fee (C)

Is that the correct way to do it? I seems like a PITA to keep the ContFee table matching the 2 parent tables. Everytime a record is added to the ContSpace table, a record for each of the ContTask records need to be added to the ContFee table.
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform