
Chapter 12 DBMS-Specific Features
Object and SQLJ object data types
Oracle v8 and higher allows you to specify a table type of "Object", and to base the table on an object or SQLJ object abstract data type, so that the table uses the properties of the ADT and the ADT attributes become table columns.
For more information on ADTs, see your Oracle documentation.
To create an object (or SQLJ object) data type:
- Select Model→Abstract Data Types to open the List of Abstract Data Types, and click the Add a Row tool. Enter a name for the new ADT, and click the Properties tool to open its property sheet.
- Select OBJECT or SQLJ_OBJECT from the Type list.
Additional Attributes and Procedures tabs are displayed in the ADT property sheet.
- Click the Attributes tab, and create as many attributes, specifying a name, a code, and a data type for each.
- Click OK to close the property sheet and return to your model.
Now that you have created your new data type, you can base tables on it.
To base a table on an object (or SQLJ object) data type:
- Open a table property sheet, and select Object in the Type list.
- Select the new object (or SQLJ object) data type in the Based on list.
- Click OK to close the property sheet and return to your model.
|
Copyright (C) 2008. Sybase Inc. All rights reserved.
|
|