Skip to main content

Datastore

A flexible, scalable and schemaless NoSQL Document oriented database to store and sync data for client- and server-side development.


Overview

Singlebase Datastore is a schemaless NoSQL Document oriented database, that store data as Documents in Collections in JSON format. It gives you the flexibility to define the fields and data types for each document.

Each Document contains a set of key-value pairs. The Datastore is optimized for storing large collections of small documents, which can contain subcollections and nested objects, both of which can include primitive fields like strings, array/list, object/dict or complex objects like lists.

Collections and documents are created implicitly in Datastore. Simply assign data to a document within a collection. If either the collection or document does not exist, Singlebase Datastore creates it.

To query the Datastore, we provide a simple JSON based Common Query Language. It allows you to query and manipulate the data.


Database

Every project comes with its own Datastore. There is nothing for you to setup.


Documents

A document is a JSON record that contains fields, which map to values. Each document is identified by a _key, that gets added during the creation of the document. Which this _key you can query, update, delete, etc...

{
"_key": "cggrbrb24teflrr24teg",
"_created_at": "",
"_modified_at": null,
"title": "Hello World",
"description": "This is a hello World!!!",
"favorite_colors": [
"blue",
"yellow",
"green",
"black"
]
}


Collections

A Collection is a set of relatable content in JSON format organized by _key which can be queried, updated and deleted.

The content in the collection is called Document. Each document has a unique _key. The _key is created automatically.

Documents can have any set of data, you don't need to have a schema.


Indexes