This preview shows pages 1–4. Sign up to view the full content.
Object-Relational Features of Oracle 8 Contents Defining Types Dropping Types Constructing Objects Methods Queries Involving Types Declaring Types For Relations References Nested Tables Nested Tables of References Converting Relations to Object-Relations References Defining Types Oracle 8 allows us to define types similar to the types of SQL3. The syntax is CREATE TYPE t AS OBJECT ( list of attributes and methods ); / Note the slash at the end, needed to get Oracle to process the type definition. For example here is a definition of a point type consisting of two numbers: CREATE TYPE PointType AS OBJECT ( x NUMBER, y NUMBER ); / An object type can be used like any other type in further declarations of object-types or table-types. For instance, we might define a line type by: CREATE TYPE LineType AS OBJECT ( end1 PointType, end2 PointType
has intentionally blurred sections.
Sign up to view the full version.