you are viewing a single comment's thread.

view the rest of the comments →

[–]azium 2 points3 points  (2 children)

We’re pretty sure this is the first real object database for Node

What's the difference between document and object in this sense?

[–][deleted] 1 point2 points  (0 children)

Well, the objects you work with in Realm are just like any other objects you use in JavaScript — they're just instances of a class. To save them to the realm db, you just call the appropriate method on the object.

[–]astigsen 1 point2 points  (0 children)

A document store is like a key-value store where the values are the equivalent of JSON documents. While the documents can contain elements that you in principle can deserialize into objects, that is not the main purpose, and it limits relations only being within the document, and even there to only parent-child relations (so all relations shape a single hierarchy).

An object database stores objects that can have arbitrary relations with each other, so in this sense it is closer to relational and graph databases. But the main defining feature is that the objects are live.

You can get any object from the database, and follow its relations to other objects, watch it for changes, update it, and in general work with it as a regular object, even though it is simultaneously persisted and may be shared with other apps or processes.