Re: Tree (forest) design
Date: 5 Mar 2004 22:35:48 -0800
Message-ID: <4b45d3ad.0403052235.21b55ba1_at_posting.google.com>
> I can't possibly see what have you acomplished by breaking down the schema
> into multiple tables.
It is typical in RDM to break the schema into multiple tables, each usually representing a class/type (along with some predicate ie A person has name x, age Y, weight z). For example, gods should be in T_God, churches in T_Church, persons in T_Person, etc. This method reduces the occurance of NULLs (or NA-type values to mask the NULLs) since instances/tuples of each class/type usually have similar attributes.
> Every table (except hierarchy) has <id, name> signature,
> so that they all can be unified into a single <id, type, name> relation.
First, see the comment above.
Second, although the hypothetical representation of Ex076's data in RDM only shows one attribute (name) for each class/type, you are to assume that each class/type will typically have more than one attribute (In XDb1's implementation of Ex076's, each person has an additional attribute which is different from the other persons. You should know this from dealing with this same problem in "Object Algebra" thread.).
> Now if I add parent id reference then the hierarchy table
> signature becomes <id, type, name, parent_id>. To clarify for dummies, I'll
> insert couple of records there:
>
> insert into hierarchy values (1,T_God, MyGod, NULL)
> insert into hierarchy values (2,T_Force, Army, 1)
See above comments for details on the following 3 points on your
schema.
1. Lack of proper modelling (Each class/type should be in a separate
table).
2. No provision for additional attributes for each class/type.
3. Unnomalized data.
> You aren't going to criticise me for that NULL in the root record,
> aren't you?
No because it's a small fry compared to the others mentioned above :) Received on Sat Mar 06 2004 - 07:35:48 CET