Jesvin Jose
Jesvin Jose

Reputation: 23088

What NoSQL databases enforce referential integrity at data level?

Relational DBs do it with keys and happens at (a very reassuring) data level. Document DBs have to enforce it at application level.

RDBs do enforce referential integrity. If a relationship between two people, if one person is deleted, the relationships will automatically cease to exist (I am mentioning ON DELETE CASCADE). If a parent category was deleted, it's subcategories will also cease to exist.

The closest a NoSQL store can come to referential integrity is graph DBs like Neo4j. Here, edges exist directly between two nodes. So, if a node were deleted, the edges will be too.


I have been reading up on graph and document stores and I think that NoSQL databases would be making efforts at referential integrity (and graph databases have come close).

Question: Which NoSQL databases have referential integrity at data level?

Upvotes: 6

Views: 4663

Answers (1)

Yogesh Prajapati
Yogesh Prajapati

Reputation: 4870

You are right that most of the databases are provide referential integrity at the data level but while I am working with mongodb and with MongoDB ORM tool morphia, morphia provides a mechanism for referential integrity.

Upvotes: 1

Related Questions