COMP7120 Database Systems II: Final Examination, Spring 2001

Name:                                                                           SSN:


For JDBC programs, the following part can be skipped:
   import  java.sql.*;
   import  java.io.*;
   import  oracle.sql.*;
   import  oracle.jdbc.driver.*;
   ...
      DriverManager.registerDriver (
         new  oracle.jdbc.driver.OracleDriver ( ));
      Connection  conn = DriverManager.getConnection (
         "jdbc:oracle:oci8:@csedb", "ops$userid", "password");
    

          select * from person where age > 50;
        
  1. (OODB Language) If an employee IsA person, the above query may result in heterogeneous sets.       (8%)
























  2. (Inheritance) Inheritance conflicts may occur when a class has two immediate superclasses. Explain the three methods to solve the issue of inheritance conflicts.       (8%)














































  3.    classA:            [attr: classC];
       classB IsA classA: [attr: classD];
        
  4. (Safety) Explain why the type of a redefined attribute must be a subtype of the type of the original attribute, e.g., the classD IsA classC.       (8%)























  5. (DOM) Explain how the Trader mediator works in a DOM system.       (8%)



















  6. (ORB) What are the differences between the ORB and RPC (Remote Procedure Call)?       (8%)























  7.     create type book_typ as object (
           title     char(32),
           author    char(32) );
    
        create table book of book_typ;
        
  8. (JDBC and Stored Procedures) Give a JDBC program list.java which responds to the query from the following interface. The list.java contains a stored procedure which includes all the SQL commands of the list.java.       (14%)
























































  9. (Integrity Constraints and JDBC)       (16%)




































































  10. (Trigger and JDBC)       (12%)


















































  11. Sample values of a relational student enrollment database, of which sid, cno, and (cno, sid) are the primary keys of tables S: students, C: courses, and E: enrollment, respectively.

  12. (Integrity Constraints, Views, and Security)