Need good example database schema

Patrick K. O'Brien pobrien at orbtech.com
Sat Aug 30 10:14:59 EDT 2003


Steve Williams <stevewilliams at wwc.com> writes:

> Patrick K. O'Brien wrote:
> > I'm looking for a good schema to use as an example for an object
> > database system.  Something like a books/authors/publishers or
> > teachers/students/courses kind of thing.  There are plenty of examples
> > of such to be found, especially in the academic literature involving
> > object databases, but most of them are pathetic.  It's hard to take a
> > schema seriously when it shows MarriedTeacher inheriting from Teacher,
> > etc.  I want something that makes proper use of inheritance, has
> > classes with reasonable attributes, and does a decent job reflecting
> > reality (ie, books can have more than one author, a teacher of one
> > course could be a student of another, etc.).  Any suggestions?
> >
> 
> There are objects and then there are relationships between objects.

Agreed.

> Expand your concept of schemas to include relationships as
> independent objects (I call them Relators in my work) and you'll
> have more luck with reflecting reality.

While I agree that many relationships deserve to be independent
objects, I've never been comfortable with the notion that they
deserve a category of their own (Relators, for example).  Especially
when they aquire attributes of their own (Royalty as attribute of book
contract, for example).  To me there are just entities: book, person,
authorship, contract, publisher (actually should be a role played by
an organization with respect to a book), etc.

Can you provide more details about your Relators?  Do they have
functionality that other entities do not?  Where do you draw the line
between an entity and a relator?

> -  Author is a relationship between book and person
> 
> -  Book contract is a relationship between author and publisher
> 
> -  Royalty is an attribute of book contract
> 
> The hierarchy of object inheritance misses out on the web of
> relationships.

Again, I agree.  Do you have any examples that don't miss out on this?

> Now add the time dimension to your objects and relationships and
> metadata, and you'll *really* start to reflect reality.  Google
> bitemporal.
 
Interesting stuff there.  Thanks for the Google tip.

I'm curious about your work.  Can you tell me more?

-- 
Patrick K. O'Brien
Orbtech      http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------




More information about the Python-list mailing list