Define RPS Mapping
The RPS Mapping defines the classes and attributes to be used in the RDB and the tables and columns to which these will map. The table and column definitions will later be extracted and loaded into the RDB.
-
Bring up the JADE development environment for the primary database.
-
Start the JADE Database Server.
-
Start the JADE Application Server.
-
Start the JADE Presentation Client.
The RPS Mapping is defined from the JADE development environment.
-
-
Select the model schema.
-
From the Schema Browser, click on ErewhonInvestmentsModelSchema.
The RPS Mapping is defined in the model schema because this schema contains all persistent class definitions.
-
-
To add or change the RPS mapping:
-
Select Browse | RPS Mappings.
-
Right-click on ErewhonRPS in the Relational Population Service Browser and then select Change.
ErewhonRPS was already defined in the Erewhon schema that you loaded. This definition can be customized as follows. Alternatively, you could define a new RPS mapping.
-
-
In the Define RPS sheet of the Relational Population Service wizard, the Database Type combo box value specifies the target RDB type (your RDB must be the specified type and version, or later) as well as the data type mappings that are used to convert JADE types to RDB types.
-
Select the SQL Server version that you require.
-
-
Set the Per Statement Exception Policy create, update, and delete values.
-
Leave the Halt default value setting for each of these.
If an exception occurs when creating, updating, or deleting a row in the RDB, the Halt value causes the transaction to be aborted and database tracking to cease.
-
-
Set the Logging Options value.
-
Leave the Default value setting.
Exceptions are logged to the jommsg.log file by default. If selected, the RPSTable value also records exception information in a table in the RDB.
-
-
Set the OID Mapping Options (where OID stands for Object Identifier) value.
-
Select the Split Into Columns Int/BigInt value setting, which splits OIDs into two integer values containing the class number and instance identifier whilst accommodating both large class numbers and instance identifiers.
If selected, the Map to String (7.1 format) value maps to a 28‑character fixed‑length string and the Split Into Columns Int/Int value splits OIDs into two integer values containing the class number and instance identifier.
The Split Into Columns Int/Int format may limit class number and instance identifier values.
-
-
Set the Default Database Name.
-
Enter Erewhon.
This is the name of the target RDB, which will be used when the RDB is set up, described under "Create Relational Database", later in this document.
-
-
Set the Default Connection String value. Do not enclose the string in quotes.
-
Enter DSN=SQLServerODBC; Database=Erewhon.
This is the connection string, including the ODBC DSN name, for the target RDB. The ODBC definition will be set up later, described under "Create a New ODBC Data Source", later in this document. This is required for the RPS database to connect to the SQL Server database.
-
-
Set the Default Connection Usercode and Default Connection Password values.
-
Leave these values blank.
If specified, this user code and password are used on the RPS node to connect to the RDB. They can also be overridden from the RPS node. They are left blank here, as later steps specify that Windows Authentication will be used to connect to the RDB.
-
-
Set the Select Top Most Schema value.
-
Leave the default ErewhonInvestmentsModelSchema value setting.
All persistent classes in the Erewhon system are defined in the model schema, so this is the highest‑level schema required for the mapping.
-
-
Set the Show Virtual Properties and Show Methods values.
-
Leave the default Do Not Show Virtual Properties and Do Not Show Methods values.
If you do want to display virtual properties and methods, select the Show Virtual Properties and Show Methods values, respectively.
-
-
Set the Show Many To Many Properties value.
-
Leave the default Do Not Show Many To Many Properties setting if you do not want to map many‑to‑many inverse properties.
If you do want to select the collections to be mapped to junction tables, select the Show Many To Many Properties value.
-
-
Go to the Select Classes for RPS sheet of the wizard, by clicking Next >.
-
Select the classes that are to be mapped to tables in the RDB.
-
No action is required, as classes are already selected.
The selected classes are listed in the Selected Classes list box. Further classes can be added from the Available Classes list box or removed from the Selected Classes list box. Only user‑defined classes that can have persistent instances are available for inclusion in the RPS mapping.
-
-
Go to the Map Classes to Tables sheet of the wizard, by clicking Next >.
-
Map the selected classes to the tables required in the RDB.
-
No action is required, as classes are already mapped.
You can change the mapped table name for each class, by entering a new name in the relevant Table column cell. The name must be valid in the RDB, with a maximum length of 100 characters.
You can select the:
-
Excluded value if you want to exclude the table from RPS replication but retain the table in the RPS mapping definition.
-
Output Callback value if you want output for a table to be passed to your application before being replicated to the RDB. To avoid unnecessary callback processing, you should select the Output Callback value only if required.
In the Update Mode columns, when:
-
In Historical Mode, object updates and deletes are mapped to a new row in the target table.
-
Not in historical mode, an object update or delete will update or delete the corresponding row.
-
The No Delete value is selected, object deletes are not propagated to the target RDB.
The existing definition has mapped subclasses to the same table as their superclass. This was done from the Map SubClasses to this Class Map right‑click menu item.
-
-
Go to the Select Columns for Tables sheet of the wizard, by clicking Next >.
-
Select the features that are to be mapped to columns in the RDB.
-
No action is required, as properties are already selected.
The properties for the selected table/class are listed in the Features list box. You can add or remove properties, by clicking the relevant check boxes.
-
-
Go to the RPS Column Mapping sheet of the wizard, by clicking Next >.
-
Map the selected attributes to the columns required in the RDB.
-
No action is required, as attributes are already mapped.
You can change the mapped column name, mapping type, ID, and key for each feature, by entering a new value in the relevant row and column. To see the features for one table at a time, select the View Selected Table value. By default, the primary key for all tables is the OID.
-
-
Go to the Summary and Build sheet of the wizard, by clicking Next >.
-
Check the details and finalize the RPS mapping.
-
Check that the details listed are correct and then click Finish.
This completes the RPS mapping changes.
-
-
Reorganize the database, if required.
-
Select the ErewhonInvestmentsModelSchema schema.
If a reorganization is required, the Schema Browser window will display two ErewhonInvestmentsModelSchema items. One of the items will have a highlighted background – this is the item that you should select.
-
When the reorganization has completed, click OK.
-