Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CST 8 2 7 6 - Advanced Database Topics Assignment 3 : Implementing Data Integrity and Security ( 1 0 % ) This assignment relates

CST8276- Advanced Database Topics
Assignment 3: Implementing Data Integrity and Security (10%)
This assignment relates to the following Course Learning Requirements:
CLR 2- Administer a DBMS using knowledge of SQL, database security features, globalization and database architecture (storage, memory and processes)
CLR 3- Manage database system security and privacy controls
CLR 6- Build database systems that directly support internationalization and globalization
CLR 7- Explore and gain practical experience in current advanced database technology
Objectives of the Assignment
You will draft a script to create a table and restrict its access at the table and row level. You will then setup an audit on the table to track CRUD operations on that table.
Resources
Review the following Oracle resources before starting the assignment.
Creating ORACLE Virtual Private Database Policies
Auditing CDB and PDB level in Oracle Multitenant (managescript.com)
Instructions
Copy/paste all screenshots within their designated areas in the assignment instructions.
1-- Using SQLPLUS , connect to SYS and create a new USER for this assignment named USER_A3. Connect to that user and create a table called ASSIGN_3 with one column. Name that column after your own first name (eg. Bob, Sarah, Mehmet) and make it a primary key.
Create a series of FOR..LOOPs and the || operator to populate the table with test data -
-40 rows where the first letter in the column is A. Have A be followed by a number.
-30 rows where the first letter in the column is M. Have M be followed by a number.
-20 rows where the first letter in the column is Z. Have Z be followed by a number.
-10 rows where the first letter in the column is B. Have B be followed by a number.
- all rows must be unique
Run SELECT * FROM ASSIGN_3 to confirm your table was populated.
Provide screenshots showing your SQL statements used that were successfully ran to create the user, create the table, populate the table, and the SELECT showing the population was successful.
2-- Use SQLPLUS, connect as SYS and create the following roles and grant them the table-level privileges to the ASSIGN_3 table
- RL_READ_ONLY access
- RL_CRUD access
- RL_ROW_A access
- RL_ROW_M access
- RL_ROW_Z access
Do not use views. Provide screenshots showing your SQL statements used that were successfully ran to create each role and apply each grant.
3-- Use SQLPLUS, connect to SYS and create the users USER_A, USER_B, USER_C, USER_D, USER_ E with the needed privileges to access tables owned by the ASSIGN_3 user. Then assign the roles to the corresponding user.
- grant RL_ROW_A to USER_A
- grant RL_ROW_M to USER_B
- grant RL_ROW_Z to USER_C
- grant RL_READ_ONLY to USER_D
- grant RL_CRUD to USER_E
Provide a screenshot showing your SQL statements used that were successfully ran to create each role and apply each grant.
4-- Using SQLPLUS, connect to USER_A3 and create a VPD policy that checks the role of the user accessing the table. To determine the role in your VPD function, use SELECT ... INTO, the SYS.DBA_ROLES table, the SYS_CONTEXT function, and the COUNT function. To avoid a compile error, you will need to grant select access on DBA_ROLES to USER_A3. Code the following logic --
- IF the role is RL_READ_ONLY or RL_CRUD then return a blank predicate
- IF the role is anything else, return the predicate 1<>1
Connect to USER_C, USER_D, and USER_C to test your VPD policy. For each user, run the access test SELECT * FROM USER_A3.ASSIGN_3
Provide screenshots showing your SQL statements used that were successfully ran to create the function, create the policy, and shows the testing SELECT with its results for each user.
5-- Modify the function in Step 4. IF the role is RL_ROW_A then return a predictate that would filter out and only return rows that start start with an A. Do not use double quotes. Using SQLPLUS, create your function and policy then test your modification by connecting to USER_A and running the access test. Provide screenshots showing your SQL statements used that were successfully ran to create the function, create the policy, and shows the testing SELECT with its results.
6-- Modify the function in Step 5. IF the role is RL_ROW_M then return a predictate that would filter out and only return rows that start start with an M. Using SQLPLUS, create your function and policy then test your modification by connecting to USER_B and running the access test. Provide screenshots showing your SQL statements used that were successfully ran to create the function, create the policy, and shows the testing SELECT with its results.
7-- Modify the function in Step 6. IF the role is RL_ROW_Z then return a predictate that would filter out and only return rows that start sta

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

Write formal proposal requests.

Answered: 1 week ago

Question

Write an effective news release.

Answered: 1 week ago

Question

Identify the different types of proposals.

Answered: 1 week ago