Skip to Content.
Sympa Menu

piw - Re: PIW Relationships Modelling

piw AT lists.ibiblio.org

Subject: Permaculture Information Web

List archive

Chronological Thread  
  • From: Chad Knepp <pyg AT galatea.org>
  • To: Permaculture Information Web <piw AT lists.ibiblio.org>
  • Subject: Re: PIW Relationships Modelling
  • Date: Sun, 17 Jul 2005 12:31:40 -0500

Marco Stahl writes:
> > Von: Sean Maley <semaley AT yahoo.com>
> > > Example:
> > >
> > > entity | parent
> > > ---------------
> > > creature NULL
> > > animal creature
> > > plant creature
> > > bean plant
> > > hemp plant
> >
> > Where searches represent the fundamental activity with
> > the dataset, OLAP, we may consider keeping the schema
> > denormalized; creature_type: A, M, V (animal, mineral,
> > vegetable) rather than get into hierarchical data
> > sets.
> >
> > --------------------
> > |creature_dimension|
> > --------------------
> > |creature_key | : hemp, bean, etc
> > |creature_type_key | : A, M, V
> > |ground_depth |
> > |height |
> > |.... |
> > --------------------
>
> Thats for sure faster and easier to implement.
> But I'm a friend of putting so much knowlege as possible into the modell
> and
> the "source database".
> (And i'm influenced maybe to much from objectorientated programming)
>
> Something like
>
> entity | output
> ----------------------
> Leguminosae nitrogen
> animal shit
>
> would simplefy the adding of new plants(and other entitys), creating
> patterns for groups of plants(and other entitys), adding/changing
> properties/patterns for whole plant(entity)groups.

My proposal attempts to solve this with the use of sets. Example:

entity | output
--------------------------------------
set(all Leguminosae) nitrogen fixing

> If the system is to slow in the end, we can use cached demormalized ,
> "flat"
> entity/input/output/whatever-tables for increasing search-speed.
> There is no reason to go through the hierarchy every time but its good to
> have the hierarchy in the background.

Premature optimization is the root of all evil ;-)

> Saludos, Marco

Ok, I'm still not sure about why this is important but I see it at
best as being 5-6 levels of hierarchy which will not affect
performance. Something like:

entity | parent
---------------
creature NULL
animal creature
plant creature
leguminosae plant
soya leguminosae
max soya
'Chiffumy' max

The real problem with this is that entity will not be unique which
requires you to know a little more about the entity than just the top
level. Starting with the just cultivar for example may lead to a
tomato, an apple, and a flower.

--
Chad Knepp
python -c 'import base64;print base64.decodestring("cHlnQGdhbGF0ZWEub3Jn")'




Archive powered by MHonArc 2.6.24.

Top of Page