Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Copyright © austinmakasare22@gmail.

com

Database Integrity and Security Concepts

Data integrity refers to the validity, consistency, correctness and accuracy of


data in a database and is represented in terms of integrity constraints.

Database security refers to the preventive measures for maintain data


integrity. Database security concerns the confidentiality, integrity and
availability of data stored in a database.

Integrity rules (constraints) used to prevent invalid data from being entered
into the database. This ensures the accuracy and reliability of the data in the
database.

There are mainly three types of Data Integrity:


1.Entity Integrity: This is related to the concept of primary keys. All tables
should have their own primary keys which should uniquely identify a row and
not be NULL.

2.Domain Integrity
Domain refers to the range of acceptable values. It refers to the range of
values that we are going to accept and store in a particular column within a
database. The data types available are mainly integer, text, date etc. Any entry
which we make for a column should be available in the domain of the data
type.

Check Constraint: A check constraint can be applied to a single attribute or a


combination of many attributes in tuple.
Copyright © austinmakasare22@gmail.com
Copyright © austinmakasare22@gmail.com

Default Constraint: In this constraint the attribute can have a default value.
The default value could be a fixed value.

Unique Constraint: In this constraint guarantees that the attribute has a

distinct value in each tuple.

Not Null Constraint: The not null constraint restricts an attribute from having a
null value.

Referential integrity: Referential integrity ensures data in one table


maintains the relationship with data to another table/relation. It maintains
the dependent values between rules. The referential integrity constraints
state that if a foreign key in the first table refers to the primary key of the
second table, then every value of foreign key in the first table should either be
null or present in the second table.

The rules associated with referential integrity are:

• Restrict: Disallows the update or deletion of referenced data.


• Set to Null: When referenced data is updated or deleted, all associated
dependent data is set to NULL.
Set to Default: When referenced data is updated or deleted, all associated
dependent data is set to a default value.

Copyright © austinmakasare22@gmail.com
Copyright © austinmakasare22@gmail.com

• Cascade: When referenced data is updated, all associated dependent data


is correspondingly updated. When a referenced row is deleted, all
associated dependent rows are deleted.
• No Action: Disallows the update or deletion of referenced data. This
differs from RESTRICT in that it is checked at the end of the statement,
or at the end of the transaction if the constraint is deferred.

Introduction To Database Security Concepts


Security is an important issue in database management because information
stored in a database is valuable and sensitive resource.

Database security can be defined as ‘protecting a database from unauthorized


access, malicious destruction and even any accidental loss or misuse.

A threat is a potential violation of security. A database security violation


takes place when someone carries out an unauthorized retrieval,
modification or destruction of information in a database.

The major database security threats are as follows.

1. Loss of Confidentiality: loss of confidentiality indicates that unauthorized


users have been able to access information.

2. Loss of Privacy: It includes loss of protection of an individual’s data files.

3. Loss of Integrity: It refers to data corruption and invalid data.

4. Loss of Availability: It includes the sabotage of hardware, the network or


applications that may cause data to become unavailable to users.

5.Theft and fraud: It includes intentional security breaches of data and


unauthorized data manipulation.

6. Accidental Losses: It includes losses as a result of human error, software


problem and hardware problems. To protect the database, we must take

security measures at several levels.

1.physical: the sites containing the computer system must be secured


against armed entry by intruders.

Copyright © austinmakasare22@gmail.com
Copyright © austinmakasare22@gmail.com

2.Human: Users must be authorized carefully to reduce the chance of


any such user giving access to an intruder in exchange for others
favours.

3.operating system: no matter how secure the database system is,


weakness in operating system security may serve as a means of
unauthorized access to the database.

4.Network: Almost all database system allows remote access through


terminals or networks, software-level security within the network
software is as important as physical security, both on the internet.
5.Database system: some database systems users may be authorized
to access only a limited portion of the database.

There are 3 main objectives to consider while designing a secure


database application.
1. secrecy: Information should not be disclosed to unauthorized users.
e.g., a student should not be allowed to examine other student’s grade.

2.Integrity: Only authorized users should be allowed to modify data. e.g.


students may be allowed to see their grades, yet not allowed to modify
them.

3.Avaliability: Authorized users should not be denied access. e.g an


instructor who wishes to change a grade should be allowed to do so on.

Methods for database security:

Database Security means keeping sensitive information safe and prevent the loss of
data. Security of data base is controlled by Database Administrator (DBA). The
following are the main control measures are used to provide security of data in
databases:
1.Authorization: A DBMS typically includes a database security and authorization
sub-system that is responsible for ensuring the security of portions of a database
against unauthorized access.
There are two types of database security mechanism.
1.1Discretionary Security mechanism: These are used to grant privileges to users,
including the capability to access specific data files, records or fields in a specified
mode (such as read, insert, delete or update).

Copyright © austinmakasare22@gmail.com
Copyright © austinmakasare22@gmail.com

1.2. Mandatory Security Mechanism: These are used to enforce multilevel security
by classifying the data and users into various security classes (or levels) and then
implementing the appropriate security policy of the organization.
2.Access control: The security mechanism of DBMS must include some provisions
for restricting access to the data base by unauthorized users. Access control is done
by creating user accounts and to control login process by the DBMS. So, that
database access of sensitive data is possible only to those people (database users)
who are allowed to access such data and to restrict access to unauthorized persons.
3.Statistical Database Security: Statistical database security focuses on the
protection of confidential individual values stored in and used for statistical
purposes and used to retrieve the summaries of values based on categories. They do
not permit to retrieve the individual information.
This allows to access the database to get statistical information about the number of
employees in the company but not to access the detailed confidential/personal
information about the specific individual employee.

4. Database Encryption Technique:


This method is mainly used to protect sensitive data (such as credit card numbers,
OTP numbers) and other sensitive numbers. The data is encoded using some
encoding algorithms.
An unauthorized user who tries to access this encoded data will face difficulty in
decoding it, but authorized users are given decoding keys to decode data.

Database security and DBA


The database administrator (DBA) is the central authority for managing a
database system. The DBA’s responsibilities include
1. granting privileges to users who need to use the system and
2. classifying users and data in accordance with the policy of the organization.
The DBA has a DBA account in the DBMS, sometimes called a system or
super user account, which provides powerful capabilities such as:
1. Account creation. This action creates a new account and password for a
user or a group of users to enable access to the DBMS.
2. Privilege granting. This action permits the DBA to grant certain privileges
to certain accounts.
3. Privilege revocation. This action permits the DBA to revoke (cancel)
certain privileges that were previously given to certain accounts.
Copyright © austinmakasare22@gmail.com
Copyright © austinmakasare22@gmail.com

4. Security level assignment. This action consists of assigning user accounts


to the appropriate security clearance level.
The DBA is responsible for the overall security of the database system. Action 1
in the preceding list is used to control access to the DBMS as a whole, whereas
actions 2 and 3 are used to control discretionary database authorization, and
action 4 is used to control mandatory authorization.
Discretionary Access Control Method:
Discretionary Access Control method (DAC) method is based on the concept of
access rights (also called privileges) and mechanism for giving users such
privileges.
The typical method of enforcing discretionary access control in a database
system is based on the granting and revoking privileges.
A privilege is an action, such as creating, executing, reading, updating or
deleting that a user is permitted to perform on database objects.

Copyright © austinmakasare22@gmail.com

You might also like