Collections
A collection can be empty or contain documents. Macrometa GDN is schemaless, so you do not need to define valid document attributes. Documents with completely different structures can be stored in the same collection.
Global or Local Collections
Document collections can be created as local or global collections.
- A local collection stores its data in one region and does not replicate to other regions. You can create a local collection in any specified region. Best practice is to use a region-specific API endpoint when interacting with local collections. If a user sends a request to a local collection without being routed to the appropriate region, the request will fail.
- A global collection replicates its data and maintains state and consistency across all regions in the GeoFabric.
Collection Types
Macrometa offers several types of collections.
- A Document Store is a NoSQL database that stores data in JSON format (JavaScript Object Notation). For more information, refer to What is a document database?
- A Key-Value Store contains documents in which each document stored in a collection contains a
_key
, and the rest of the document is its value. For more information, refer to Key-Value Databases. - A Dynamo Table collection allows you to use AWS Dynamo Database with Macrometa as a datastore.
- A Graph Edge collection stores edge documents (or edges) that define a relationship between other documents with the
_from
and_to
values. A vertex is a document collection that contains graphs. For more information, refer to What is a graph database?