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

Home -> Community -> Usenet -> c.d.o.misc -> An 1-to-1 relation: Is it normal?

An 1-to-1 relation: Is it normal?

From: Igor Sereda <sereda_at_spb.runnet.ru>
Date: 1998/03/30
Message-ID: <351FFB6C.FFBC9676@spb.runnet.ru>#1/1

Hello,

i am pretty confused by a sort of solution for the folling situation: I have a table containing personal information with primary key PERS_ID. There are few fields which are truly required and a lot others which would be null in most cases.
So there's a tempting idea to separate one table into two, so one would contain NOT NULL fields, indexed by primary key PERS_ID, and the other will be filled with all other fields, also indexed by primary key PERS_IS, also functioning ass a foreign key into the first table.

+++++
create table ONE (

PERS_ID 	number 	primary key,
f1		number	not null,

... <few fields>
);

create table TWO (

PERS_ID		number 	primary key references (ONE),
of1		number,

... <many fields>
);

+++++

So what we are getting is a one-to-one-or-zero relation. I feel there's something wrong in such a construction, but i cannot find out what exactly.

I will appreciate any advise,

Thank you,
Igor Sereda

--
Igor Sereda,
ITC, Russia
Received on Mon Mar 30 1998 - 00:00:00 CST

Original text of this message

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