Home > Database > Mysql Tutorial > body text

Entity integrity rules in RDBMS

王林
Release: 2023-09-17 13:41:02
forward
1144 people have browsed it

RDBMS 中的实体完整性规则

For entity integrity rules, each table has a primary key.

Primary keys cannot have NULL values.

##Student_IDStudent AwardStudent_Awards

Above, you can see that our primary key is

Student_ID . We cannot treat Student_Awards as a primary key because not every student will receive that award.

Let’s see another example -

##Employee_ID

Employee Name

Employee_Age

Employee Location

In the above table, the primary key is

Employee_IDNow let us summarize the entities Integrity rules -

ensure that every tuple in the table is unique.
  • Each table has a primary key, such as
  • Student_ID
  • of the Student table. Each entity is unique.
  • The relational primary key of each row must have a unique value.
  • Primary keys cannot have NULL values ​​and must be unique.
  • An example could be Employee_ID
  • in the Employee table cannot be empty.

The above is the detailed content of Entity integrity rules in RDBMS. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!