Teams, Submission Instructions, Grading
In this project, you will learn about some of the object-relational features of the Oracle 10g database management system. You will incorporate some of these features in your Project 1 database schema - you will not need to expand your front-end even if you followed the Web Front-End Option for Project 1.
Oracle 10g provides several object-relational (OR) features that we ask you to explore in this project. You can find supporting documentation on these features in the Oracle Database Application Developer's Guide--Object-Relational Features. Start by reading the "Introduction to Oracle Objects" section of the Oracle manual to get a general view of the key features supported and get familiar with the terminology. Then proceed to the "Basic Components of Oracle Objects" section. The document describes OR features such as object types (also known as row types, see Section 23.2 of the textbook), object references (OIDs, REFs; see Section 23.6 of the textbook), varrays (see Section 23.2 of the textbook), and how you define methods (Section 23.4.1 of the textbook) and inheritance (Section 23.5 of the textbook).
In particular, the following features are of importance to this assignment:
For Project 2, we ask you to modify your Project 1.3 schema so that your new schema includes the following:
If you have chosen the web front-end option, you will not demonstrate or expand the web front-end; rather you will modify your database schema and demonstrate the use of OR feature with the 3 queries mentioned in Item 4 above.
Your grade will depend on whether you use the OR features in a natural and meaningful way. We suggest that you do not dramatically change your original relational schema. Simple (but meaningful) changes will do the job. Also, while you are designing an object-relational schema for this project, the design guidelines that you learned earlier in the course still apply: for example, you should include the appropriate primary keys from your Project 1.3 and enforce referential integrity as well as other constraints as much as possible. We encourage you to discuss your modifications to your original schema with your mentor.
We encourage you not to delete your Project 1 schema from your Oracle account in order to do Project 2, in case we need to revisit it for whatever reason later in the semester. For your Project 2 submission, however, please make sure that you only export the schema tables, etc. corresponding to Project 2 and not those for Project 1. Specifically, when you run the exp export utility, you should only list the Project 2 tables in the command line (see item 1 in the "What to Submit" section, below).
If you choose to implement object methods, you are not required to know PL/SQL (Oracle's server-based procedural extension to SQL) in order to complete this assignment. The object types and methods that you implement for this project will generally fit the following template, but you will most likely have to return more complex SQL expressions, of course; in particular, note that attr_1 + attr_2 in the return statement may be replaced by any valid expression that may appear in a SELECT clause (e.g., the result of an arithmetic operation, a call to an aggregate function, a SQL case statement, etc.).
create type my_typ as object (
attr_1 number,
attr_2 number,
member function My_Function return number
);
/
create or replace type body my_typ as
member function My_Function return number is
begin
return attr_1 + attr_2;
end;
end;
/
To populate your object-relational database, you may either load your data directly into to your tables or, it may be more convenient to read your data from your existing tables from Project 1 and insert them into your object-relational schema using SQL insert statements. Alternatively, if your data reside in a file in a comma-delimited format, the easiest way to load the file into your database is to use the Oracle SQL*Loader utility that we mentioned in Part 2 of Project 1. You may use any of these options to populate part or all of your schema. In any case, you will not be graded on the method you used to populate your schema, and you do not need to submit your load scripts with the project.
You will carry out this project in teams of two. Since this project expands on the database schema of your Project 1, the simplest way to carry out this project is to work with the same teammate and mentor as for Project 1. Both students in the team will receive the same grade.
However, you are free to switch teammates if there is a problem with your existing teammate that makes it impossible to continue working as a team (e.g., you teammate dropped the course). In this case, you and your new teammate will need to decide whether to expand your schema or your new teammate's schema. In addition, you will need to inform right away your old teammate (if still in class) as well as the mentors involved telling them your decision on which schema your new team will be working on. To make any change on your team composition, you need to get explicit permission from your mentor by Wednesday April 17 at 5:00pm.
Your grade will be based on the following factors: