skip to main content
Using the driver : Creating and Customizing Schemas Using the DataDirect Schema Tool : Creating a Schema with the Table Wizard : Generating a Flattened View
  

Try DataDirect Drivers Now
Generating a Flattened View
After you open the Table Wizard according to the instructions in Starting the Schema Tool, you can generate a flattened view of your database by taking the following steps:
1. Select Flattened View under Select an initial view for your data in the Table Wizard window.
The Table Wizard presents a graphic which shows how objects, such as subdocuments and arrays, are flattened into a relational structure.
table wizard landing page with flattened selected
2. Click OK to generate the flattened schema.
The Schema Tool's main display appears with the flattened view of your data in the left-hand panel.
Note: If you want to change the initial view of your data later, select File>Restart Wizard from the Table Wizard dialog. Be aware that restarting the wizard overwrites any customizations you have made to your schema map. See Restarting the Wizard for more information.
3. Click the Save button to save the schema.
4. Click database and table nodes to tour the flattened schema structure.
A flattened view of your data has been generated and saved. The Schema Tool's main display appears with a flattened view of your data in the left-hand panel:
main display with flattened schema and open nodes
The Table Wizard has decomposed each collection into a relational table. The _id field is mapped as a primary key column and denoted with the icon. Fields with simple types, such as address and name, are mapped as the corresponding columns ADDRESS and NAME. Subdocuments are flattened into columns using the <objectname>_<fieldname> pattern, and nested arrays are flattened into columns using the <arrayname>_<arrayindex> pattern. For more information on relational mapping, refer to "Mapping Objects to Tables" in the driver documentation.
Depending on your work flow, you can now proceed with customizing the schema. See Customizing Your Schema for details.