[Zope] RE: [ZDP] CoolFAQ design questions

Shaw, Howard ShawH@STHS.org
Thu, 22 Apr 1999 12:01:26 -0500


> ----------
> From: 	Martijn Faassen[SMTP:faassen@vet.uu.nl]
> Reply To: 	M.Faassen@vet.uu.nl
> Sent: 	Thursday, April 22, 1999 11:30 AM
> To: 	zdp@zope.org
> Subject: 	[ZDP] CoolFAQ design questions
> 
> Hi there,
> 
> Joe Van Andel asked the following question:
> > I'm not quite clear on how Z-Tables will be used for CoolFAQ.  Is
> each Q&A
> > going to be stored in an entry in the Z-Table?  How do you plan to
> > represent the "natural" outline structure that most FAQs would want:
> > Topic 1
> >    Q1.1
> >    Q1.2
> >    Subtopic a
> >         Q1.2.1
> >    Subtopic b
> > Topic 2
> >    Q2.1
> >    Q2.2
> 
> I leave the floor to Martijn Pieters, our Z Tables advocate, or anyone
> else who wants to answer. This'll help me increase my Z Tables Zen
> too.
> :)
> 
Well, Z Tables is supposed to be an SQL database on top of Zope, right?

http://www.sths.org/genus/uber/renderall

is the address of a page I am currently working on. It should look
something like 

Animalia - Kingdom
          CHORDATA - Phylum
               UROCHORDATA - Subphylum
               VERTEBRATA - Subphylum
                    MAMMALIA - Class
                         EUTHERIA - Subclass
                              PRIMATES - Order
                                   ANTHROPOIDEA - Suborder
                                        HOMINOIDEA - Superfamily
                                             HOMINIDAE - Family
                                                  Australopithecus -
Species
                                                  Homo - Species
                                                       sapiens - Genus
                                                            sapiens -
Subgenus
          PORIFERA - Phylum
     Fungi - Kingdom
     Monera - Kingdom
     Plantae - Kingdom
          BRYOPHYTA - Division
     Protista - Kingdom

which is an outline structure similar to that mentioned above. It is
generated by a recursive var inclusion that pulls from an SQL database.
To put it simply, every item has a link to its parent. If you want an
item to appear in multiple branches, you need a many-to-many table.
Usually such a mapping is Xtable <- Mappingtable -> Ytable, but here it
would be Xtable <- Mappingtable -> Xtable. Then I have multiple
'animals' linked each to one item. These could be multiple answers
linked to one question, etc. Give it an extra mapping table, and you
could have one answer link to multiple questions as well.

It is not hard to generate a hierarchical structure in an SQL table, so
long as you provide yourself with 'forms' (in this case, webpages) which
internally understand the linkages and don't require you to know the id
of what you want to link to.

> Regards,
> 
> Martijn
> 
> _______________________________________________
> ZDP maillist  -  ZDP@zope.org
> http://www.zope.org/mailman/listinfo/zdp
> 
Howard C. Shaw III
Programmer/SysAdmin
St. Thomas High School