How to implement multiple versions of an object in a database

390 views Asked by At

I working on a program that stores proprietary objects in a database (as BLOBs). We'd like to add a versioning capabilities (so the user can store multiple versions of an object with timestamps, etc.).

One approach is to use database and store each version in the object in a separate BLOB.

Another approach is to keep all versions of the object in a single BLOB. In this case I need to provide some versioning mechanism. I don't want to develop a code for this task from scratch. There are many version control systems around, but I am trying to find a library or C++ code that what allow me to perform some very simple tasks:

  1. Efficient storage of deltas
  2. Quick access to the list of revisions
  3. Ability to extract, replace and add revisions

I use C++ Builder from Embarcadero.

any advice on how to embed simple revision handling mechanism into the code?

1

There are 1 answers

0
Luke Feeney On

As you say, there are a few native revision control databases that can handle this quite efficiently. TerminusDB has a Rust library for its store - not C++...