DEV Community

Discussion on: Meet Datomic: the immutable and functional database.

Collapse
 
miketalbot profile image
Mike Talbot ⭐ • Edited

I'm hoping there is a way that you can actually delete data somewhere though? Otherwise this would end up being very, very hard to use for a range of use cases.

People frequently add data that they shouldn't to databases, information that it is dangerous or illegal to store because it exposes the the party holding the data to significant legal and financial penalties. For example, in a system I used to run, people upload pictures of their passports by accident, if deleting that picture didn't actually remove it from the database entirely - this would be a significant issue. Any business that is ISO 27001 certified would have to demonstrate at audit that full removal was possible and reasonably efficient. I know this because we had an event (immutable) database that the information was in, and it took whole reimports to remove this stuff.

In the EU we have GDPR, which includes the right to be forgotten and the right to see all information held about us. This isn't just the most recent information in the database, it is all of the information.

Event based databases have some very interesting characteristics, it would be great to find one that actually could handle real deletion without hoop jumping.

Collapse
 
guto profile image
guto • Edited

Sure! You can completely remove datoms using an excision (docs.datomic.com/pro/reference/exc...). It is completely understandable, after all, in Brazil for example, there is the General Data Protection Law (LGPD), responsible for working with data privacy rights.

In one of the next articles in this series I will demonstrate how to use excisions! I hope you enjoy!

Collapse
 
miketalbot profile image
Mike Talbot ⭐

That's great! Thanks for the info :)

Collapse
 
mykola_androsovych_52be0d profile image
Mykola Androsovych

I wouldn't be so sure about the excision forum.datomic.com/t/excision-is-ve...

Collapse
 
dyfet profile image
David Sugar

I recall when svn tried promoting immutability as a feature ;).

But there are plenty of actual potential applications for immutable data systems, such as event logs, call detail records, etc, that need the ability to be queried and are often not public facing, but may also face legal mandates to preserve data. The solution to something security related somehow getting into such a system is to have the query / viewer scrub it, rather than to modify the stored data. Many of these kinds of systems historically used encoded binary data, too.

Collapse
 
guto profile image
guto • Edited

Exactly! By default all data managed by Datomic is encrypted and stored in a byte array format. Every writing transaction needs the configured transactor, in addition to needing a peer to read the data.

Furthermore, for privacy reasons you can delete datoms using an excision (docs.datomic.com/pro/reference/exc...). But, in your opinion, what is the general applicability for using immutable data, beyond the example you said about svn? And what would be the possible problems to be faced in this architecture?