Wednesday, July 21, 2010

Templates and canonical columns

An idea I'm playing with is having "template types" or "base types", which basically allow structured documents to have many types of records, but which have a few columns in common, using a mechanism which would look something like inheritance. This would allow all the records in structured documents to be globally query-able on common columns. This actually makes more sense in structured docs than it does in general relational tables (as POSTGRES tried to use this idea) since the query is still well-defined and bounded in scope to a particular structured document.

An obvious use for this would be a timestamp column, so you could fetch all of today's records for a given person, etc. I'd probably use a syntax similar to the "star" traversal notation used in POSTQUEL for this sort of thing.

No comments: