Difference Between Security and Integrity

Difference Between Data Security and Integrity in Tabular Form

Comparison Between Security and Integrity

The key difference between Security and Integrity is that Data security is the protection of data from unauthorized usersData integrity means that the data contained in the database is both correct and consistent. For this purpose, the data stored in the database must satisfy certain types of constraints (rules).

Comparison Between Security and Integrity

Comparison Chart

Security Integrity
Data security defines the prevention of data
corruption through the use of controlled access mechanisms.
Data integrity defines the quality of data, which
guarantees the data is complete and has a whole structure.
Data security deals with the protection of data Data integrity deals with the validity of data
Data security is making sure only the people who should have access to the data are the
only ones who can access the data.
Data integrity is making sure the data is correct and not corrupt.
Data security refers to making sure that data is accessed by its intended users, thus
ensuring the privacy and protection of data.
Data integrity refers to the structure of the data and how it matches the schema of the
database.
Authentication/authorization, encryptions, and
masking are some of the popular means of data security.
Backing up, designing a suitable user interface
and error detection/correction in data are some of the means to preserve integrity.




Data security

  • Data security is the protection of data from unauthorized users.
  • Only the authorized users are allowed to access the data
  • Most of the users are allowed to access a part of the database i.e., the data that is related to them or related to their department.
  • Mostly, the DBA or head of department can access all the data in the database.
  • Some users may be permitted only to retrieve data, whereas others are allowed to retrieve as well as to update data.
  • The database access is controlled by the DBA.
  • He/she creates the accounts of users and gives rights to access the database.
  • Users or group of users are given usernames protected by passwords.
  • The user enters his/her account number (or user name) and password to access the data from the database.
  • For example, if you have an account in the “yahoo.com”, then you have to give your correct username and password to access your account or e-mail.
  • Similarly, when you insert your ATM card into the Automated Teller Machine (ATM), the machine reads your ID number printed on the card and then asks you to enter your pin code (or password). In this way, you can access your account.

Data Integrity

  • Data integrity means that the data contained in the database is both correct and consistent. For this purpose, the data stored in the database must satisfy certain types of constraints (rules)
  • For example, a balance for any account must not be less than zero. Such constraints are enforced in the system by adding appropriate code in application programs. But, when new constraints are added, such as balance should not be less than Rs. 5000, application programs need to be changed. But, it is not an easy task to change programs whenever required.
  • Data in a database must be correct and consistent.
  • So, data stored in the database must satisfy certain types of constraints (rules).
  • DBMS provides different ways to implement such types of constraints (rules).
  • This improves data integrity in a database.




More Differences