What is integrity? Explain different types of database integrity.

This answer is restricted. Please login to view the answer of this question.

Login Now

Database integrity defines the validity and consistency of stored information. Integrity is generally defined in terms of constraints, which are consistency rules that the database is not allowed to violate. Constraints can apply to each attribute or they can apply to relationships between tables.

Integrity constraints provide that changes (update deletion, insertion) made to the database by authorized users do not result in a loss of data consistency. Therefore, integrity constraints guard against accidental damage to the database.

There are various types of data integrity which are as follows −

  • Logical Integrity − In a relational database, logical consistency provides the data remains intact as it is used in several ways. Logical integrity, like physical integrity, defends information from human error and hackers, but in a different way. There are multiple forms of logical consistency.

    Logical integrity is negotiated when an error occurs, including when a human operator makes a mistake while manually entering information into the database. There are some common reasons why data integrity can be compromised including bugs and malware and transferring information from one site within a database to another where some fields are absent.

  • Referential Integrity − This defines all procedures and rules enforced to provide that data is stored and used consistently. This is the notion of foreign keys.

    The principle of foreign keys defines that the foreign key value can be in two states. The first state is that the foreign key value would define a primary key value of another table, or it can be null. Being null can simply define that there are no relationships, or that the relationship is unfamiliar.

  • User-Defined Integrity − There are sets of data, generated by users, external entity, referential, and domain integrity. If an employer makes a column to input corrective action of employees, this data can be defined as “user-defined.”
  • Domain Integrity − Domain integrity is a sequence of rules and procedures that provide all data items that pertain to the correct domains. For instance, if a user types a birth date in a street address area, the system will display an error message that will avoid the user from filling that field with the wrong information.

    The concept of data integrity provides that all data in a database can be traced and connected to other information. This provides that everything is recoverable and searchable. Having an individual, well-defined, and well-controlled data integrity system improves stability, performance, reusability, and maintainability.

  • Physical integrity − Physical integrity defines the safeguarding of data’s completeness and precision during storage and retrieval. Physical integrity is at risk when natural disasters appear, electricity goes out, or hackers interrupt database functions.
If you found any type of error on the answer then please mention on the comment or report an answer or submit your new answer.
Leave your Answer:

Click here to submit your answer.

  Loading . . .