[Zope-dev] Re: RDF Musings and TinyTables

Paul Everitt paul@eurozope.org
Thu, 20 Feb 2003 20:39:28 +0100


Good grief, how did I miss this!!

Shane Hathaway wrote:
> I just read the RDF article published here:
> 
> http://www.xml.com/pub/a/2003/02/12/rdflib.html

Yes indeed, that is a very good article.

> I've understood the mechanics of RDF for a while, but never understood 
> what makes it better than what we already have.  Now I think I get it: 
> RDF theory is a new kind of database abstraction.  It's similar to a 
> relational database in that you put pieces of data into the database and 
> later search for data.  But it's much more ad-hoc than a relational 
> database.

I think you are 100% correct, maybe 110%. :^)

In the last two years I made several attempts at grokking Mozilla and 
RDF was always the wall I ran into that prevented further progress.  In 
the last three months I slowly, surely, forced myself to study it. 
Write things down, take notes, rewrite them down, etc.

The light bulb has definitely gone off for me now, and I see things 
exactly the way you describe it:

1) It's an abstraction.  Once you start working with it, you realize 
what this means.  You take a bunch of information and throw it into a 
bucket.  You also throw in how the information relates to each other.

2) It's a database.  You have a pretty formal way of asking questions 
and making sense of the stuff in the bucket.  You also have a way to put 
things in the bucket, and also to rearrange the stuff in the bucket.

3) It's ad-hoc.  You don't have to know everything beforehand like SQL. 
  You also don't have to control the containment hierarchy like you do 
with XML.  (Took me a LONG time to realize the significance of the 
latter point.)

The ad-hoc part is, for me, the key.  Relational theory provided the 
theoretical foundation for modern online transaction processing.  But 
things like content management are a much different problem.  (One 
analyst states that unstructured content is 80% of the information in a 
business.)

RDF, in my view, is the equivalent of a "set theory", a formal 
foundation, for content management.  Without it, everyone has to build 
their own "framework" for stitching things together, for connecting the 
dots.

> Serialization of RDF into XML and the relationship between RDF and the 
> Semantic Web are distinct concepts from RDF theory.

That's right.  I've always been surprised when I threw some RDF/XML into 
Mozilla, then got a dump of the serialized results.  What I put in 
doesn't look like what I get out.  That's because there is an abstract 
model.  The XML can look a couple of different ways, and you still have 
the same abstract model.

It took me a while, but I learned how to take advantage of this.  With 
Moztop, I'm taking a pretty loose, distributed approach to content 
managment.  I collect RDF from a bunch of different servers, throw it 
all into one big graph, and use this to draw widgets on the screen.

The ability to make an assertion into a completely different part of the 
tree is something you can't do in XML.

> This ad-hoc data storage made me think of TinyTables.  TinyTables is a 
> good Zope product that fills the need for simple tables of data, but it 
> needs attention.  What if it got replaced by some Zope product called 

I will do everything in the universe to help such a project.  How is 
that? :^)

I know what the practical benefits that RDF can mean for content 
management.  And it isn't esoteric Semantic Gibberish.  I'm unable, 
though, to map it on the server side.  However, I'm having luck on the 
client side:

   http://www.zope-europe.org/Members/paul/tmp/moztop-pinstripe.png

> "RDFBucket"?  An RDFBucket object would let you input data in a variety 
> of ways, including object introspection, forms, and XML with embedded 

Yes, this is very similar to the client side model in Mozilla.  I'm 
doing things like:

   o Assembling a hierarchy

   o Making up new hierarchies where none existed before

   o Generating property sheets

   o Doing conditional display

   o Making rich connections between loosely-coupled objects, meaning,
   objects that didn't expect to be coupled

   o Allowing data from Zope 2 and Zope 3 sites to be
   collected, presented, and related in the same interface

Mozilla's template model is interesting to at least investigate.  What's 
interesting about it is the way you can follow relationships in the 
model to draw things on the screen:

   http://www.mozilla.org/docs/xul/xulnotes/template-primer.html

In this very simple example:

   http://www.mozilla.org/docs/xul/xulnotes/template-bindings.html

...note the last two resources shown in friends.rdf.  Instead of 
repeating information in every "row", you get the equivalent of a join. 
  Except the result of that join can produce another join.  The template 
builder keeps following relationships.  Also, you can join to something 
on another server.

> RDF.  It would let you run queries similar to ZCatalog.  Maybe it would 
> also generate RDF for embedding metadata in web pages
> 
> I'm wondering if I'm thinking in line with RDF theory, or if I've veered 
> off track.  If you're familiar with RDF: What do you think?

You're on track, oh boy, you're on track. :^)

To get this back into the world of the living, it would be helpful to 
think of a sample application.  Here's one we all know very well: 
Collector/Tracker.  Could you write a tracker system in RDFBucket 
without writing domain-specific objects?  (Yup.)

The nature of this kind of application is particularly well suited to 
your discussion.

Another that is particularly well-suited: a Zope version of Microsoft 
Project, where you have Tasks, Resources, dependencies, etc.

--Paul