Class Test 08
1. Create the tables given below with all given specifications and insert the given data in the created
tables. Use sequences to create primary key values. Create one index for each table manually.
Both tables must have a synonymous name.
Table: Department
Table: Teacher
2. There are 3 roles in this database i.e. Director, Head and Teacher. The role Director has access to
all tables and has the credentials to all system and object privileges. Sam (Password: dean) is the
Director. The role Head can only update and see all data. Sheldon(Password: amy) is the Head.
The role Teacher can only see all data. Oliver(Password: twist), Emma (Password: henry) and Harry
(Password: ginny) are all teachers.
3. Create a complex view that displays the employee name and the name of the department they
work in.
Hints:
1. From System’s user account create all the users and roles
2. From Director’s user account perform all DDL and DML operations for the tables
Department and Teacher
**Solve the above questions (1 to 3) with SQL. Write down the answer and give
screenshot of the results of the query in a MS Word document. You must use Oracle
10g. The name of the document MUST be your ID (solutions MUST be numbered
accordingly) and upload it in the provided link in your VUES account
**You can access AdvanceSQLTutorial (uploaded during midterm) from the notes
section of your VUES student account as a reference point for this CT