Data migration of db wrapper upon ontology update
Updating the underlying ontology might make a DB used by a DB wrapper unusable due to a change in the DB schema or another reason depending on the wrapper implementation. Since ontology updates are possible and expected to occur, it would be beneficial to offer a generic solution to this problem.
Naive solution: have two db-wrappers each with a separate database where one follows the old schema and the other follows the new one. Write an OSP-core script that reads all the data from the old DB, updates it according to the new schema, and then adds it to the new DB.
But the naive solution doesn't cover the ontology update case, does it?
Even if the two versions of the ontology have two separate namespaces (so they can be installed at the same time)?
Ontology version 1: Entity A has attribute C.
Ontology version 2: Entity A is related to B. B has attribute C.
If you have all data in ontology v1 format, how would you introduce the B instances?
The naive solution you propose wouldn't. Or would it?
b = myonto_v2.B(c=old_a.c)
a = myonto_v2.A()
a.add(b)
Decisions from the meeting last week:
- As a first solution, we want to support a way that allows a user to manually update his data.
- There should be a tool that supports the ontology updates that have been made.
- Two discussed solutions:
- Special ontology update mode where union of ontologies is installed. The user can then update his cuds objects to the new ontology.
- Allow to install the new ontology under a new name. Then the user can recreate the data under the new ontology. Problem: After the new ontology has been removed, the user might want to rename the new ontology.
--> We try solution 1 first. --> There should be an example that explains the ontology update procedure.
@yoavnash if I understood correctly, your modular design should help in this regard correct? Do you want to add a couple of sentences?
One idea that we could explore is the use of a standard mapping tool to achieve the following kind of flow:

Such a tool can have the following functionality:
