Switch to Your Own Database Schema for Business Objects

If you connected your Visual Builder instance to an Oracle database (instead of the default embedded database), you can use your own schema in the tenant database to create business objects.

When you switch to a database such as DBaaS or Autonomous Transaction Processing (ATP), Visual Builder automatically manages the schemas and tables it uses for apps and business objects in your DB. In addition, this will let you build apps that can connect to a schema that already exists in the database and create business objects based on existing DB tables and views.

At the instance level, you can have some apps based on internal tables and some based on external tables, but within a visual app, you can have only one type of business object: either native business objects or those based on existing DB tables and views.

Business objects based on existing DB tables (including those backing materialized views) and views are, in general, similar to native business objects. You can create fields for all existing columns of supported data types (CHAR, VARCHAR, VARCHAR2, NCHAR, NVARCHAR2, NUMBER, BINARY_DOUBLE, BINARY_FLOAT, DATE, and TIMESTAMP without timezone specifications)—though foreign key columns that reference other DB tables need the related business object to be created first. Any foreign key column that links to another DB table can be used to build business object relationships. It's also possible to add calculated fields, business rules, cache control definitions, and security settings, much like what you'd do when working with native business objects.

However, keep these restrictions in mind when creating business objects based on existing schema:
  • The PRIMARY KEY constraint, used to manage a table's primary key, is limited to a single column. Similarly, only single-column unique and foreign keys are supported.
  • Audit fields (that track who created or updated a field when) and the ETag mechanism (that protects against users overwriting changes) are not added automatically as they are in native business objects, but you can set your own fields for auditing based on existing columns.