What is the integrity of entity?
Entity integrity is one of the primary rules of the effective database design. It refers to the process of enforcing the primary key for each table in the database, where the key must be either a line or a combination of rows that are unique null values. By maintaining the integrity of entity, each record can be specifically identified in each database table using the primary key. This prevents duplicate records and other problems that would indirectly endanger the integrity of the database. In the absence of entity integrity, the items may be accidentally overlapped in the database because there will be no way to rip a specific item from the table. The primary key in the database is the value used to specific identification of each individual record. To be effective for the primary key, it must be unique; In other words, it must be impossible to get more records for a single primary key. Social Security number would be a good primary key for database focused on individual personal records in USAnd because two people never have the same number. Anyone looking for a specific social security number in the database would only read one record at a time by definition.
If you want to see the problems that arise in the absence of entity integrity through unique primary keys, you can imagine a database where the individual's surname is used as the primary key. Since more than one person can share surname, enter "Smith" or "Jones" because search criteria could create dozens of records. If this happens, the integrity of the database is questioned, as the end user no longer has the method for loading individual records.
The second part of the entity integrity states that the value selected as the primary key must never be an anull or empty value for any item in the database. If the primary key value remains zero for one or more records inDatabase, some records would not be impossible to obtain because zero value is insufficient to unique identification of these records. In other words, if the social security number is used as the primary key and the employee is not from the US and therefore does not have it, the record of a foreign employee cannot be identified using the primary key, invalidating the integrity of the database.