I would like to leave here a post by Alexander Myodove where he gives an answer about database in Universa.
"Is it possible to migrate database to universa platform ? And is there any method to create a contract from the old database once it’s been Migrated?"
A.M.: "The database purpose is to store data; the Universa’s main purpose is to store the validity of the data (though, when using systems like SLOT1, it could store data as well); let’s imagine we are building some Universa-based system to validate the records of the existing database (to be sure they were not tampered with). First and foremost – what kind of database that could be? By default, some would consider to mean RDBMS only, a relational DB, like those regular PostgreSQL/MySQL/Oracle/MSSQL. But that’s not necessary, in fact; and if we consider some other, NoSQL database, then... the document-oriented NoSQL databases (like MongoDB) could be considered a perfect match for Universa!
In MongoDB, you store a document, which internally contains some structured data in a JSON-like format; – but that’s actually exactly what is stored in Universa’s smart contracts! The MongoDB “document” can be directly mapped to an Universa’s smart contract. Just decide where you put the document parts into the Universa’s unicon (what goes into the definition section, which is immutable; what goes into the state section; are any extra checks/validations required and should be added).
There maybe minor incompatibilities (like, between the types supported by MongoDB’s BSON format, and Universa’s BOSS); but with a simple convertation layer, the types could be mapped bidirectionally.
So, basically speaking, some MongoDB’s document in a collection like “car_passport”, with a structure like {"vin": "123456", "model": {"brand": "Lada", "code": "2101"}, "mileage": 15}, may appear in the Universa’s smart contract, which will have:
definition.car_passport = {
"vin": 123456,
"model": {"brand': "Lada", "code": 2101}
}
state.car_passport = {
"mileage": 15
}"
Thank you. Very interesting to learn.