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 -> Re: An 1-to-1 relation: Is it normal?

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

From: jeffd <jeffd_at_allensysgroup.com>
Date: 1998/03/31
Message-ID: <352134DA.3493@allensysgroup.com>#1/1

Igor Sereda wrote:
>
> 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

I am not an expert, but I believe the NULL columns take up the same amount of space whether they are grouped with the first table or not. I'm not certain why you want to separate them, except maybe to simplify queries. Received on Tue Mar 31 1998 - 00:00:00 CST

Original text of this message

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