[odb-users] Handling the database versioning concern

Michael Powell mwpowellhtx at gmail.com
Tue May 21 08:20:24 EDT 2013


Hello,

How does ODB handle the object and/or database versioning concern?
Maybe a better question is, whether ODB does that? I'm sure the folks
with C/S are well aware of this opportunity and the challenges
involved.

Hopefully when we design a database and an ORM the first time that's
the only version we'll ever be concerned about. Sarcasm intentional.
Obviously this is impractical to expect as new discoveries are made in
the maturing of a given domain or model.

One approach I've taken in the past, for example, with C# NHibernate
and Fluent NHibernate, is to ensure that a set of ordered database
updaters is run. Usually, in C# anyway, this ends up being composed
and reflected out of a set of assemblies at run time. Updates only run
when they need to, if, say, some version table reflects they need to,
type thing.

In C++-isms, that might be captured as a vector of these instances, or
perhaps even a variadic template to capture the concern(s) more
efficiently at compile time.

I know Boris and folks dislike like the words framework or design
pattern, also given that ODB supports several databases, does ODB
provide any hooks in its object space to facilitate the versioning
process? Even something like register these upgrade instances which
consequently run embedded SQL statements to upgrade, type thing? Or
perhaps more auto-magically generated than that?

Thank you...

Regards,

Michael Powell



More information about the odb-users mailing list