Skip to Content.
Sympa Menu

pcdb - [pcdb] some ideas for data modelling

pcdb@lists.ibiblio.org

Subject: Permaculture Database

List archive

Chronological Thread  
  • From: Paul d'Aoust <paul@heliosville.com>
  • To: pcdb <pcdb@lists.ibiblio.org>
  • Subject: [pcdb] some ideas for data modelling
  • Date: Mon, 26 Mar 2007 23:19:18 -0700

Okay, folks, here are some ideas. It's a long e-mail, but there are a
lot of lists and white space, so it's not quite as long as it looks :-)

On Mon, 2007-26-03 at 16:50 +1000, jedd wrote:
> Wikis are very limited, but may meet the [still unstated] requirements
> of the various interested parties.
>
> But yes, from my perspective they are way too limited and would
> certainly not meet my requirements.

Yeah, I would like to see some relatively structured data constraints
myself. I'm like that, I guess :-) I see what PFAF is doing, and it's
certainly a great idea, especially if MediaWiki is able to store a set
of attributes. However, something about the freeform-ness of it worries
me, because in my experience that sort of openness leads to lots of
loose ends -- keywords with slightly different spellings, lost tags,
things in the wrong place, lots of duplicates. Having structured data
doesn't necessarily prevent duplicates, mind you, as anyone who's used a
point-of-sale system in a collaborative environment would know. Some
bozo looks for a part number that's in the system, can't find it because
they forgot the hyphen, and creates an entirely new one!

> A CMS framework may suffice, with a wiki front end to do the meta-
> design of the rest of the system ...

two questions: (1) when you say CMS, do you mean like Mambo, PostNuke,
Plone, etc? or do you mean a database/user interface of our own design?
(2) what does meta-design mean in this context? like a developer wiki?

> I echo Lawrence's congratulations on landing a nice-sounding gig.

:-) thanks. We'll see how it pans out. Currently I'm delivering local
organic veggies to people's houses. Hopefully the whole apprenticeship
thing will start this spring.

> Hemispherical parochialism is one thing that renders the majority of
> books, web sites, and indeed list postings less than a delight to
> work with.

ha, and I like that about PFAF. It's the equatorial parochialism that
frustrates me, because I'm in zone 5. Clearly there is a need to avoid
all forms of parochialism :-)

> > My vote goes for creating an interactive Permaculture Guild Database,
> > something that reveals and qualifies relationships between elements in a
> > permaculture system.
>
> I think I've mentioned this before, but the last time I went through
> the requirements for 'my' system, I got to about a 4 or 5 dimension
> array of data - potentially the ugliest nightmare of databases - and
> that was just to meet my fairly modest requirements.

ha ha. Yeah, it could get very complicated very quickly. I also think
that a guild database, with an emphasis on relationships, would be the
most useful form this database could take.

How about something very simple? All tangible entities -- plants,
actinomycetes, dogs, bicycles, bodies of water, trowels, etc -- are
first-class objects. They would be organised hierarchically, like this:

Organisms
Bacteria
Actinobacteria
(various species)
Aquificae
Chloroflexi
Cyanobacteria
(etc)
Archaea
Eukaryota
Animalia
Deuterostomia
Echinodermata
Hemichordata
Chordata
Vertebrata
Tetrapoda
Amniota
Mammalia
Fungi
Plantae
Protista
(okay, that's enough, I'm not gonna sketch out the entire taxonomic
tree here)
Geographic features
Land
Hill
Canyon
Swale
Water
Pond
River
Estuary
Tools

and so on, and so forth. This tree would allow a person to get as
specific as they wanted within a very flexible framework; e.g., you
could have 'Maypop' as a child of 'passion flower', and it would inherit
all the characteristics of the passion flower, while specifying that
it's hardy to zone 5.

Each node of the tree could have its own set of attributes, as well as
being able to inherit attributes from its parent. Plants would have a
'zone' attribute and a 'soil' attribute, which wouldn't be necessary for
(most) animals.

One difficulty I can already see is the question of whether a certain
thing is an object or an attribute. For instance, what is 'sandy soil'?
an object under 'Soils', or an attribute for plants, or both (in the
form of a foreign key pointing to another node)?

So once we've defined a very simple, flexible data structure for
'objects' and 'attributes', we would then need to model relationships. A
simple junction wouldn't serve us well enough -- it's not sufficient to
know that corn connects to legumes in some way; how do they connect? For
all the reader knows, they even connect in a negative way.

One way of modelling relationships is to use a source/sink model. Anyone
who's used computer-based modular synthesis programs, or the gstreamer
library on Linux, will be familiar with this model. An object presents a
series of sources and sinks, which (conveniently enough) are directly
analogous to inputs and outputs in the permaculture world. So, then, a
chicken would present itself this way:

Chicken
sources
poop
tilling
eggs
meat
heat
sinks
grain
water
land
shelter

whatever. Something like that. Then matching sinks and sources could be
connected automatically, which would have the benefit of exposing
relationships that we wouldn't have thought about on our own.

Another, more hands-on, way is to simply connect two objects with a tag.
For instance, to model a relationship between a hollyhock and a bee, you
could go like this:

Hollyhock ----shelter----> Bee
------feed----->
<--pollination--

Anyway, those are some thoughts. I think that a design that merely
concerned itself with generic objects, attributes, and relationships
would be simple, flexible, robust, and serviceable. Duplicates would
still be an issue, but we could prevent them in intelligent ways (like
automatically suggesting similar tags when someone tries to create a new
one, using fuzzy matching).

(Apologies if all these ideas have been hashed out already; I tried to
read through the archives, but I started to feel like someone with ADD.
I can't surf the Net with as much stamina as I used to.)

Paul





Archive powered by MHonArc 2.6.24.

Top of Page