Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referential integrity which tier?
Message
From
25/11/1999 16:16:47
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00288250
Message ID:
00295638
Views:
30
>>Intra-entity RI belongs in the Data Tier, Inter-entity RI belongs in the Business Logic Tier.
>
>I like this summary.
>
>>My question is, though, what do you call an "entity" - that is, where do you draw the line? For example, it seems clear that phone numbers are attributes of Employees, i.e. part of the same entity. However, Employees are part of a Company, which may be part of a Conglomerate, which is part of the NYSE, etc. etc.
>
>This is where the imprecision English trips us up.
>
>Employee is not part of the company. The relation is "works at" between the company and employee entity.

Hi Evan,

Yes, I can certainly see your point. Obviously we need extreme precision in defining relationships between objects. So what you're telling me is, if the relationship is "works for", then we're talking about 2 different entities.

This implies there is a "list" of relationships that are inter-entity, vs. those that are intra-entity. However, I'm bad at remembering lists - I'd rather derive one or a few rules that work in all cases.

How about this for a start - an object is an "attribute" if it has no meaning except in the context of its "parent/container" object e.g. "blue eyes" is meaningless by itself, but "Al Doman has blue eyes" implies that "blue eyes" is an attribute of the entity "Al Doman", not an entity in itself.

OTOH, an Employee has meaning outside the context of his employing Company (well, at least some of us do :-)). One more formal aspect of this particular example would be that an Employee can belong to more than one Organization; or even more formally, a Person entity can assume more than one Role in various Organizations e.g. Employee, UT Member, volunteer firefighter, etc. So therefore, Employees and Companies are separate entities - the Employee is not merely an attribute of the Company.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform