Collection Types
Macrometa's GDN offers 4 NoSQL data models, referred to as 'Collections'. We will review these different collection types and how they are created and managed in the GDN Console. Collections can be created by clicking on the ‘Collections’ tab on the left of the Macrometa GUI Console to display the page shown below:
Click to open the image in a new tab.
Click the ‘New Collection’ button. A window will pop up displaying collection types: Key-value Store, Document Store, Dynamo Table, and Graph Edge.
Click to open the image in a new tab.
- New Collection:
A button to create a collection by selecting one of the four available options.
Document collection:
To create a new document collection, click on the ‘Document Store’ collection option.
Give the collection a name and Geo Distribution type. The collection stream can be enabled now or after the collection is created.
Click to open the image in a new tab.
- Collection name:
A unique name to distinguish the collection. - Geo Distribution:
Selection for Global or Local data storage. - Enable Collection Stream:
Checkbox to enable collection stream. - Create:
Button to create the document collection.
Default Document Creation:
By default, a new document has only one attribute, _key. Defining the document _key attribute is optional. If not specified it will be autogenerated.
Click to open the image in a new tab.
More information about Document Collections is available here:
Macrometa GDN | Document Collections.
Key-Value Collection:
The Key-Value Collection type contains different configuration options. The Expiration toggle button enables setting an expiration date during document creation.
Click to open the image in a new tab.
- Name:
A unique name to distinguish the collection.
- Expiration
Enable expiration. This allows key-value documents to be removed at a certain datetime.
- Enable Collection Stream
Checkbox to enable collection stream.
- Create
Button to create the collection.
Default Key-Value pair creation:
Required values are Value and Expiration, if expiration was enabled curing collection creation. The _key value is optional and will be autogenerated if not defined by the user.
Click to open the image in a new tab.
- _key:
Key is an optional field to be added by user or it can be autogenerated if left blank. - Value:
Field for indication of individual document values. - Expiration:
Set a date and time for a Key-Value Pair to be deleted from the collection - Create
Button to create the default key-value collection.
More information about Key-Value Collections is available here:
Macrometa GDN | Document Collections.
Dynamo Table
Dynamo Table collection is available for AWS Dynamo Database users. Macrometa’s platform can be used as a data store to acquire Global data distribution within milliseconds. To switch to GDN, the user need to change the connection URL, AccessKey, and SecretKey. AWS Dynamo DB SDK and CLI are compatible. Geo Distribution is set to Global by default.
Click to open the image in a new tab.
- Table Name:
A unique name for the dynamo table.
- Partition Key:
Similar to a Primary Key. This field is required, the key is not autogenerated.
- Sorting Key:
An optional key for creating a composite key in combination with the Partion Key.
- Create secondary Index:
Add a secondary Partion and/or Sort Key that differ from the base table.
- Create:
Button to create the Dynamo Mode Collection.
Graph Edge Collection
The Graph Edge Collection is a form of document collection. It is used define relationships between two documents by using the _from and _to system attributes and the document _id system attribute.
Click to open the image in a new tab.
- Collection name:
A unique name to distinguish the collection.
- Geo Distribution:
Selection for Global or Local data storage.
- Enable Collection Stream:
Checkbox to enable collection stream.
- Create:
Button to create the Graph Edge collection.
Default Edge document creation:
Default edge document creation involves following steps:
Click to open the image in a new tab.
- _from:
Document _id from which the relationship originates.
- _to:
Document _id to which the relationship is defined.
- _key:
Key is an optional field to be added by user or it can be autogenerated if left blank.
Comments
0 comments
Please sign in to leave a comment.