Replies: 3 comments 7 replies
-
This sounds like it could be pretty useful, esp if it could be used to handle "soft delete" functionality. |
Beta Was this translation helpful? Give feedback.
-
If the SQL commands behave differently in the case of the Versioned sub-type, how to execute an actual delete instead of soft delete? Maybe better having dedicated SQL commands? The expert with SQL syntax is @antarcticgiraffe but he's pretty busy working on other projects. Below is the first draft, but I'm open to any advice/ideas. Versioned Metadata Properties. We could find a convention, like starting with
We could store a new Update a record
This clones the current record before the update as an old version. Then updates the current record and increments the Delete a record:
This actually set the property Query: Queries should filter out deleted records ( How to make this efficient? We could store old versions in ad-hoc buckets. Like with If the users wants to look for past versions, then the involved buckets can be used in the query with |
Beta Was this translation helpful? Give feedback.
-
Would be cool if part of this versioning design there was also a clever way to implement CouchBase style UUID to make graphs and their relationships automatically resilient and durable when moving between systems. |
Beta Was this translation helpful? Give feedback.
-
(This discussion begins on the Discord channel)
I always liked storing timestamps in records, at least a couple:
createdOn
andlastUpdateOn
. Unfortunately, when you squeeze performances these 2 long properties weigh a lot when you have millions or billions of records. Especially if they are not used. I was rather thinking of providing a base type, liketype Versioned { long createdOn; long lastUpdatedOn; long deletedOn }
and ArcadeDB inheritance by letting users define types that extendVersioned
, so they have these 3 properties.On top of that, the database could behave differently when you're deleting a record whose type extends
Versioned
: the record would be marked as deleted (fill updeletedOn
properties). Also, when updated, it should update thelastUpdatedOn
properties under the hood. To achieve full versioning it should be able to create a new record at every update by copying all the properties and linking it to the previous one (as the previous version). In this way, you can always browse versions by crossing edges previous and/or next.I'm sure it's more complicated than this, and maybe a set of new commands would be needed.
Beta Was this translation helpful? Give feedback.
All reactions