Need good example database schema

Steve Williams stevewilliams at wwc.com
Sat Aug 30 15:47:21 CEST 2003


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.

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.

-  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.

Now add the time dimension to your objects and relationships and 
metadata, and you'll *really* start to reflect reality.  Google bitemporal.





More information about the Python-list mailing list