| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Normalisation
> Paul wrote: >
Sorry about one extra level of quote...
The only place where I've seen any plausible use for nested relations was in C J Date's work where he discussed using a relation-valued attribute (RVA) as the primary key (PK) of a relation describing functional dependencies (FD) in a relation schema. The PK is the set of attributes in the determinant (left-hand side, LHS) of the FD. The RHS would also be a relation-valued attribute. (If the RHS is a simple attribute (containing the names of attributes in the described relation schema), then the RVA is not the PK - the combination of the RVA plus the singleton attribute is the PK.)
You can model this without any RVA by assigning a name to the FD, then describing the determinant set in one relation and the determined set in another. In SQL (simplified):
CREATE TABLE FD(NAME CHAR(18) NOT NULL PRIMARY KEY);
CREATE TABLE LHS
(
FD_NAME CHAR(18) NOT NULL REFERENCES FD,
ATT_NAME CHAR(!8) NOT NULL REFERENCES <column-names>,
PRIMARY KEY(FD_NAME, ATT_NAME)
CREATE TABLE RHS
(
FD_NAME CHAR(18) NOT NULL REFERENCES FD,
ATT_NAME CHAR(!8) NOT NULL REFERENCES <column-names>,
PRIMARY KEY(FD_NAME, ATT_NAME)
-- Jonathan Leffler #include <disclaimer.h> Email: jleffler_at_earthlink.net, jleffler_at_us.ibm.com Guardian of DBD::Informix v2005.01 -- http://dbi.perl.org/Received on Tue Jul 05 2005 - 00:31:58 CDT
![]() |
![]() |