Question
Use hypothetical data where necessary. Question 1 Write an SQL query to differentiate between system privileges and object privileges in a Database. Question 2 You
Use hypothetical data where necessary.
Question 1
Write an SQL query to differentiate between system privileges and object privileges in a Database.
Question 2
You have a table named employees in your Oracle database. Create a user named hr_user and grant SELECT and
INSERT object privileges on the employees table to this user. Provide the SQL commands to achieve this.
Question 3
Create a role named finance_role and grant it the following privileges:
• SELECT privilege on the invoices table
• INSERT privilege on the transactions table
• Next, create a user named finance_user and assign the finance_role to this user. Provide the SQL
commands to perform these tasks.
Question 4
Consider a scenario where you have a complex SQL query that involves joining multiple tables (orders, customers,
and products).
Write an SQL script to create this query and grant SELECT privilege on the necessary tables to a user named
report_user so that they can execute this query successfully. Explain the steps you took and why each privilege is
needed as comments on your SQL script.
Question 5
Write SQL queries to demonstrate the following:
• Grant the CREATE TABLE system privilege to a user named admin_user.
• Revoke the UPDATE object privilege on the inventory table from a user named inventory_manager.
Step by Step Solution
3.39 Rating (146 Votes )
There are 3 Steps involved in it
Step: 1
Heres a breakdown of the SQL queries and explanations for each question Question 1 Differentiating System vs Object Privileges While the exact command...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started