Chapter 3 Building Physical Diagrams


Creating an object (or a SQLJ object) abstract data type

When you select the type OBJECT (or SQLJ OBJECT) for an abstract data type, an Attributes tab and a Procedures tab are added to the property sheet of the abstract data type:

Procedure inheritance

An object abstract data type with a supertype can inherit non-final procedures. You can use the Inherit Procedure tool in the Procedures page of the abstract data type to select a non-final procedure from a parent abstract data type. Inheritance only applies to non-finale procedures.

Object example

For example, you want to create an Address object with Street, City, and ZipCode attributes, and a Location procedure.

Steps To create an object (or a SQLJ object) abstract data type:

  1. Select Model→Abstract Data Types to display the List of Abstract Data Types.
  2. Click a new line in the list.

    or

    Click the Add a Row tool.

    An arrow appears at the beginning of the line.
  3. Type an abstract data type name and code.
  4. Click Apply to commit the creation of the new abstract data type.
  5. Click the Properties tool.

    or

    Double-click the arrow at the beginning of the line.

    The property sheet of the abstract data type opens to the General page.
  6. In the Type dropdown lisbox, select OBJECT (or SQLJ_OBJECT).

    The Attributes and Procedures tabs appear in the property sheet of the abstract data type.
  7. Click the Attributes tab to display the Attributes page.
  8. Click a blank line in the list.
  9. Type an attribute Name and Code.
  10. Select a data type class from the Data Type dropdown listbox.

    Note   Display the column you need
    If you do not see the column you need, display it with the Customize Columns and Filter tool.

  11. Repeat steps 8 to 10 for every object attribute you want to define for the abstract data type.


    For each attribute, you can check the Mandatory (M) column.
  12. Click the Procedures tab to display the Procedures page.
  13. Click a blank line in the list.
  14. Type a procedure Name and Code.


    For each procedure, you can check the Final (F), Static (S) and Abstract (A) columns.
  15. Click OK in each of the dialog boxes.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.