Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: 1:1 relationships

Re: 1:1 relationships

From: Kresimir Fabijanic <kresimir_at_ozemail.com.au>
Date: Sun, 28 Jan 2001 17:19:22 +1100
Message-ID: <u6d77tob9lu441onkvnsfk8dohbjluam8m@4ax.com>

Dear all

Sometimes you implement 1:1 as a type specific - i.e. only certain type of employees will have a car (i.e. management, sales people, field opertaors) and each employee that has a car will have one car only.

This way you can implement cars as a sepaerate entity (I assume that is what you want), enabling change of car allocation, rather than storing Car attributes for all the Person. I also think this is not againts the third normal form.

I think that all you need is to either store Person's ID in Car table or Car ID in Person's table. In semantiacl sense - I would store Person's ID in Car as Car allocation would be a mandatory attribute of Car, while Car ID would be an optional attribute of Person - i.e. Car will be allocated to a person, while person does not have to have car allocated to her/him. You may still need to make it a non mandatory (nullable) field in an implemetation stage as person may resign, return a car, and car may not be immediatelly allocated to the successor.

HTH Kind Regards

Kresimir Fabijanic Received on Sun Jan 28 2001 - 00:19:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US