Re: How to find Brothers and Sisters?
Date: 4 Dec 2006 06:25:58 -0800
JOG a écrit :
> Cimode wrote:
> > Lennart a écrit :
> > > Cimode wrote:
> > > > Lennart a écrit :
> > > > >drop table persons;
> > > > >create table persons (
> > > > > name char(10) not null primary key,
> > > > > father char(10) references persons on delete restrict,
> > > > > gender char(1) not null check (gender in ('M','F'))
> > > > > );
> > > > While getting demanded results, the above schema is not 1NF.
> > >
> > > Really, in what way do you think the schema violate 1NF?
> > A RTable is a set of facts, true propositions. All predicates must be
> > validated by TRUE and represent the SAME segment of reality. In the
> > design proposed, it is highly likely that the highest level proposition
> > (also known as root) have the root node either be NULL or point to
> > itself as opposed to the non root node elements. Therefore it is
> > likely to be unormalized design. In a word, there's a 1:0 cardinality
> > between parent and sibling. A parent may or may NOT have sibling. A
> > sibling may or may NOT have a parent (the root does not have a parent
> > by definitions)...
> > Regards..;)
> > > /Lennart
> I would think this is more a design flaw than the table not formally
> being in 1NF. No repeating groups. check. Data in the form of a
> relation. check. Some root entry in 'persons' who has himself or one of
> his successors as a father... erm.....hold on...
> (I think that Marshall once pointed out that the technical term for
> this is Furturama-NF, where Fry is his own grandfather)
Repeating groups is not the only prerequisite to state a table is in or is not in 1NF.
There is no way you can be in 1NF if NULL values are permitted OR if you have 2 different predicates in the same RTable...Only one predicate per RTable.. That's by definition. Period. Received on Mon Dec 04 2006 - 15:25:58 CET