Table Designer
The Table Designer lets you create and modify relational, XML, or object tables. It also lets you create, modify, and drop relational table columns, constraints, and indexes.
This section covers the following topics:
Creating Tables in Oracle Developer Tools
You use the Table Designer to create relational, XML, or object tables. The Oracle Output Window displays the SQL statements that the Table Designer executes, as well as any errors that occurred while saving data. You can view or edit a table's data by using Oracle Data Window.
Starting the Table Designer
Start the Table Designer by using one of the following methods:
-
If you are creating a new table, in Server Explorer, right-click the Tables node and from the menu, select New Relational Table, New XML Table, or New Object Table.
-
If you are modifying an existing table or one of its columns, constraints, or indexes, in Server Explorer, right-click the node for that table under the Tables node, and from the menu, select Design.
The Table Designer appears similar to the following:
Using the Table Designer
The Table Designer has the following components:
-
One of the following depending on table type, respectively Relational, XML, or Object. The Relational table is the default.
In general, to use the Table Designer, make the modifications you need for the table. If you are adding a column, constraint, or index to the table, click Add and then make the necessary modifications in the Details pane. If you are dropping a table component, select the component and click Remove.
Main Window
The main window for Table Designer is as follows:
Control | Description |
---|---|
Schema name |
Select from the list of available schemas in which to create the table. |
Table Name |
Enter the name of the table you want to create. If you are replacing an existing table, this box displays the table's name. |
Table type |
Read-only. Type of the table: Relational, Object or XML. The type of table determines the tabs displayed in the Table Designer:
|
Preview SQL |
Displays the |
Save |
Saves any changes made to the table to the database. Alternatively, you can click the Save button in the Visual Studio toolbar or select Save from the File menu. |
Columns Tab
The Columns tab, which only appears for relational tables, displays the following controls:
Control | Description |
---|---|
Columns |
Lists the available columns and their data types with precision and whether or not they are null. The Column Properties pane displays detailed information about the currently selected column. If the name of a column or data type is too long to appear, you can hold the mouse over it to read the full name. A small key icon is displayed next to the primary key column. Click the up and down arrows to change the order of the columns. |
Add |
Adds a new column to the table and selects it. By default, a new column is named |
Remove |
Drops the selected column from the table. |
Properties |
Displays the following details about the currently selected column:
The following components depend on the type of data type you select:
|
|
|
|
|
|
|
|
Constraints Tab
Use the Constraints tab to edit the constraints of the table. Its controls are as follows:
Control | Description |
---|---|
Constraints |
Lists the constraints on the table and their constraint types. The Constraint Details pane displays detailed information about the currently selected constraint.
|
Constraint Properties |
Displays the following details about the currently select constraint:
|
The following components depend on the type of constraint you select:
|
|
|
Indexes Tab
Use the Indexes tab to create or modify the table's indexes. Its controls are as follows:
Control | Description |
---|---|
Indexes |
Lists the indexes on the table, their index types, and affected columns. The index type can be Bitmap or B-tree. The affected columns are in a comma-delimited list. The Index Details pane displays detailed information about the currently selected index.
|
Index Properties |
Displays the following details about the currently selected index:
|
XML Tab
Use the XML tab to specify the properties of an XML table. Its components are as follows:
Control | Description |
---|---|
Store As |
Specifies how to store the XML. Available choices are:
|
Use XML Schema: |
Specifies whether or not to use an XML schema. This is automatically checked (mandatory) for XML stored as an Object Relational type. For more information on registering XML Schemas with Oracle Database, see XML Schema Designer. |
XML Schema Owner: |
Specifies the owner of the XML Schema. |
XML schema name |
Specifies the XML schema for the column, an XML schema to which the column must conform. Available choices are as follows:
If you specify an XML schema, you must specify an XML Root Element. |
XML root element |
Specifies the XML root element. |
Binary Storage Options: |
Specifies the storage options for binary XML storage. Available in Oracle Database 11.2.0.1 or later. Available choices are:
|
Object Tab
Use the object tab to specify the properties of an object table. Its components are as follows:
Control | Description |
---|---|
Object Type |
Lists the object types that you can select. |
Object Substitutable At All Levels |
Enables substitution at all levels. This means that row objects corresponding to subtypes can be inserted into this object table. Substitution is disabled for all embedded nested tables and arrays. |