Creating APIs‎ > ‎Database Creation‎ > ‎

Managed Database Architecture

This page describes the operation of managed databases and is intended for IT architects.

Interoperable with Database Tools

As with existing databases, you can use familiar database tools to alter your schema.

Note: If you change the schema, you must reload it.

For more information about how to reload the schema, see Database Connectivity.

Schema Creation

When you create a new database (schema), Live API Creator creates a schema with a randomized user, schema, and password. You can change these, depending on your database (for example, you cannot rename MySQL schemas).

Note: If you change the user, schema, or password, you must reload the schema.

For more information about how to change the schema and reload it, see Database Connectivity.

Table Creation

When you create a table, API Creator creates it with the following columns:
  • ident. An autoNum (identity) column.
  • Name. A text field.
In addition, API Creator creates a sample row.

Field Creation

Fields represent the columns in your database. The term field is used to connote the mental model of a physical screen, rather than an abstract database notion. Accordingly, API Creator maps field types to column types, particularized for the target database type. You can determine the fields using the Integrate, Schema page.

For more information about the Integrate, Schema page, see Database Connectivity.

Relationship Creation

Some operations not only create a table, but a one-to-many relationship as well. A Parent Customer has many Child Orders. You create relationships when you add a Detail tab or add a Lookup field. The following image shows the Create Child Table window that opens when you click Add a Child:

Each relationship has two role names. The role names are important since they are used in reactive logic, in JavaScript code, and by Data Explorer. The Parent role name is the name by which the Child accesses the parent. The Child role name is the name by which a Parent access a list of children.

When you create a relationship, you can provide a relationship name. It defaults to OwnedBy, as shown in the following red box.

This relationship name is used to compute the following names:

 Name Computed Example Usage
 Parent Role <relationshipName>_<parent> OwnedBy_Customers parent access (from child row)
 Child Role <relationshipName>_<parent>_List" OwnedBy_Orders_List child access (from parent row)
 Foreign Key <relationshipName>_<random> FK_OwnedBy_$1234$ internal (for DBMS)
 Foreign Key Column <parent>_ident Customers_ident internal (for DMBS)

In complex examples (for example, an Employee might work for one department and be on loan to another), you must alter these defaults so that the foreign key name is unique. You can alter these names as desired using your favorite database tools.

For more information:

Just-In-Time Recompute

You will commonly add derivation rules for new fields. When you do, you must synchronize the data with logic.

For more information about how to synchronize data with logic, see Synchronize Data With Logic.