SlideShare una empresa de Scribd logo
1 de 16
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;

Más contenido relacionado

Destacado

Книги-юбиляры 2013 года
Книги-юбиляры 2013 годаКниги-юбиляры 2013 года
Книги-юбиляры 2013 годаnikola511
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)Slideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learningSlideshare
 
What is in you
What is in youWhat is in you
What is in youSlideshare
 
Report generation
Report generationReport generation
Report generationSlideshare
 
16 Queens Problem - trial 1
16 Queens Problem  - trial 116 Queens Problem  - trial 1
16 Queens Problem - trial 1Slideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Girl Rights and Protection in India
Girl Rights and Protection in IndiaGirl Rights and Protection in India
Girl Rights and Protection in IndiaAashray For Everyone
 
Security and Integrity
Security and IntegritySecurity and Integrity
Security and Integritylubna19
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessingSlideshare
 
Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Slideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inferenceSlideshare
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data miningSlideshare
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning Slideshare
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMSkoolkampus
 

Destacado (20)

Dmbs chapter vi
Dmbs chapter viDmbs chapter vi
Dmbs chapter vi
 
Книги-юбиляры 2013 года
Книги-юбиляры 2013 годаКниги-юбиляры 2013 года
Книги-юбиляры 2013 года
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
 
What is in you
What is in youWhat is in you
What is in you
 
Report generation
Report generationReport generation
Report generation
 
16 Queens Problem - trial 1
16 Queens Problem  - trial 116 Queens Problem  - trial 1
16 Queens Problem - trial 1
 
Neural networks
Neural networksNeural networks
Neural networks
 
Girl Rights and Protection in India
Girl Rights and Protection in IndiaGirl Rights and Protection in India
Girl Rights and Protection in India
 
Security and Integrity
Security and IntegritySecurity and Integrity
Security and Integrity
 
Logic agent
Logic agentLogic agent
Logic agent
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inference
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data mining
 
Trigger
TriggerTrigger
Trigger
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMS
 

Similar a DBMS Security - GRANT and REVOKE Statements

Sql ch 15 - sql security
Sql ch 15 - sql securitySql ch 15 - sql security
Sql ch 15 - sql securityMukesh Tekwani
 
e computer notes - Controlling user access
e computer notes - Controlling user accesse computer notes - Controlling user access
e computer notes - Controlling user accessecomputernotes
 
Database Security Methods, DAC, MAC,View
Database Security Methods, DAC, MAC,ViewDatabase Security Methods, DAC, MAC,View
Database Security Methods, DAC, MAC,ViewDr-Dipali Meher
 
Clase 18 privilegios modificada
Clase 18 privilegios   modificadaClase 18 privilegios   modificada
Clase 18 privilegios modificadaTitiushko Jazz
 
Clase 18 privilegios modificada
Clase 18 privilegios   modificadaClase 18 privilegios   modificada
Clase 18 privilegios modificadaTitiushko Jazz
 
Sql grant, revoke, privileges and roles
Sql grant, revoke, privileges and rolesSql grant, revoke, privileges and roles
Sql grant, revoke, privileges and rolesVivek Singh
 
03_DP_300T00A_Secure_Environment.pptx
03_DP_300T00A_Secure_Environment.pptx03_DP_300T00A_Secure_Environment.pptx
03_DP_300T00A_Secure_Environment.pptxKareemBullard1
 
Database models and DBMS languages
Database models and DBMS languagesDatabase models and DBMS languages
Database models and DBMS languagesDivyaKS12
 
Mysqldbatrainingsession12privilegesinmysql 170302152348
Mysqldbatrainingsession12privilegesinmysql 170302152348Mysqldbatrainingsession12privilegesinmysql 170302152348
Mysqldbatrainingsession12privilegesinmysql 170302152348shubham singh
 
Security and Authorization
Security and AuthorizationSecurity and Authorization
Security and AuthorizationMegha yadav
 
Les14[1]Controlling User Access
Les14[1]Controlling User AccessLes14[1]Controlling User Access
Les14[1]Controlling User Accesssiavosh kaviani
 
UNIT-1-Security.ppt
UNIT-1-Security.pptUNIT-1-Security.ppt
UNIT-1-Security.pptDharaDarji5
 
Database Management System Security.pptx
Database Management System  Security.pptxDatabase Management System  Security.pptx
Database Management System Security.pptxRoshni814224
 

Similar a DBMS Security - GRANT and REVOKE Statements (20)

Sql ch 15 - sql security
Sql ch 15 - sql securitySql ch 15 - sql security
Sql ch 15 - sql security
 
Les01
Les01Les01
Les01
 
Les14
Les14Les14
Les14
 
Les13
Les13Les13
Les13
 
e computer notes - Controlling user access
e computer notes - Controlling user accesse computer notes - Controlling user access
e computer notes - Controlling user access
 
Database Security Methods, DAC, MAC,View
Database Security Methods, DAC, MAC,ViewDatabase Security Methods, DAC, MAC,View
Database Security Methods, DAC, MAC,View
 
Db pre
Db preDb pre
Db pre
 
Clase 18 privilegios modificada
Clase 18 privilegios   modificadaClase 18 privilegios   modificada
Clase 18 privilegios modificada
 
Clase 18 privilegios modificada
Clase 18 privilegios   modificadaClase 18 privilegios   modificada
Clase 18 privilegios modificada
 
Sql grant, revoke, privileges and roles
Sql grant, revoke, privileges and rolesSql grant, revoke, privileges and roles
Sql grant, revoke, privileges and roles
 
03_DP_300T00A_Secure_Environment.pptx
03_DP_300T00A_Secure_Environment.pptx03_DP_300T00A_Secure_Environment.pptx
03_DP_300T00A_Secure_Environment.pptx
 
Database models and DBMS languages
Database models and DBMS languagesDatabase models and DBMS languages
Database models and DBMS languages
 
Mysqldbatrainingsession12privilegesinmysql 170302152348
Mysqldbatrainingsession12privilegesinmysql 170302152348Mysqldbatrainingsession12privilegesinmysql 170302152348
Mysqldbatrainingsession12privilegesinmysql 170302152348
 
Security and Authorization
Security and AuthorizationSecurity and Authorization
Security and Authorization
 
Les14[1]Controlling User Access
Les14[1]Controlling User AccessLes14[1]Controlling User Access
Les14[1]Controlling User Access
 
8034.ppt
8034.ppt8034.ppt
8034.ppt
 
Trigger in DBMS
Trigger in DBMSTrigger in DBMS
Trigger in DBMS
 
UNIT-1-Security.ppt
UNIT-1-Security.pptUNIT-1-Security.ppt
UNIT-1-Security.ppt
 
Database Management System Security.pptx
Database Management System  Security.pptxDatabase Management System  Security.pptx
Database Management System Security.pptx
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
 

Más de Slideshare

Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13Slideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313Slideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learningSlideshare
 
Input & output devices
Input & output devicesInput & output devices
Input & output devicesSlideshare
 
Accessing I/O Devices
Accessing I/O DevicesAccessing I/O Devices
Accessing I/O DevicesSlideshare
 
16 queens problem - trial 2
16 queens problem - trial 216 queens problem - trial 2
16 queens problem - trial 2Slideshare
 
Basic Processing Unit
Basic Processing UnitBasic Processing Unit
Basic Processing UnitSlideshare
 
Cache performance considerations
Cache performance considerationsCache performance considerations
Cache performance considerationsSlideshare
 
Memory management
Memory managementMemory management
Memory managementSlideshare
 
Secondary storage devices
Secondary storage devices Secondary storage devices
Secondary storage devices Slideshare
 
Magnetic tape system
Magnetic tape systemMagnetic tape system
Magnetic tape systemSlideshare
 

Más de Slideshare (15)

OLAP
OLAPOLAP
OLAP
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
 
Neural networks
Neural networksNeural networks
Neural networks
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
 
Input & output devices
Input & output devicesInput & output devices
Input & output devices
 
Accessing I/O Devices
Accessing I/O DevicesAccessing I/O Devices
Accessing I/O Devices
 
16 queens problem - trial 2
16 queens problem - trial 216 queens problem - trial 2
16 queens problem - trial 2
 
Basic Processing Unit
Basic Processing UnitBasic Processing Unit
Basic Processing Unit
 
Cache performance considerations
Cache performance considerationsCache performance considerations
Cache performance considerations
 
Cachememory
CachememoryCachememory
Cachememory
 
Memory management
Memory managementMemory management
Memory management
 
Secondary storage devices
Secondary storage devices Secondary storage devices
Secondary storage devices
 
Magnetic tape system
Magnetic tape systemMagnetic tape system
Magnetic tape system
 

Último

Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 

Último (20)

Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 

DBMS Security - GRANT and REVOKE Statements

  • 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;