Skip to content

Commit 973185f

Browse files
committed
data Integrity
1 parent 1f954b0 commit 973185f

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,40 @@ Note that the Books table doesn\'t have AuthorId in this case. That column has b
133133

134134
## Q. What is data Integrity?
135135

136-
*ToDo*
136+
Data Integrity defines the accuracy and consistency of data stored in a database. It can also define integrity constraints to enforce business rules on the data when it is entered into the application or database.
137+
138+
**Classification of Data Integrity:**
139+
140+
* a) System/Pre Defined Integrity
141+
* b) User-Defined Integrity
142+
143+
<p align="center">
144+
<img src="assets/data-integrity.png" alt="Many to Many" width="500px" />
145+
</p>
146+
147+
**a) System/Pre Defined Integrity:**
148+
149+
<p align="center">
150+
<img src="assets/system-integrity.png" alt="Many to Many" width="500px" />
151+
</p>
152+
153+
**1. Entity Integrity:**
154+
155+
Entity integrity ensures each row in a table is a uniquely identifiable entity. We can apply Entity integrity to the Table by specifying a primary key, unique key, and not null.
156+
157+
**2. Referential Integrity:**
158+
159+
Referential integrity ensures the relationship between the Tables.
160+
161+
We can apply this using a Foreign Key constraint.
162+
163+
**3. Domain Integrity:**
164+
165+
Domain integrity ensures the data values in a database follow defined rules for values, range, and format. A database can enforce these rules using Check and Default constraints.
166+
167+
**b) User-Defined Integrity:**
168+
169+
It comprises the rules defined by the operator to fulfill their specific requirements. Entity, referential, and domain integrity are not enough to refine and secure data. Time in time again, particular business rules must be considered and integrated into data integrity processes to meet enterprise standards.
137170

138171
<div align="right">
139172
<b><a href="#table-of-contents">↥ back to top</a></b>

assets/data-integrity.png

25.8 KB
Loading

assets/system-integrity.png

35.4 KB
Loading

0 commit comments

Comments
 (0)