Re: Some really confusing things about parent-child relationship

From: Neo <>
Date: Thu, 16 Aug 2007 20:53:13 -0000
Message-ID: <>

> In hierarchical model parent class can have several subclasses. What > does that mean exactly?

In data model used by dbd (a lightweight, memory-resident db), a class is a subclass of another, if all instances of the first are also instances of the second. Below is an example:

(; Create things)
(new 'human)
(new 'doctor)
(new 'john)
(new 'mary)

(; Classify john and mary)
(set human instance john)
(set human instance mary)
(set doctor instance john)

(; At this point, doctor is a subclass of human; it is DERIVED by the
fact that all instances of doctor, ie john, are also instances of human)

(; Create/classify new things)
(new 'martian)
(new 'martin)
(set martian instance martin)
(set doctor instance martin)

(; Now, doctor is no longer a subclass of human; it is DERIVED by the
fact that not all instances of doctor, ie martin, are human)

Note: that some can argue that a martian who went to medical school and is capable of treating martians and humans is not a doctor because most dictionaries define doctor as a person ...

Below are two old threads dealing with similar topic: "How to represent category, subcategory, product Options" "The stupidest design I ever saw" Received on Thu Aug 16 2007 - 22:53:13 CEST

Original text of this message