This topic highlights the issue how to setup a data table schema. A table schema in Backendless is a collection of table columns. Each column may have the following attributes:
- Column name - identifies the column in the table and becomes a property in the objects saved in the table.
- Data type - determines the type of data which can be stored in the corresponding object property. Available data types are: string (up to 500 characters), text (up to 3000 characters), datetime, integer, double, boolean.
- Default value - when an object is stored and the property does not contain a value, Backendless assigns and stores the specified default value.
- Validator - validates data in the property using either a built-in or custom (regular expression validator).
To access the schema editor tool:
- Login to Backendless console, select an app and click the Data icon.
- Select the table you would like to edit the schema for and click the Table Schema and Permissions button in the upper right corner of the interface.
- Once a developer enters a schema editor tool (which is identified by the Edit Schema menu), it can inspected the existing table columns or add new ones.
- To add a column, click the Add Column button. The following popup will be shown:
6. Click Save to create the column.
Schema management includes a lot more tasks than just creating table columns. In the future posts we will be reviewing the following:
- Configuring validators.
- Configuring default values.
- Renaming/deleting columns and relationships.
- Creating relationships with other data tables.
- Creating relationships with Geo Points.
Review related topic: