data integrity dbms presentation 12 cs 18

13

Upload: engr-imran-ashraf

Post on 12-Apr-2017

297 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Data integrity Dbms presentation 12 cs 18
Page 2: Data integrity Dbms presentation 12 cs 18

Data integrity

Presenter : Imran Ashraf

Page 3: Data integrity Dbms presentation 12 cs 18

Data Integrity Data integrity refers to maintaining and assuring the accuracy and

consistency of data over its entire life-cycle Data integrity is a fundamental component of information security Data integrity is the opposite of data corruption, which is a form of 

data loss. Any unintended changes to data as the result of a storage, retrieval

or processing operation, including malicious intent, unexpected hardware failure, and human error, is failure of data integrity

Page 4: Data integrity Dbms presentation 12 cs 18

Entity Integrity Refrential Integrity

Some Types of Data Integrity

Page 5: Data integrity Dbms presentation 12 cs 18

Entity Integrity Entity::  In  database , an entity is a single person, place, or thing about

which data can be stored. Integrity: The term integrity refers to the accuracy or correctness of data in the

Database..

Page 6: Data integrity Dbms presentation 12 cs 18

Entity Integrity is the mechanism the system provides to maintain primary keys.

Entity Integrity ensures that there are no duplicate records within the table and that the field that identifies each record within the table is unique and never null.

The existence of the Primary Key is the core of the entity integrity. If you define a primary key for each entity, they follow the entity integrity rule.

The primary key serves as a unique identifier for rows in the table. 

Entity Integrity ensures two properties for primary keys: The primary key for a row is unique; it does not match the primary key of any other row in the table.

Page 7: Data integrity Dbms presentation 12 cs 18

Refrential integrity:

Referential integrity is a relational database concept in which multiple tables share a relationship based on the data stored in the tables, and that relationship must remain consistent.

Referential integrity is a property of a database that requires all properties of one particular table to be included in another.

Based On foreign Key When Foreign Key is Imposed Means Refrential Integrity is

Implemented If foreign key is not imposed means refrential integrity is voilated

Page 8: Data integrity Dbms presentation 12 cs 18

Example:

Page 9: Data integrity Dbms presentation 12 cs 18

Question For You?

Suppose company X has 2 tables, an Employee table, and an Employee Salary table. In the Employee table we have 2 columns – the employee ID and the employee name. In the Employee Salary table, we have 2 columns – the employee ID and the salary for the given IDNow, suppose we wanted to remove an employee because he no longer works at company X. Then, we would remove his entry in the Employee table. Because he also exists in the Employee Salary table, we would also have to manually remove him from there also. Manually removing the employee from the Employee Salary table can become quite a pain. And if there are other tables in which Company X uses that employee then he would have to be deleted from those tables as well – an even bigger pain.

Page 10: Data integrity Dbms presentation 12 cs 18

What Will Be the Solution?

Page 11: Data integrity Dbms presentation 12 cs 18

Another Question?

What is Data Corruption?Solution Of Data Corruption?

Page 12: Data integrity Dbms presentation 12 cs 18
Page 13: Data integrity Dbms presentation 12 cs 18