Backendless can create tables when you store object hierarchies from a client application. Also, we described how to manually create data tables using Backendless Console.
Finally, there is one more approach that makes table creation as simple as it gets. This approach is by uploading a file that contains a schema definition for every table. The schema definition may include data types for all columns, including the ones for relations.
As a part of our quest to build a restaurant to-go order app, we created all the tables in my Backendless backend. We used the schema export feature which generated a ZIP file with the schema definitions for all the tables used by the app.
The ZIP archive includes a CSV file for every table:
The structure of each CSV file is rather simple. In this case, it contains just the names of the columns and the corresponding data types.
Additionally, they may contain data objects too, but that is described in a separate post. For example, the following are the contents of Location.csv: and Restaurant.csv:
As you can see, every column definition in the files contains the column name and the corresponding data type. Using this approach, we can create all the tables, with columns and relations. The Backendless documentation describes the import file format for defining column names and their types. Follow the instructions below to import the file and create all the tables for the Restaurant app in your backend:
The link to download zip file here is broken: https://backendless.com/documentation/samples/restaurant-app-schema.zip does not exist
Hi Egil,
Thanks for pointing out the error! The link has been replaced so the zip file is available again.