![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Entity Integrity Rule in RDBMS
For Entity Integrity Rule, each table has a Primary Key.
Primary Key cannot have NULL value.
<Student>
Student_ID | Student_Awards | Student_Awards |
Above, you can see our primary key is Student_ID. We cannot consider Student_Awards as the primary key since not every student would have received the award.
Let us see another example −
<Employee>
Employee_ID | Employee_Name | Employee_Age | Employee_Location |
In the above table, the Primary Key is Employee_ID
Let us now summarize the Entity Integrity Rule −
- Make sure that each tuple in a table is unique.
- Every table mush has a primary key, for example, Student_ID for a Student table.
- Every entity is unique.
- The relations Primary Key must have unique values for each row.
- Primary Key cannot have NULL value and must be unique.
- Example can be an Employee_ID cannot be null in an Employee table.
Advertisements