| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: OO and relation "impedance mismatch"
Laconic2 wrote:
>
> "Kenneth Downs" <firstinit.lastname_at_lastnameplusfam.net> wrote in message
> news:fac1kc.83b.ln_at_mercury.downsfam.net...
>> 3. Enforce the arbitrary convention that a foreign key definition >> causes columns to be placed into the child table that correspond >> in name and type/precision/scale to the primary key of the >> parent. (consequently requires system to check for duplicate >> column names, but that should be prevented anyway).
Actually I already use domain definitions, and actually require all columns to be defined domains. Since everything is data (not declarative code), a table's columns are defined as the cross-reference between the table of tables and the table of domains. After that comes the columns that are added as a result of fk defs.
I have pondered vaguely the idea that somehow the system could "know" a primary key and a foreign key when it sees it, but not too seriously. The idea would be something like this:
But I realized that my definition of the FK/RI as just two table names is more normalized than using #3 above, and I just plain didn't do #2, I went another way. But hmmmm, it does still nag at me that #2 is more precise, more normalized. It just seems to me that when you define a domain like "employee number", the next question is "Well, what table tracks those?" and therefore you want to specify that immediately. OTOH, when you define some commonly used column like "Description varchar(40)" you want to explicitly state that there is no table containing definitive values for this column.
Alas, can't look at that today, have to download the latest Mono and see if it is worth using.
-- Kenneth Downs Use first initial plus last name at last name plus literal "fam.net" to email meReceived on Thu Oct 07 2004 - 11:19:13 CDT
![]() |
![]() |