Open In App

Authorization and Integrity Manager in DBMS

Last Updated : 07 Sep, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

DBMS is software that allows users to store, modify, and delete the data present in a database. It helps to organize and structure our data. It allows users to perform CRUD operations. CRUD operation basically stands for CREATE, READ, UPDATE, and DELETE.

Components that Make DBMS

There are three components that make up the Database Management System. They are:

  • Query Processor: As the name suggests basically works on the user’s query. It executes and interprets the query. The sub-components of a Query Processor include a DDL interpreter, DML Compiler, Embedded DML Compiler, and Query Optimizer.
  • Storage Manager: also known by the name of Database Control System, is a program that connects the data present in the database and the queries provided by the user. The different components of a Storage Manager are the Authorization Manager, Integrity Manager, Transaction Manager, Buffer Manager, and File Manager.
  • Disk Storage: focuses on the physical level. It ensures that the data is saved even when the system shuts down. The further sub-divisions of Disk Storage include Data Files, Data Dictionaries and Indices

From the above three components, it is seen that Authorization and Integrity Manager are part of Storage Manager.

Authorization Manager

Authorization is basically identifying and giving users access to the resources. In DBMS, Authorization Manager provides access to the user depending upon the roles. The Administrator first authorizes the user and provides the desired access to the user. The Manager is also involved in decision-making and decides whether the particular user should be granted to perform the operations or not.

Let us elaborate on it with the help of an example. Suppose a user wants to perform some CRUD operations on a database. The Authorization Manager first identifies the user and checks whether the user has the privilege of performing those operations on the data. After authorization, the user is granted access accordingly. Authorization Managers provide roles and privileges to each user. Each user can have access to certain portions of the database based on the access levels. In this way, the Manager also prevents unauthorized access thereby ensuring the security of the database.

Integrity Manager

Integrity constraints are a set of rules that checks whether a particular condition has been satisfied or not. It also ensures that the quality of data is preserved. So these integrity constraints help to prevent accidental changes to the data. Integrity Manager is a component of Storage Manager. It first checks the integrity constraints and then accordingly the data is modified. If the constraints are satisfied, then only the CRUD operation is allowed else it is not allowed.

Let us elaborate with the help of an example. Suppose a user wants to insert a roll number in the Students Database. The integrity constraint for the Roll Number is Primary Key. So when the user enters the Roll number, Integrity Manager first checks whether the Roll Number is unique or not. If it is unique, the record is inserted else it throws an error that the roll number should be unique. Integrity Manager ensures that the operation made on a particular part of data does not affect the other stored data.

Integrity Manager

Integrity Manager

Difference Between Authorization Manager and Integrity Manager

Although both are part of Storage Manager, there are some differences between them.

Authorization Manager Integrity Manager
It basically identifies the user and it’s role in the database. It applies the set of rules for CRUD operations.
It prevents unauthorized access thereby ensuring security. It prevents accidental changes to the data and ensures that the modifications dothe not affect the other databases.
It focuses on accessibility. It focuses on the access quality of data.

Frequently Asked Questions

Q1: Define Authorization and Integrity Manager. Why do we require them?

Answer:

In DBMS Authorization Manager identifies each user based on roles and accordingly assigns privileges to the users. It first authorizes the author and then only allows access to the database. Integrity Manager basically deals with integrity constraints. Whenever a user tries to first modify the data, Integrity Manager first checks the constraints and then only it allows the modification.

Authorization Manager is required in Database Management System because it prevents unauthorized access to the database. It provides security to the database to prevent unauthorized modification to the database. The integrity Manager is required to check the conditions and ensures that the data remains intact before and after modification.

Q2: Suppose the user wants to add a row to the student database. The Student Database comprises Roll Number, Name, Marks and Age. Here Roll Number is the Primary Key. However, the user faces an error ” Duplicate rows. Cannot insert the row”. Explain who throws the error and why?

Answer:

The Integrity Manager is responsible for generating the error. Here as we can see that Roll Number is Primary Key. According to the definition of a Primary Key, it should be unique and not null. Here user tries to enter the same Roll Number again. The Integrity Manager checks each constraint. It seems that Roll Number is the primary key but there are duplicate roll numbers and as a result, throws the error.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads