---
title: "Entity Vs Referential Integrity in RDBMS"
description: "The power of RDBMS depends on certain rules placed. These rules are called as integrity rules. Those are entity integrity and referential integrity."
url: https://srinimf.com/2017/09/21/top-two-integrity-rules-for-rdbms-relational-model/
date: 2017-09-21
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2021/09/pexels-photo-279607.jpeg?fit=1880%2C1249&ssl=1
categories: ["SQL"]
tags: ["data integrity in SQL", "RDBMS Integrity rules", "SQL tips and tricks"]
type: post
lang: en
---

# Entity Vs Referential Integrity in RDBMS

Entity means independent and referential means dependent. These two integrities play key role.

According to [computerworld](https://www.computerworld.com.au/whitepaper/tag/RDBMS/) RDBMS is not suitable for current day massive volume [of data](https://srinimf.com/2015/11/29/understanding-the-background-of-data-modelling-cordinality/). So you need other kind of databases .

Those are called NoSQL – Not only SQL database. But, still you need to be master in SQL. **[If you want to master in SQL you can try this course](https://click.linksynergy.com/fs-bin/click?id=89/9NHMn6Os&offerid=323058.7548&type=3&subid=0)**.

Type your email…

Subscribe

## Entity Vs Referential Integrity.

### Entity Integrity.

- No attribute participating in the primary key of a base relation is allowed to contain any nulls.
- Primary key performs the unique identification function in relational model
- Thus a null primary key value within a base relation would be like saying that there was some entity that had no known identity
- An entity that cannot be identified is a contradiction in terms, hence the name entity integrity

[You May Also like: Db2 Tutorial-1 to 5](https://srinimf.com/2010/03/17/mainframe-db2-tutorial-for-software-developers-1-of-5/)

### Referential integrity.

- If a base relation(Table) **R2 **includes a foreign key FK matching the primary key PK of some base relation **R1,** then every value of FK in R2 must either be equal to the value of PK in some tuple of R1 or be wholly null.
- A given foreign key value must have matching primary key value in some tuple of the referenced relation if that foreign key value is non null.
- Sometimes it is necessary to permit foreign keys to accept nulls.
- Here, it must be noted that the null are of ‘value does not exist’ rather than ‘value unknown’ variety.

Related Posts

- [SQL: Index Vs Key Real Differences](https://srinimf.com/2018/06/29/sql-index-vs-key-real-differences-to-learn-now-quickly/)DateJune 29, 2018
- [5 Drawbacks of File-system Over RDBMS](https://srinimf.com/2016/06/15/5-drawbacks-in-file-system-and-rdbms-importance/)DateJune 15, 2016
- [SQL Vs. NoSQL Top Differences Simplified](https://srinimf.com/2014/03/06/sql-nosql-comparision/)DateMarch 6, 2014

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2017%2F09%2F21%2Ftop-two-integrity-rules-for-rdbms-relational-model%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2021%2F09%2Fpexels-photo-279607.jpeg%3Ffit%3D1200%252C797%26ssl%3D1&description=Entity%20Vs%20Referential%20Integrity%20in%20RDBMS)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2017/09/21/top-two-integrity-rules-for-rdbms-relational-model/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2017/09/21/top-two-integrity-rules-for-rdbms-relational-model/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2017/09/21/top-two-integrity-rules-for-rdbms-relational-model/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2017/09/21/top-two-integrity-rules-for-rdbms-relational-model/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Entity%20Vs%20Referential%20Integrity%20in%20RDBMS&body=https%3A%2F%2Fsrinimf.com%2F2017%2F09%2F21%2Ftop-two-integrity-rules-for-rdbms-relational-model%2F&share=email)
-

### Like this:

Like Loading…
