Creating a back-end database with

Apps with database back-end are at the center of enterprise applications. provides means to create a database as well as work with many other databases as well.

In this post the procedure to create a simple database followed by adding a column and couple of columns is described. In so far as database is accessed by client using server side code, the's interface is used to create server side code and testing it using the same interface,

You can start here if you like. You may have to insert your credentials.

This opens the page as shown.


 Creating a database:

Click Create new database.
 In the Create new database window provide a name such as the one shown and click Create.


After a little while you should see this web page.


Creating a Collection:
Jay4_2017 database data will be held in a Collection.
Click Create new collection.


Enter a name for the collection, say Goods and Click Add.

The Collection page for Goods is displayed as shown.


The new collection has a user interface for adding,deleting, columns, rows and editing them

Creating a Column:

Click +Col to display the Add new column dialogue as shown.


For Name enter Item and keep Type as string. You can also choose any of the other available type.


Click Create column.

Column gets created as shown. The collection has no data but has a column named Item.


Populate the column with data by adding a row:
Click +Row 

The pages is refreshed to show an interface to add a row. For item field insert Cold drink. Click +Row to add more columns.


 This is all for now. The database has one column containing 3 rows of data of type String.
The database is accessed by clients using Server Code.

This is how you create server code:

Click Server Code button to open the interface as shown.


Presently there are no scripts. Click Create script button to open the following page:


Provide a name for the script- loadGoodsScript


Click Save.

Under Snippets on the right hand side locate retrieveAllObjects as shown.


 Click insert to insert the snippet (template code) as shown (you may have remove the existing code in the script editor).


dbId and collectionName are place holders and you need to find these to provide.
Click Save.

Finding dbID:

Go to Database and click Jan4_2017 database. In the Databases page locate Settings as shown here.


 Click Settings.

Database settings will be open as shown.


Read the Session expiration information.
copy the API keys

The loadGoodsScript should appear as shown.


Insert responseSuccess snippet from Snippets. The script editor should appear as shown.


Click Save.

You are ready to test the database.

Testing the Collection:

In the Server Code page click Save and Run  and return. You get the following response.


It returns the entire collection in JSON format as shown above.

Post a Comment

Popular posts from this blog

Develop a Side Menu App using Intel XDK - Part 1

UWP: XAML's ListView Control and its SelectionChanged event - Part 1

Setting up Kid's Corner on Windows 10 Phone