Data Service API Overview¶
The Backendless Data Service is a highly scalable object storage system. The system has the qualities of both a traditional structured/relational (SQL) storage and an unstructured NoSQL database. Objects are stored in tables, which have columns with assigned data types. A table can be created dynamically, when an object is being persisted and there is no table corresponding to the object's type. Similarly, when an object is saved or updated and contains properties which do not have corresponding columns, Backendless dynamically creates the columns in the table.
Database Object Format¶
There are two formats for representing data objects: using custom classes or using dictionaries. With the custom class approach all properties of a class are mapped to data table columns. Instances of class are saved in a data table with the same name as the name of the class. When using dictionaries, objects are structured as key/value pairs where keys identify column names and values their respective values. See the Data Object section for additional details.
Data Service supports table relations which means a table may declare a column referencing another table. At the object level it is implemented through an object property which contains a reference to another object (one to one relation) or a collection of objects (one to many relations). When an object is retrieved from the server, its related objects can be retrieved in the same request (single-step retrieval) or later on through a separate request (two-step retrieval).
Object search in Backendless can be done using the SQL syntax. A search request is sent to a specific table and a search query identifies a condition the found object must match. As a result, the query must be the format of what goes into the WHERE clause of a traditional SQL query. For more details see the Search with the Where clause section of the guide.
As objects are created, updated or deleted in the database, Backendless can deliver events in real-time to the registered listeners notifying about changes in the database. The real-time system allows synchronization between the client-side of your application and the database without any additional API requests. The Real-Time Database functionality is available only when using Backendless SDK for Android, iOS, JS and .NET.To learn more see the Real-Time Database section of the guide.