Answers to Chapter 4

Reviewing It

1: Why does the author recommend using a prefix on all the application database objects?
A1: To quickly identify related application objects when querying DBA_OBJECTS
2: Why does the author use a database trigger to maintain the data in the INSERT_USER, INSERT_DATE, UPDATE_USER, and UPDATE_DATE?
A2: To automatically maintain the data in these fields no matter what tool is used to insert or update these objects
3: Why does the author spool a .log file out of the INSTALL scripts?
A3: To capture any error and/or warning statements issued during the execution of the script
4: What is the ST_INV_SEQ useful for?
A4: To help insure a unique ST_INV_ID in the ST_INVENTORY table
5: What is the difference between an inline and an out-of-line constraint.
A5: An inline constraint is one that is defined where the field that it applies to is defined. An out-of-line constraint is one that is added with separate syntax at a later time.

Checking It

1: An ERD crows foot pointing towards an object means:
  1. The table with the crows foot is a subset of the table at the other end

  2. The table with the crows foot has a 1-to-many relationship with the other object

  3. The table with the crows foot has more rows than the other object

A1: b
2: A straight line in an ERD diagram indicates a one-to-one row relationship between the two objects.

True/False

A2: True
3: Creating multiple tablespaces is useful for:
  1. Tuning the application via distribution

  2. Aid in moving the application to larger computer systems

  3. Allows for different storage parameter defaults

  4. All of the above

A3: d
4: Is SQL*Plus the only tool useful in creating database objects?

True/False

A4: False
5: What is the purpose of :new.inv_insert_user := :old.inv_insert_ user; in the Listing 4.3.
  1. To insure the contents of the INV_INSERT_FIELD does not change

  2. To force the INV_INSERT_FIELD to a new value

  3. To allow for other processes to change the INV_INSERT_FIELD

A5: a.

Applying It

Independent Exercise 1:

  • Download both INSTALL scripts from www.quepublishing.com.

  • Review the Oracle9i directory structure on your computer.

  • Edit INSTALL_Sales_Tracking_Database.sql and validate/change the file locations on the various CREATE TABLESPACE statements

  • Execute the edited INSTALL_Sales_Tracking_Database.sql to create the book example Tablespaces.

  • Review the LOG file for any errors.

Independent Exercise 2:

  • Review the INSTALL_Sales_Trackng_Objects.sql.

  • Execute the INSTALL_Sales_Tracking_Object.sql to create the book example objects.

  • Review the LOG file for any errors.

Independent Exercise 3:

  • Download the EXPORT_Sales_Tracking.dmp file from www.quepublishing.com.

  • IMPORT the EXPORT_Sales_Tracking.dmp file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.211.87