SlideShare a Scribd company logo
Security
V. Saranya AP/CSE,
Sri Vidya College of Engg &
Tech, virudhunagar
• A DBMS
should
provide
a
mechanism
to
ensure that “only
authorized
users
can access the
database”
GRANT AND REVOKE
• SQL provides “GRANT” and “REVOKE”
statements to “allow security” to be set up
on the tables in the database.
Security Concepts
• Authorization identifiers
• Ownership
• privileges
Authorization Identifiers
• are “Database users” assigned by DBA.
Owner
• “Can pass privileges” on to other users using
the “GRANT” statement and can cancel the
privileges passed on using “REVOKE”
statement.
Privileges

• Are the actions that a user is permitted.
– Select privilege to retrieve data from the table
– Insert privilege to insert new rows into a table.
– Update Privilege to modify rows of data in a
table.
– Delete Privilege to delete rows of data from a
table.
– References Privilege to reference columns of a
named table in integrity constraints.
– Usage

Privilege
to
use
domains, collations, character sets and
translations.
Granting Privilege to other users
• Used to GRANT privileges on database objects
to specified users.
• GRANT statement is used by the owner of a
table to give other users access to the data.
Syntax

Used to grant all privileges to a
user instead of having to
specify the 6 privileges
individually

Syntax:
GRANT [privilege list / All PRIVILEGES]
On object name
To {authorization id list / PUBLIC }
Allow access to be granted to
[WITH GRANT OPTION]
all
present
and
future
Privilege list consists of one or more of the authorized users not just to the
users currently known to the
following
DBMS.
privileges separated by commas;
Select
Can be the name of a base
Delete
table, view, domain, character
Insert[ (column name[….]) ]
set, collation or translation
Update (column name[….]) ]
References (column name[….]) ]
Usage
Clause allows the users in
authorizationIdList to pass the
privileges to other user.
Example 1
Give the user with authorization identifier
manager full privileges to the staff table.

GRANT ALL PRIVILEGES
ON STAFF
TO manager WITH GRANT OPTION;
Example 2
Give users personnel and director the privileges
select and update on column salary of the staff
table.
GRANT SELECT ,UPDATE (salary)
ON staff
WITH GRANT FOR is
omitted, here the users
TO personnel, Director;
personnel & Director
cannot pass the
privileges on to other
users.
Example 3
Give all users the privileges SELECT on the
branch table.
GRANT SELECT
ON BRANCH
TO PUBLIC;

Means that all users
are able to retrieve all
the data in the branch
table.
REVOKE
• Revoke statement is used to take away all or
some of the privileges that were previously
granted to a user.
GRANT OPTION FOR allows
privileges passed on via the
WITH GRANT OPTION of the
GRANT statement to be revoked
from the privileges themselves.

Syntax
ALL PRIVILEGES granted to
a user by the user revoking
the privileges.

REVOKE [GRANT OPTION FOR] {privilege
List/ALL PRIVILEGES]
ON objectName
FROM { AuthorizationIdList / PUBLIC }
[RESTRICT / CASCADE]
Example 1
Revoke the privilege SELECT on the branch
table from all users.
REVOKE SELECT
ON branch
FROM PUBLIC;
Example 2
REVOKE all privileges you have given to
Director on the staff table.
REVOKE ALL PRIVILEGES
ON STAFF
FROM director;

More Related Content

PDF
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
PPSX
IM02: Database Language
DOCX
Oracle 11g SQL Overview
PPTX
Query editor for multi databases
PPT
Database management system
PDF
PHP Roadshow - MySQL Database Essentials
PPT
Database system
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
IM02: Database Language
Oracle 11g SQL Overview
Query editor for multi databases
Database management system
PHP Roadshow - MySQL Database Essentials
Database system

Viewers also liked (20)

PPTX
Dmbs chapter vi
PPTX
Книги-юбиляры 2013 года
PPTX
Resolution(decision)
PPTX
Instance based learning
PPTX
What is in you
PPTX
Report generation
PPTX
16 Queens Problem - trial 1
PPTX
Neural networks
PDF
Girl Rights and Protection in India
PDF
Security and Integrity
PPT
Logic agent
PPTX
Data preprocessing
PPTX
Crystal report generation in visual studio 2010
PPTX
Statistical learning
PPTX
Propositional logic & inference
PPTX
Major issues in data mining
PPT
Trigger
PPTX
Logical reasoning
PPTX
Entity Relationship Model
PPT
6. Integrity and Security in DBMS
Dmbs chapter vi
Книги-юбиляры 2013 года
Resolution(decision)
Instance based learning
What is in you
Report generation
16 Queens Problem - trial 1
Neural networks
Girl Rights and Protection in India
Security and Integrity
Logic agent
Data preprocessing
Crystal report generation in visual studio 2010
Statistical learning
Propositional logic & inference
Major issues in data mining
Trigger
Logical reasoning
Entity Relationship Model
6. Integrity and Security in DBMS
Ad

Similar to Security in Relational model (20)

PDF
Sql ch 15 - sql security
PPT
PPT
PPT
PPTX
Database 8.pptxAdvanced Database management system
PPT
e computer notes - Controlling user access
PPTX
Database Security Methods, DAC, MAC,View
PDF
Lecture Notes Unit4 Chapter13 users , roles and privileges
PPTX
Db pre
PPTX
Clase 18 privilegios modificada
PPTX
Clase 18 privilegios modificada
PPTX
User Information in Oracle introduction.pptx
PDF
Sql grant, revoke, privileges and roles
PPTX
03_DP_300T00A_Secure_Environment.pptx
PPTX
Database models and DBMS languages
PDF
Mysqldbatrainingsession12privilegesinmysql 170302152348
PDF
Chapter 6 Database Security and Authorization (4).pdf
PPTX
Security and Authorization
PPT
Les14[1]Controlling User Access
PPT
8034.ppt
Sql ch 15 - sql security
Database 8.pptxAdvanced Database management system
e computer notes - Controlling user access
Database Security Methods, DAC, MAC,View
Lecture Notes Unit4 Chapter13 users , roles and privileges
Db pre
Clase 18 privilegios modificada
Clase 18 privilegios modificada
User Information in Oracle introduction.pptx
Sql grant, revoke, privileges and roles
03_DP_300T00A_Secure_Environment.pptx
Database models and DBMS languages
Mysqldbatrainingsession12privilegesinmysql 170302152348
Chapter 6 Database Security and Authorization (4).pdf
Security and Authorization
Les14[1]Controlling User Access
8034.ppt
Ad

More from Slideshare (15)

PPTX
PPTX
Logical reasoning 21.1.13
PPTX
Statistical learning
PPT
Reinforcement learning 7313
PPTX
Neural networks
PPTX
Instance based learning
PPTX
Input & output devices
PPTX
Accessing I/O Devices
PPTX
16 queens problem - trial 2
PPTX
Basic Processing Unit
PPTX
Cache performance considerations
PPTX
Cachememory
PPTX
Memory management
PPT
Secondary storage devices
PPTX
Magnetic tape system
Logical reasoning 21.1.13
Statistical learning
Reinforcement learning 7313
Neural networks
Instance based learning
Input & output devices
Accessing I/O Devices
16 queens problem - trial 2
Basic Processing Unit
Cache performance considerations
Cachememory
Memory management
Secondary storage devices
Magnetic tape system

Recently uploaded (20)

PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Pre independence Education in Inndia.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Insiders guide to clinical Medicine.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
master seminar digital applications in india
GDM (1) (1).pptx small presentation for students
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Microbial diseases, their pathogenesis and prophylaxis
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Final Presentation General Medicine 03-08-2024.pptx
Pre independence Education in Inndia.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
O7-L3 Supply Chain Operations - ICLT Program
Renaissance Architecture: A Journey from Faith to Humanism
102 student loan defaulters named and shamed – Is someone you know on the list?
Insiders guide to clinical Medicine.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Microbial disease of the cardiovascular and lymphatic systems
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
human mycosis Human fungal infections are called human mycosis..pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
TR - Agricultural Crops Production NC III.pdf
master seminar digital applications in india

Security in Relational model

  • 1. Security V. Saranya AP/CSE, Sri Vidya College of Engg & Tech, virudhunagar
  • 2. • A DBMS should provide a mechanism to ensure that “only authorized users can access the database”
  • 3. GRANT AND REVOKE • SQL provides “GRANT” and “REVOKE” statements to “allow security” to be set up on the tables in the database.
  • 4. Security Concepts • Authorization identifiers • Ownership • privileges
  • 5. Authorization Identifiers • are “Database users” assigned by DBA.
  • 6. Owner • “Can pass privileges” on to other users using the “GRANT” statement and can cancel the privileges passed on using “REVOKE” statement.
  • 7. Privileges • Are the actions that a user is permitted. – Select privilege to retrieve data from the table – Insert privilege to insert new rows into a table. – Update Privilege to modify rows of data in a table. – Delete Privilege to delete rows of data from a table. – References Privilege to reference columns of a named table in integrity constraints. – Usage  Privilege to use domains, collations, character sets and translations.
  • 8. Granting Privilege to other users • Used to GRANT privileges on database objects to specified users. • GRANT statement is used by the owner of a table to give other users access to the data.
  • 9. Syntax Used to grant all privileges to a user instead of having to specify the 6 privileges individually Syntax: GRANT [privilege list / All PRIVILEGES] On object name To {authorization id list / PUBLIC } Allow access to be granted to [WITH GRANT OPTION] all present and future Privilege list consists of one or more of the authorized users not just to the users currently known to the following DBMS. privileges separated by commas; Select Can be the name of a base Delete table, view, domain, character Insert[ (column name[….]) ] set, collation or translation Update (column name[….]) ] References (column name[….]) ] Usage Clause allows the users in authorizationIdList to pass the privileges to other user.
  • 10. Example 1 Give the user with authorization identifier manager full privileges to the staff table. GRANT ALL PRIVILEGES ON STAFF TO manager WITH GRANT OPTION;
  • 11. Example 2 Give users personnel and director the privileges select and update on column salary of the staff table. GRANT SELECT ,UPDATE (salary) ON staff WITH GRANT FOR is omitted, here the users TO personnel, Director; personnel & Director cannot pass the privileges on to other users.
  • 12. Example 3 Give all users the privileges SELECT on the branch table. GRANT SELECT ON BRANCH TO PUBLIC; Means that all users are able to retrieve all the data in the branch table.
  • 13. REVOKE • Revoke statement is used to take away all or some of the privileges that were previously granted to a user.
  • 14. GRANT OPTION FOR allows privileges passed on via the WITH GRANT OPTION of the GRANT statement to be revoked from the privileges themselves. Syntax ALL PRIVILEGES granted to a user by the user revoking the privileges. REVOKE [GRANT OPTION FOR] {privilege List/ALL PRIVILEGES] ON objectName FROM { AuthorizationIdList / PUBLIC } [RESTRICT / CASCADE]
  • 15. Example 1 Revoke the privilege SELECT on the branch table from all users. REVOKE SELECT ON branch FROM PUBLIC;
  • 16. Example 2 REVOKE all privileges you have given to Director on the staff table. REVOKE ALL PRIVILEGES ON STAFF FROM director;