Multiple record kinds in a single DB
Status: idea
I'd like to keep other kinds of records along with my "main" objects:
- notes, error reporting, citations,...: these are records that describe some aspect of a record, and are linked to them
- cache for original data that are not in my native format, for instance for performing periodic searches on an external db, without adding records that were already seen
more complex hierachies, like the ones provided by FrBr, might better be implemented into a single schema. The notion of kind is intended for data that can remain independent, whereas the objects in a relational model like FrBr are not independent.
Implementation
support for merging multiple schemas into a DB, so that you can create a database that holds a variety of objects.
records should hold an additional .kind attribute
a new Attribute, Reference should make it possible to link to another record, or even to a single value in a record
The tricky thing is to avoid making the code more complex in case there is a single schema in play:
without additional info, a schema is the default schema
- record.kind will default to this schema
- queries must support limiting to specific kinds
Why not a full-blown RDBM?
Here, the limit between pybliographer and a full-blown relational database might become fuzzier. The intent is:
to provide weak references, in the same way as python typing is different from static checking
- to stay on the "practical" side of the design: implement only as much as needed for the problems at hand
