Skip to Main Content
Oracle PL/SQL Programming: A Developer's Workbook
book

Oracle PL/SQL Programming: A Developer's Workbook

by Steven Feuerstein, Andrew Odewahn
May 2000
Intermediate to advanced content levelIntermediate to advanced
594 pages
11h 32m
English
O'Reilly Media, Inc.
Content preview from Oracle PL/SQL Programming: A Developer's Workbook

Intermediate

Q:

9-16.

The statements are:

  1. False. This view lists “database objects” (as opposed to “object objects”) owned by the user, such as tables, procedures, and packages. USER_OBJECTS has been around for quite some time. Now with the Objects option, its name will be confusing.

  2. True. An object type is a database construct, created with a CREATE TYPE statement, and therefore appears in the USER_OBJECTS view.

  3. False. An object instance, which can be a persistent row in an object table or held temporarily in a PL/SQL variable, does not have an entry in USER_OBJECTS. This is consistent with Oracle’s treatment of other rows in (nonobject) tables and values held in (nonobject) PL/SQL variables.

Q:

9-17.

The statements are:

  1. False. The constructor function cannot be modified.

  2. True. The constructor can be called in SQL or PL/SQL.

  3. True. Like other Oracle functions, the constructor can use named notation or positional notation:

    DECLARE
       cd_to_avoid   CD_t;
    BEGIN
       cd_to_avoid := CD_t (
          id => -1000000,
          artist => 'Garth Brooks',
          title => 'Salutes The Chipmunks',
          label => 'Nonesuch' );

    Constructor CD_t is invoked using this named notation.

Q:

9-18.

An object type attribute cannot have a DEFAULT value (e.g., ‘Greatest Hits’). This means that a call to a constructor must supply a value—or the nonvalue NULL—for every attribute of the object type.

Q:

9-19.

The syntax for creating an object type specification is a comma-separated list of attributes and methods; you do not use semicolons in the list, as you’d find in ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Database 12c PL/SQL Programming

Oracle Database 12c PL/SQL Programming

Michael McLaughlin
Oracle PL/SQL for DBAs

Oracle PL/SQL for DBAs

Arup Nanda, Steven Feuerstein
Oracle PL/SQL For Dummies

Oracle PL/SQL For Dummies

Michael Rosenblum, Paul Dorsey

Publisher Resources

ISBN: 9781449324070Supplemental ContentErrata Page