Short note on Security in Database.
1 Answer

The data stored in the database need protection from unauthorized access and malicious destruction along with the protection against accidental introduction of inconsistency that integrity constraints provide.

Some forms of malicious access are unauthorized reading of data, unauthorized modification of data and unauthorized destruction of data.

Database security refers to protection from malicious access.

Security at all levels must be maintained if database security is to be ensured. Some of the ways database security can be maintained are as follows:


A user has been restricted from particular operations unless they have the necessary authorization. A user may have several forms of authorization on parts of the database such as – Read authorization allows reading, but not modification, of data. Insert authorization allows insertion of new data, but not modification of existing data. Update authorization allows modification, but not deletion, of data. Delete authorization allows deletion of data.


Views provide users with a personalized model of the database. A view hides data that a user does not need which serves both to simplify usage of the system and to enhance security. Views simplify system usage as they restrict the user’s attention to the data of interest. A combination of relational-level security and view-level security imitsa user’s access to precisely the data that the user needs.

Granting of Privileges:

A user who has been granted some form of authorization may be allowed to pass on this authorization to other user. The passing of authorization from one user to another can be represented by an authorization graph and a user has an authorization if and only if there is a path from the root of the authorization graph down to the node representing the user.

Notion of Roles:

A set of roles is created in the database were authorizations can be granted to roles, as they are granted to individual users. Each data base user is granted a set of roles to perform authorized operations. The use of roles has the benefit of requiring users to connect to the database with their own user id. Any authorization that can be granted to a user can be granted to a role.

Audit Trails:

An audit trail is a log of all changes to the database, along with information of which user performed the change and when the change was performed. Audit trail can be created by defining appropriate triggers on relation updates. Many secure database applications require an audit trail be maintained.

Please log in to add an answer.