Work with Realm Files - Node.js SDK
On this page
Realms are the core data structure used to organize data in Realm Database. At its core, a realm is a collection of the objects that you use in your application, called Realm objects, as well as additional metadata that describe the objects.
Realm Database stores a binary encoded version of every object and type in a
realm in a single
.realm file. The file is located at a specific path that
you define when you open the realm.
Implement Compacting in Your Production Application
Every production application should implement a
callback to periodically reduce the realm file size.
Auxiliary Realm Files
Realm Database creates additional files for each realm. To learn more about these files, see Realm Database Internals.
Use Caution When Deleting Realm Files
In some circumstances, such as a client reset scenario, you might need to delete a realm file and its auxiliary files.
If you delete a realm file or any of its auxiliary files while one or more instances of the realm are open, you might corrupt the realm or disrupt sync.
You may safely delete these files when all instances of a realm are closed. Before you delete a realm file, make sure that you back up any important objects as you will lose all unsynced data in the realm.
You can also open a realm entirely in memory, which will not create a
file or its associated auxiliary files. Instead the SDK stores objects in memory
while the realm is open and discards them immediately when all instances are