====================================== | DATABASE SYSTEMS PROJECT | | Phase III: | | Oracle Database Management System | ====================================== When you hand me this phase or later of the project, always attach updated previous phased to it. Phase III: Create Logical and Physical Database with Oracle DBMS. 1. Use Oracle/SQL*PLUS to create, load and query your database. The following commands should be used or practiced in this phase: (1). CREATE TABLE table_name ...; (2). CREATE VIEW view_name ...; (3). CREATE INDEX idx_name ...; (4). INSERT INTO ... (5). DROP TABLE ... (6). DROP VIEW ... ; (7). COMMIT; (8). ROLLBACK; (9). SELECT (10). DESC (11). System tables such as user_objects, user_indexes, user_tables, tab, col, (12). CREATE or REPLACE FUNCTION ... (13). CREATE or REPLACE PROCEDURE .. (14). CREATE or REPLACE TRIGGER ... (15). DROP PROCEDURE | FUNCTION ... Notice that: The following may be important for generating the major part of your report for this assignment. (1) When you create table and define primary or unique key (not foreign key), Oracle creates indexed for the contraints. You must put all primary, unique and non-unique indexex in the tablespace cs440index. To store the primary key and unique key indexes into an designated tablespace, use USING INDEX TABLESPACE clause. To create non-unique indexes and stored index into designated table space, use CREATE INDEX command with TABLESPACE clause. (2). You may type command interactively first. If there are some errors, use command EDIT, and save the corrected command in a file using line-mode command "WRITE file_name". (3). Use "SPOOL filename" and SPOOL OUT to save all the queries and the results on both screen and a file. Document your statement by editing the output file. The comments are preceded with two dashes. 2. Answer all queries listed in phase II. Beside the queries listed in phase II, you need to add serveral queries, each of them will have one or more of the following features: (1) with Aggregate functions. (2) with GROUP_BY clause without HAVING clause, (3) GROUP_BY clause with HAVING clause, (4) with ORDER_BY, (5) Arithmetic operators: +, -, *, is NULL, IS NOT NULL (6) with outer join. (7) Use SQL*PLUS features such as Title, column formating, break on, set pagesize, save queries results and etc. (8) Outer join, (9) Subquery 3. In your report, (1). Describe the main purpose of SQL*PLUS and funcationality provided by SQL*PLUS. function over dynamic SQL statement. (2). Describe schema objects in your database: Tables, indexes, views, constraints, stored subprograms and etc. Descibe the syntax for create statements Group those statement into subsections. (3). For each relation, list its relation schema and its contents (relation instance). (4). List the queries designe in previous phase and add more new queries so that the following SQL features will be used in some of your queries: - IS [not] NULL, -[NOT] EXISTS, - GROUP BY and Having, - aggregate functions, - sub-select statement, - create a new table from existing table(s) - outer join. 4. Create a subdirectory with your first initial plus at 5 charaters of last name, and other subdirectories to store your SQL statements. cs440 / JDoe .... / \ CRT_LD QUERY | | files for All queries insertions, creations.