Child pages
  • Persist your content
Skip to end of metadata
Go to start of metadata

No SQL persistence

Apstrata relieves you from having to create a relational database, defining tables or manipulating DDL or SQL. You are provided with a ready to use store, within which you create documents. Documents have a key/value pairs structure, where the key is a field name and the value can have one of the following types: string, numeric, text, date, file or geospatial.

To create or update a document, just invoke the SaveDocument API and pass it the key/value pairs that you need to create or update. When you create a document, Apstrata generates a document key for you if you did not specify one and returns it in the response of the call to SaveDocument. The document key is the unique identifier of the document in your store: use it to retrieve the document or to update it.

Back to the map       Next station: query your content

Example 1: save my game

Let us say that you are implementing a cool game that runs on mobile devices, such as smartphones or tablets. Since a user could run this game on any of his devices, it is better to persist the data of the current game, such as the score, the count of remaining lives, the current level and the player's name, in a central and shared location. So let us create an Apstrata document in your store for that.

 

Navitabs License Error

The number of licensed users is incompatible with the number of licensed users of Confluence. Please contact your system administrator.

License Details
Try it!

Example 2: update my game

Your app user decides to take a short break and stop playing. We thus need to persist the current status of his game and hence update the Apstrata document created in example 1, by passing a new value for the "score", the "level" and "lives" fields (we assume that the document key obtained upon creation of the document was "C4E11A5C2A96B94C12F5C4F5AA44C4CF").

 

Navitabs License Error

The number of licensed users is incompatible with the number of licensed users of Confluence. Please contact your system administrator.

License Details
Try it!

Dig deeper

Related tutorials