7. Setting up Database
This section describes how to set up your first cloud database for storing any app data.
Introduction to Database
The Appery.io platform provides a cloud database to store any app data. The database is a NoSQL database in the cloud. This means you connect to the database from the app via a simple REST API. You can use the database to store anything your app requires, for example:
- Users;
- Customers;
- Orders;
- Locations;
- Inventory;
- Binary data (images);
- And more...
Introduction into Appery.io Database Video Tutorial
If you are just starting with the Appery.io platform and its Database, please check this Appery.io YouTube Education Guide video to start with its basics:
Database Quickstart
Also,if you are new to Appery.io and have no idea how the cloud databases work, our Ionic Quickstart Database Tutorial a good place to start.
Also, you can check this document to learn more about how to work with Appery.io Database and Server Code.
Complete Database REST API.
What database?
Appery.io database is based on MongoDB version 3.2.11.
Dashboard
The Appery.io Database dashboard allows you to manage your database via the web interface. To access this console, go to the database dashboard. On this dashboard, you can:
- Create a new database;
- View the list of existing databases;
- Open and edit a database;
- View statistics and reports for any database or all databases;
- Manage the session token lifetime.
You can also click on the Database link in the App Builder Toolbar to be redirected to the Appery.io Database console:
Total Statistics
The main database page displays total database statistics. The following information about all your databases is available:
- Database size - storage used by all databases;
- Calls to Databases - the total number of all calls to databases;
- Total calls - the total number of all API calls to backend services.
Creating New Database
To create a new database, click the Create new database button and enter the database name and confirm:
You can also create a new database from a backup:
Database Management
If you already have some databases created under your account, you can access them by selecting the needed one:
When inside the database, you can switch between the Collections, Social Connections, Versions, Permissions, Settings, and Statistics frames:
Need More Details?
Below are the links with more details about the Appery.io Database:
Collections,
Social Connections,
Versions,
Permissions,
Settings,
and
Statistics.
Using in an App
To learn how to use and import database services in an app, please jump to the Importing Database Services page.
Please also read about our recommendation on connecting to the database from Server Code script.
Connecting to Database
Appery.io Database is running in the cloud this means that the app will connect to the database via REST APIs. For example, to get a list of users, you would invoke an API. If you need to update or create a user, you would also invoke a REST API.
Server Code Integration
The Database is also integrated with Server Code. Server Code provides JavaScript-based API to access and work with the database.
Want to Know More?
You can also watch our Appery.io Video tutorial describing how to manage REST API in the Appery.io Server Code:
Video: Integrating a New Database Collection with Your Starter Template App
You can also check this YouTube video tutorial that shows how to how to create and customize a database collection for integrating it into the project connected to an API backend (cloud database) and created from the App Starter template:
Updated 9 months ago