Sunday, 29 November 2026

Relational Database & ORM support plan for 'Ola' Programming Language.

Introduction.

Sometimes a library is enough, but still... a support on language-syntax-level can make a tool more elegant, cheaper, faster and easier to use in practice.


Basic Idea.

I have an idea to explore: Support for Relational Databases integrated with ORM (Object-Relational Mapping) tool, on the Language Syntax Level, planned for 'Ola' Programming Language we intend to create.

This support is planned to consist of three parts:
- Each of most popular relational (sql) databases will have a driver,
- There will be standarized configuration file that will 'bind' a driver with 'Ola' Programming Language's inner mechanisms,
- There will be support on language-syntax-level as well.

Syntax-level support will handle object graphs by default (with their state set, of course), so it's no need to use separate, additional ORM tools like Hibernate for java.

That way, when we need to migrate to another RDBMS solution from current one, all we need to do is to switch driver and edit configuration file. One of design goals is to ensure that code won't need to be changed in any way, when we do that. Moving the actual data still needs to be done properly, but perhaps this can be automated too.


Changing Versions of Persisted Data.

What about changing code of classes for objects stored in object graph?

Is code typing and versioning enough? Perhaps there could be 'backward compatibility brackets'?

Like: Data in Class Person version 9 is backward compatible with data stored in Class Person in
versions: 2-4, and 6.

Perhaps there can be tools that will help to automate updating data in relational database, from version 'x' to version 'y'.

Perhaps such updates can be executed automatically as a part of project compilation and build, when 'improper version' is detected. Perhaps this can be a part of CI/CD (Continuous Integration / Continuous Deployment) practices - for Internal Testing Environment and/or for Production Environment.

Perhaps there should be a way to migrate data to previous versions too (from 'y' to 'x'), and tools for overall management of data version changes, and for view/management of 'historical data'.

No comments:

Post a Comment