| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Easy Modeling Qs
I have just ordered a book on modeling but am struggling with some
basic Qs that yield conflicting answers on the Web:
1)In 2 tables with a 1:1 relationship, I think I could combine them
into 1 table but think it would be more efficient to have 2. Can I use
the primary key of the 1 table as the foriegn AND primary key of the
second? If yes, do I simply say something like "create table
second_table(x_id not null primary key references main_table, anum
int(2));"? Normally I would use an identity column for each table but
now I am thinking that is a waste of space when I can uniquely
identify a column with another tables primary key.
2) This one is maybe a consequence of staring at things too long: I have a table that is a 1:n to 3 different tables...can I do that? I am used to association tables for many to many relationships but these are all 1:n. Seems like maybe this is bad design but I can't figure out a better way. I have never done as complicated a schema as this and have only ever had single 1:n relationships between all related tables.
All help greatly appreciated.
JD Received on Mon Jul 01 2002 - 15:47:43 CDT
![]() |
![]() |