Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any Suggestion on Cyclic Entity Relationship?!
Message
 
To
26/03/1998 20:35:35
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00085989
Message ID:
00087962
Views:
65
>Of cos, Orderline should not have price column, hard to manage in security
>reason and also duplicate on price column.
>But the special price really need lookup on it! Who(Customer)+Which(Itemkey)!!
Justok,

This is where I really think you are incorrect. Spprice is used to match a customer to an itme and get the price for an order. Spprice may change over time as itme prices changes or customer buying patterns change, but an order that is set should never have its price changed. There fore the domain definition for the spprice price is;

The current price for a specific item for a specific customer.

While the domain definition for the price column in the orderlines would be;

The price of this item for this customer at the time of this order.

You can see that the domains are different, if that is so then they are NOT redundant data and if the above is true then trying to use the prices in spprice for creating a join to produce and order is flat relationally wrong. You might run a join that gets an order date 6 months ago, but you would be pulling todays price into it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform