Schemas

Each domain (Data Abstract Application) within Relativity Server has at least one Schema.

The role of the schema is to define how your client application sees your data. The schema defines all the information the Relativity Server needs to do the mapping between the view you wish your client application to have of the data and what the data actually looks like in the database.

A schema is an XML-based file that defines the data tables used by the application in a structured and well-defined manner. The schema abstracts the actual back-end database and all the details associated with it.

Because all data access is defined in the schema and automatically provided by the Relativity Server at runtime, a middle tier literally needs no custom code, leaving you to concentrate on implementing business rules and your client application instead of investing time in writing data access plumbing.

One of the nice side-effects of Relativity Server's approach of using schemas is that the business logic code is automatically database agnostic and not tied to a specific database system or structure. Your applications can be adapted to target different back-end databases without any code changes and minimal or no changes to the schemas involved.

Adding the Schema

First, you need to create a new schema and call it Tasks.

Expand the DATutorial domain node and double-click the Add new Schema node. A new empty Domain Schema with the default name Schema1 will be added. Select the Schema1 schema node and change its name to Tasks.

Relativity Admin Tool - Add Schema

Press the Open in Schema Modeler button. Schema Modeler will ask for the Administrator password again and then automatically load and open the Tasks Domain Schema. It will also open the Connections window which we will cover in the next page.

Schema Modeler

Data Abstract provides an application called Schema Modeler to let you define the schema for your application visually.

Unsurprisingly, it will be empty right now.

Schema Modeler - Empty Schema