Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any Suggestion on Cyclic Entity Relationship?!
Message
From
03/04/1998 08:14:25
 
 
To
20/03/1998 10:33:58
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00085989
Message ID:
00089208
Views:
25
>I got most problem if mix all tables in one Form...
>Because there relationship are cyclic!!
>
>Tables:
>Customer(Cust_no, ... ) Carry Customer info
>Orders(Order_no, ...Cust_no[FK]... ) Carry Each order info
>Chooseitem(Order_no,item,....) OrdItems in meaning
>Item(ItemKey, ...) Carry item info
>Spprice(Cust_no,item, ...)
>* Special Price lookup Table for each Customer
>
>But last table link two tables and form a cyclic relationship....
>
>                          Spprice             Item
>              _____________\/   +              +
>             /                   \________     |
>            +                             /\  /|\
>     Customer +-------< Orders +-------< Chooseitem
>
>
>As VFP only make One work area, the link on finding will make a loop
>and many unexpectly, or empty or multiple will come out on join
>table....
>
>Currently I cut the Spprice Table into another Form to avoid this.
>But the problem may happen sometime... ~>.<~
>Any suggestion to me?!

I do not see any problems (in this example) though I have had a case with real problems. As far as I see, here a CUSTOMER has many ORDERS which have many CHOOSEITEMS; on the other hand a CUSTOMER also has many SPPRICE which relate to many CHOOSEITEMS -- there is no cycle, only a two-way relationship, which should pose no problems.

For an easy cycle example, consider the following: each PERSON works in an AREA, and an AREA has a PERSON which leads it. Imagine you want to add both a new AREA and its leader; which record do you add first?

The only solutions: (1) allow for AREAs without leaders, (2) allow por PERSONs which work in no area, or (3) update both tables simultaneously.
Previous
Reply
Map
View

Click here to load this message in the networking platform