Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table with 2 parents?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Table with 2 parents?
Miscellaneous
Thread ID:
00408872
Message ID:
00408872
Views:
50
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!
Next
Reply
Map
View

Click here to load this message in the networking platform