Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
431 views
in Computer by (25.0k points)

What are privileges and roles?

1 Answer

+1 vote
by (26.0k points)
selected by
 
Best answer

The Privileges defines the access rights given to a user on a database object. There are two types of privileges.

  • System privileges – This allows the user to CREATE, ALTER, or DROP database objects.
  • Object privileges – This allows the user to EXECUTE, SELECT, INSERT, UPDATE, or DELETE data from database objects to which the privileges apply.

Few CREATE system privileges are listed below:

CREATE object – allows users to create the specified object in their own schema.
CREATE ANY object – allows users to create the specified object in any schema.

Few of the object privileges are listed below:

  • INSERT – allows users to insert rows into a table.
  • SELECT – allows users to select data from a database object.
  • UPDATE – allows user to update data in a table.
  • EXECUTE – allows user to execute a stored procedure or a function.

Roles:
Roles are a collection of privileges or access rights. When there are many users in a database it becomes difficult to grant or revoke privileges to users. Therefore, if roles are defined, one can grant or revoke privileges to users, thereby automatically granting or revoking privileges.

Some of the privileges granted to the system roles are as given below:

1. CONNECT – CREATE TABLE, CREATE VIEW, CREATE SYNONYM, CREATE SEQUENCE, CREATE SESSION, etc.

2. RESOURCE – CREATE PROCEDURE, CREATE SEQUENCE, CREATE TABLE, CREATE TRIG-GER, etc.

The primary usage of the RESOURCE role is to restrict access to database objects. DBA- ALL SYSTEM PRIVILEGES.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Mar 31, 2020 in Computer by Punit01 (25.0k points)

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...