lundi 29 juin 2015

Preferred way of data upgrade considering abstraction of data storage format

The core question is how to properly execute upgrade of data while applications versions differ in matter of data representation? E.g. for databases it is often to use SQL scripts to modify persisted data model. I can easily imagine similar way using XSL for XML and so on. But I would like to create abstraction of data persistence model in that way that upgrade method does not consider way of storing data - it is suffice that it can read previous version data and save new ones.

I tried doing such thing in C# like loading previous version of assembly containing data definition classes through reflection while having current version deployed with application. It is quite complex and tricky solution. Other option is to keep previous model classes redundantly with some version based naming conversion - this solution is easier as it gives full access to types at compile time.

My idea asking this question is, what is the proper solution of such upgrades of data?

Aucun commentaire:

Enregistrer un commentaire