User Guide : 7. Working with Tables : Creating Tables : Create a Table
 
Share this page                  
Create a Table
You create new tables in a specific database using the Instance Explorer and the New Table MDI tab (see New Table Interface). Before you can create a table, the installation containing the database must be connected in the Instance Explorer.
For more information about how to create a table from a SELECT statement, see Create a Table Using a Select Statement.
Important!  After you have successfully created and saved a new table, you cannot make further changes to it. Carefully specify your table and column settings before creating the table in Director.
To create a table
1. Drill down through the connected installation in the Instance Explorer, open the Databases folder, and expand the database in which you want to create the table.
2. Right-click on the Tables folder and select New Table from the context menu.
The new table is displayed in the tabbed MDI (see New Table Interface).
3. Enter a table name in the Name field.
For more information, see Table Properties.
4. Select a structure from the drop-down.
5. Select the placeholder row, right-click, and select Insert Column from the context menu.
To insert columns, see Insert a Column.
To delete columns, see Delete a Column.
6. In the column row just created, click in the various fields and specify the following for each column in the table:
Column name
Data type
Nullability
Default
For more information, see Configuring Columns.
7. Add and specify more columns, if desired.
8. Assign primary keys (see Assign Primary Keys).
9. Click Home, Save or click the Save button in the lower right corner of the document to save the table (see Save a Table) .
The table is no longer editable.
Specify Locations
When creating a new table, you may specify the particular DATA locations at the table or column level. You may type in locations or select them from the Select Locations dialog.
To specify locations
1. Select the Specify locations option on the new table tab.
Location options are displayed.
2. Specify the location type:
Table level: Enter at least one DATA location in the Table Location(s) field, or click Select (pencil image) to open the Select Locations Dialog.
Column level: Enter at least one DATA location in the Default Column Location(s) field, or click Select (pencil image) to open the Select Locations Dialog.
Specify the location for each column in the Columns grid, Location field. You may type in a DATA location or click the ellipsis button next to the Location field to open the Select Locations dialog. For more information, see Configuring Columns.
Partition the Table
When creating a new table, you may specify that the table be partitioned. You must choose the column or columns to partition on and then create one or more partition specifications.
Because you must select columns to partition on, you must create the columns first. For more information, see Insert a Column.
To partition the table
1. Select the Partition the table option on the new table tab.
Partitioning options are displayed.
2. Specify the partitioning rule to use by selecting it from the drop-down. For example, HASH.
3. Specify the columns on which to partition.
You may click the Columns button to select the columns. (This button is enabled only if one or more columns already have been specified for the table.) It opens the Partition Column(s) dialog, where you may select columns on which to partition.
4. Click Add to create a partition specification.
The Partition Specification dialog opens:
a. Specify the number of partitions.
b. Choose whether to override the default partition names (part1, part2, and so on).
To override the default names, edit the Name column in the Names section of the dialog. Enter the partition names you want to use for each partition.
c. Choose whether you want to specify the location for the partition.
To specify the location for this column, select the DATA location from the dropdown.
d. Click OK to save your selections, or Cancel to discard them.
The partition specification is listed in the Partitions field. Any validation messages are displayed below the Partitions list.
5. Click Add to create more partition specifications.
6. To edit a partition specification, select it in the list and click Edit.
7. To delete a partition specification, select it in the list and click Remove.
A partition checkbox is added to end of the row in the Columns grid so that you can enable or disable partitioning on that column.