com
APIs / Basics/↴
Persistence and Query Concepts

AmiDb offers insert, delete, list, search and file services over http/s. The following explains the key building blocks that need to be understood before trying out other APIs.

Model

This is very similar to a database table. The developer defines a model, say "Store", identifying the following:

  • Persistence scope - Whether the data is stored by your customer ([email protected]), a section of your application (sports) or yourself ([email protected])
    • Pscope: O - Username scope
    • Pscope: C - Container scope
    • Pscope: T - Tenant scope
  • Engine - What type of engine you want to use. Supported are Cassandra and Elasticsearch.
  • Names - Similar to column names in a database table.
  • Types - The type of the data. One of string, integer, long, float, double, map and list.

AmiDb does not introduce another query language

AmiDb acts as a pass through allowing developers to use the query language of the underlying engine. This frees developers from having to learn something new or locking them into a new query language.

Restful - IDLS operations

Rows can be inserted, deleted, listed and searched (IDLS) using REST APIs.

Attachment Key (_ak)

Every row has a pointer that acts as its alias and is called the attachment key (_ak)

Attachments

Attachments (files) can be added to any row. A row can have one more attachments.

Expiry and notifications

Every row can be marked to expire after a certain time. An expired row is auto-deleted and notified to the URL defined in the model.

Life Cycle

Add a model. Add one or more rows to the model. Add one or more files (attachments) to the row. When a model is deleted all related rows are also deleted. When a row is deleted all related files are also deleted.