Re: Examples for one-to-one associations?
Date: Mon, 07 Jun 2010 16:04:35 -0700
On Mon, 7 Jun 2010 11:05:44 -0700 (PDT), Nilone <reaanb_at_gmail.com> wrote:
>On Jun 5, 12:33 pm, Karsten Wutzke <kwut..._at_web.de> wrote:
>> can anyone give me some *real-world* examples for one-to-one
>Sometimes, corporations/agencies/governments require exclusive
>associations - a employee may not hold multiple positions or
>occupations, a professor may not chair more than one department, etc.
>In addition, in resource allocation problems, associations between
>resources at any particular time often excludes others of the same
>kind - we may only assign one parking space (or one driver) to one
>vehicle at a time, a teacher can only teach one subject to one class
>in one room, and so on.
1-1 is rather strict. On the course example, I had plenty of courses where the instructor taught the one course to one class in TWO rooms: one for theory and one for labs. I also had a few where the course was in different rooms at different times including one case where for one day of the week, the first hour was in one room and the next hour was in another building.
>> But are there any real one-to-one, loosely coupled associations?
>Your own examples with cars and engines illustrate that association,
>aggregation and composition conflate the relation with a mereological
>interpretation. The recent threads on IS-A and HAS-A in this group
>contain my own struggles with them. Instead, unique constraints and
>referential constraints on relations can express logical requirements
>precisely and sufficiently.
>> If so, who references who in a relationship between two equivalently
>> positioned/leveled entities?
>A one-to-one relationship exists equally between both. Why do you
>want to allocate ownership of the relationship to either entity?
I missed this at first myself. Presumably, there is a PK for both tables. Use that to access the two tables.
The answer to Karsten Wutzke's question is whichever is convenient. Taking a case of husband and wife, sometimes, the husband is the way to the couple, and sometimes, it is the wife.
Gene Wirchenko Received on Mon Jun 07 2010 - 18:04:35 CDT