skip to main content
Using the driver : Creating and Customizing Schemas Using the DataDirect Schema Tool : Customizing Your Schema : Mapping Native Objects in a Schema : Mapping Native Objects
  

Try DataDirect Drivers Now
Mapping Native Objects
You can map native objects in your relational schema when you first create a schema map or after you have already created one. In either case, this process is carried out through the Schema Tool Native View dialog.
1. From the Schema Tool's main display, click Add Table(s) button to open the Schema Tool Native View dialog.
A hierarchical view of your native data appears in the window. You can click on nodes to see how objects are nested.
Schema Tool Native View dialog with flatten selected and open nodes
2. Select either Flatten or Normalize. Then select the objects you want to include in your schema.
Flatten has been selected in the following example. A native view of the data is presented. residents corresponds to the native residents collection, address corresponds to an embedded document in the collection, vehicles corresponds to an array in the collection, and so forth.
Schema Tool Native View dialog with flatten selected and open nodes
Normalize has been selected in the following example. Because the Schema Tool handles normalization of objects more than one level deep, you can only select tables when Normalize is selected. However, you can tailor these tables by excluding columns once they have been added to your schema (see Removing Objects from a Schema for details).
Schema Tool Native View dialog with normalize selected and an open node checked
3. Click OK.
The Schema Tool's main display appears.
4. Click the Save button to save your modification of the schema map.
This following example shows how the residents collection has been flattened into the relational RESIDENTS table.
Note: Refer to "Mapping Objects to Tables" in the driver documentation for details on how the Schema Tool flattens data.
main display with flattened view of data
This following example shows how the residents collection has been normalized into a set of parent-child tables.
Note: Refer to "Mapping Objects to Tables" in the driver documentation for details on how the Schema Tool normalizes data.
main display with normalized view of data