Structuring Your Database - Orixa Standards and "How To" Guide 

Orixa uses a set of standards to manage the creation of your application (App).
When your App opens it analyizes the contents of your database and system-tables. The structures it sees in the database and the contents of the system-tables will determine the features it builds into your App.

This document summarizes the Orixa framework standards.

The Orixa framework accesses data from data-tables in an ElevateDB database. The framework automates the construction of many complex elements of the user interface, so that users can easily add, edit and view data. Orixa programmers structure their Apps following framework standards and then write SQL scripts which are stored in the "System tables" (these have the names "BusinessObjects", "Reports", "Searches", "Resources", "Types" and "Status"). These SQL scripts control the App and ensure it shows the desired data. 

The full set of rules for creating and decorating an Orixa BusinessObject data-table is quite long. The easiest way to understand it is to look at the definitions of data-tables in an existing system and review how the definition of each table effects how it works. The "Create New BusinessObject" tool automates the options to create almost all the standard Orixa features, so it is not necessary to know them in detail prior to starting to develop and extend your own system. 

Framework elements: Database

Data-table requirements (these rules must be followed for all tables)

Data-table standard columns (these rules are optional)

There are many commonalities in the types of data that are commonly stored in databases. Orixa works hard to try to standardize and normalize the names used by tables, so that the developer does not have to remember the name used for a column in a particular table.

Developers can use any name they like for many columns in the database, but if they follow Orixa standards it will make maintenance and support of the database much easier in the long-run.

Note that Orixa contains tools which will automatically create BusinessObjects which follow Orixa rules, so developers do not need to learn them all exhaustively.

Data-table "Description" automation

The Orixa database includes the capability to "decorate" the definitions of the database elements such as tables, table-colunns, functions, views and procedures etc., with Descriptions. You App reviews these decorations at start-up to help build the rules for your data.

Details of decoration are moderately complicated, and not terribly easy to remember. However, it is always possible to look at the database and review decoration. Your own system is a useful reference-point for starting any new system extension.

SQL Statement:

SELECT Name, TableName, Description 
FROM Information.TableColumns 
WHERE Description IS NOT NULL

If the above statement is run, a grid will open which lists all the Description data which has been used to decorate columns in your system. You can use any of these descriptions on other data-columns to make them adopt a particular feature.

Decorations are included within a "Name-Value Pair" storage format, here are some examples:

[Properties]
SecurityLevelEdit=50
SecurityLevelInsert=80
ReuseLast=1
Distinct=1

In the above example, only users with a "SecurityLevel" above 80 can add a new record to the table, users must have a "SecurityLevel" of 50 to edit a record, when a new record is created the system will automatically give this column the same value that was used in the prior data entry and when the user-entry form is created it will have a "distinct values list" added, this is a list which shows all the other values which have been added to this column, and which allows users to pick entries from this list.

If a field only uses a single decoration there is no need to store it as a name value pair. For example the following Definition is acceptable:

ADD COLUMN Comment VARCHAR(100) DEFAULT 'No Comment' DESCRIPTION 'ReuseLast'

Framework standards: Data-table relationships

Orixa uses the norms of Relational Databases to structure an App. Hopefullly Developers using Orixa will have experience with these, but if not they should review available tutorials on the internet.