answersLogoWhite

0

ENTITY INTEGRITY In a relational database, entity integrity is a property that ensures that no records are duplicated and that no attributes that make up the primary key are NULL. It is one of the properties necessary to ensure the consistency of the database. 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. Entity integrity specifies that the Primary Keys on every instance of an entity must be kept, must be unique and must have values other than NULL. Although most relational databases do not specifically dictate that a table needs to have a Primary Key, it is good practice to design a Primary Key for each table in the relational model. This mandates no NULL content, so that every row in a table must have a value that denotes the row as a unique element of the entity. Entity Integrity is the mechanism the system provides to maintain primary keys. 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. The primary key is not null, no component of the primary key may be set to null. The uniqueness property ensures that the primary key of each row uniquely identifies it; there are no duplicates. The second property ensures that the primary key has meaning, has a value; no component of the key is missing. The system enforces Entity Integrity by not allowing operations (INSERT, UPDATE) to produce an invalid primary key. Any operation that creates a duplicate primary key or one containing nulls is rejected. REFERENTIAL INTEGRITY A database management safeguard that ensures every foreign key matches a primary key. For example, customer numbers in a customer file are the primary keys, and customer numbers in the order file are the foreign keys. If a customer record is deleted, the order records must also be deleted; otherwise they are left without a primary reference. If the DBMS does not test for this, it must be programmed into the applications. Referential integrity in a relational database is consistency between coupled tables. Referential integrity is usually enforced by the combination of a primary key(candidate key) and a foreign key. For referential integrity to hold, any field in a table that is declared a foreign key can contain only values from a parent table's primary key or a candidate key. For instance, deleting a record that contains a value referred to by a foreign key in another table would break referential integrity. The RDBMS enforces referential integrity, normally either by deleting the foreign key rows as well to maintain integrity, or by returning an error and not performing the delete. Which method is used would be defined by the definition of the referential integrity constraint. An employee database stores the department in which each employee works. The field "DepartmentNumber" in the Employee table is declared a foreign key, and it refers to the field "Index" in the Department table which is declared a primary key. Referential integrity would be broken by deleting a department from the Department table if employees listed in the Employee table are listed as working for that department, unless those employees are moved to a different department at the same time. Thanks Nida

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

Research on differences between the moral reasoning of males and females has shown that?

there are significant differences between moral reasoning of men and women


What is the differences between motivation and morale?

moral is diffrent than motivation :)


What is moral integrity?

Moral integrity refers to the adherence to ethical principles and values, even when faced with difficult choices or tempting alternatives. It involves being honest, consistent, and acting in alignment with one's beliefs and values, regardless of external pressures or circumstances.


What word matches the definition moral rightness?

The word that matches the definition of moral rightness is "integrity." Integrity refers to the quality of being honest and having strong moral principles.


What is unity and integrity?

Unity and integrity means people are united and honest/moral.


Why would people vote for someone with integrity?

Integrity: adherence to moral and ethical principles; soundness of moral character; honesty. Because it would be foolish not to.


What is Integrity associated with?

Integrity is associated with honesty, ethics, and moral principles. It involves doing the right thing even when no one is watching and maintaining consistency between one's beliefs and actions.


Where does one get integrity?

A person gets integrity from being conscious about their conscience--their moral capacity. Having integrity means being honest, truthful, ethical, not cutting corners, and having a strong moral compass. People with integrity are trustworthy and therefore, respected.


A definition of integrity that kids understand?

Moral Soundness


How do you say you have integrity?

You can say "I have integrity" to convey that you possess strong moral principles and honesty in your actions and decisions.


What are the values of joint service integrity competence?

Integrity, competence, physical courage, moral courage and teamwork


What is spiritual aspect of personality?

Creating and maintaining Moral Integrity