Re: Normalization Question

From: Neo <neo55592_at_hotmail.com>
Date: 26 Jan 2005 12:01:33 -0800
Message-ID: <1106769693.755748.249570_at_z14g2000cwz.googlegroups.com>


> ... a one-to-one relationship
(from a referencing row attribute to a referenced row in another
table) could also be a one-to-many relationship, without introducing an intermediate, two column, relationship table, simply by letting the original referencing attribute hold multiple values.

The script below for a small experimental db demos the equivalent of an attribute that can reference multiple row of another/same table
(actually, it can effectively reference 0 to many rows of various
tables simultaneously). The user never need worry about the impact of introducing such flexiblity after initial design as it starts out with this level of flexibility. In the example below, John can like 0 to many persons without the user either having designed such flexibility at begining or adding it later.

// Create items in directory to classify things
(CREATE *person.item ~in = dir)

// Create the verb: like.
(CREATE *like.cls = verb)

// Create john and mary
(CREATE *john.cls = person)
(CREATE *mary.cls = person)

// Create "john likes mary"
(CREATE john.like = mary)

// Add sue and also that john likes her.
(CREATE *sue.cls = person)
(CREATE john.like = sue)

// Find persons that john likes.
// Finds mary and sue.
(SELECT john.like = %)
Received on Wed Jan 26 2005 - 21:01:33 CET

Original text of this message