Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is unique of record a business rule?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00856584
Message ID:
00856590
Views:
19
>HI,
>Is unique of record a business rule? Ex. Some customers may say, same item only can appear once in a invoice. Qty is the place to order more than one. However, the orther customers may say, same item can appear more than one time in a invoice, unless there are different price.
>
>So, should I place the duplication checking un business rules or UI?
>
>Thank you

John,

One of the differences between a file based table and a backend based table is that the backend needs a unique indicator for each record. A file based table uses the record pointer.

Generally, the solution should be in the business rules. Here you can use two unique values. The candidate key, which allows users to retrieve values based on, say, an abbreviation, and a surrogate key, which is generally an identity column which is used to link the various tables.

This technique allows for the change of the candidate key without affecting the relations within the tables.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform