Skip to Content.
Sympa Menu

pcplantdb - Re: [pcplantdb] [synthesis][10][8.15.04]

pcplantdb@lists.ibiblio.org

Subject: pcplantdb

List archive

Chronological Thread  
  • From: Chad Knepp <pyg@galatea.org>
  • To: pcplantdb@lists.ibiblio.org
  • Subject: Re: [pcplantdb] [synthesis][10][8.15.04]
  • Date: Wed, 18 Aug 2004 21:50:32 -0500

Richard Morris writes:
> Chad Knepp wrote:
> > If we don't use Zope are you thinking that we would be using PHP? My
> > commitment to using python for this project is close to a blocking
> > level issue. If we use a python/RDBMS solution I am not at all sure
> > php would integrate with this easily. Were you thinking you would
> > learn python then?
> >
> No problem with learning python.

Good, no matter what we do at least it will be in python.

> > > Yes we can have different products running, but we could end up with
> > > having different ports for different parts, say
> > > http://permaculture.info/ - for non zope bits
> > > http://permaculture.info:8080/ - for zope bits
> > > (unless of course we go for an apache plug in and the sysadmins allow
> > it).
> >
> > Why? The URL structure would allow for this. Example:
> > permaculture.info/eden to access the old Eden engine,
> > permaculture.info/pfaf to access PFAF, permaculture.info/hg, etc. and
> > permaculture.info to be whatever the default is. 'mod_rewrite' is
> > pretty much a standard part of Apache anyway.
> >
> Because as Zope comes out of the box, it runs on a different port to
> apache. Port 8000 - apache port 8080 - Zope.
> mod_rewrite is a way round problem (might make things a bit slower?)

In $ZOPEINSTANCE/etc/zope.conf you just set 'base-port 80'

Using Apache with mod_rewrite:
<http://zope.org/Members/shaw/HowTo/ApacheFrontEnd2/>
<http://zope.org/Members/jec/virtual_howto_html/>

Using Apache with mod_proxy:
<http://zope.org/Members/anser/apache_zserver/>

> > > Also theres integration under the hood, how easy is it to pull things
> > > from the Z-ODB from outside. I believe people have posted stuff
> > > on how to do this from python. But will it limit developers to using
> > > python in the future.
> >
> > I don't really understand where you're going here, but I can't see the
> > limitation. As I said above Zope provides adapters for php and perl
> > development. Moving the dataset to an RDBMS would require and object
> > relational mapper. Such tools do exist although they are designed
> > more for using an RDBMS while retaining an object model more so than
> > transferring an existing dataset to an RDBMS.
>
> Do you have details of these adapters

Jeez! <http://zope.org/search?SearchableText=database+adapter>

> > > That is one advantage of sticking to MySQL for the plant database,
> > > interms that basically every language can communicate relativly
> > > painlessly with it.
> >
> > As I've said before Zope can talk to any RDBMS as well.
> >
> > Richard have you really thought about the kind of database schema it
> > would require to implement relationships the way we have been talking
> > about? If you really think that MySQL is the way to go we can always
> > use it as the database instead of ZODB. I personally think this is a
> > completely lossy idea.
>
> Yes one table does it (object version rather similar)
>
> Table relationships
> Fields
> source - id for source object
> target - id for target object
> linktype - describes the exact nature of the link
> "Guild member" "pest"
> metadata - who submitted it etc.
>
> I've done something like this with the "White Oak Plant Guild page"
> http://www.ibiblio.org/pfaf/pcplantdb/showthing.php?BOTNAME=White+Oak%2FHazelnut+community
> The parentchild table is used to encode these relationships.

I don't think an adequate solution is as simple as that. Since every
single thing has several to many important relationships with
practically every other thing a single table would approach
data_items^2 rows for only one relationship. The only sane way I can
see to do this is with sets because most of these relationships are
not unique. The relationship a rabbit in your garden has with most of
the stuff in your garden is pretty much the same (as I well know). To
say Rabbit --Eats--> Beans, Rabbit --Eats--> Kale, etc. is going to
take a bit of space. {rodents} --Eats--> {vegetables} is a bit more
compact. Also what about locale specific differences?

> There may actually been some benifit in following the structure of the
> XML XLink spec which is used to describe some very general and flexiable
> linking structure.
>
> What we might need is some universal nameing structure so with a single
> id we can point to any item in the system.
>
> In an OO system
> if all resources are sub classes of a single base class Say HGBaseClass
> then id's are simple a reference to an object of this type.
>
> In a RDBM system then there is probably a need for a master table
>
> Table: MasterReferences
> MasterID - global id
> ResourceType - is this a wiki page, plant db page, photo etc.
> ResourceSpecificID - more specific id for that particular resource
>
> One benifit of URL's is that the do provide this global namespace idea.

Yeah, that's almost as good as just using objects where all you would
need is a unique global id.

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




Archive powered by MHonArc 2.6.24.

Top of Page