Integrity In Database Research

1421 Words6 Pages
DBS401 Assignment 3 Christopher Canning 55858317

Question 1: [5]
Explain why are entity integrity and referential integrity important in a database?

Entity Integrity:

The relational model states that every relation, it must have an identifier, called the primary key (PK), in such a way that every row of the same relation be identifiable by its content, that is, by a unique and minimal value. The PK is a non-null set of attributes. The same format applies to the foreign key (FK) because each foreign key matches an existing primary key. A simple constraint of database relational model (RM) that refers to the analysis of the primary key, but afterwards, the same format is applied to the foreign key and, also to any of simple components
…show more content…
An ER diagram’s structure should depict a company’s operations if the database is required to meet the organization's data requirements. It forms the foundation for whether the included entities are correct and adequate as well as on the relationships between those entities. It is also used as a final cross check against the proposed data dictionary entries, in other words, the data dictionary contains descriptions about the data objects. When designing database tables, the difference between a good, efficient design and a bad design can be a few seconds in response time to several minutes. The completed ER diagram also lets the designer communicate more precisely with those who constructed the database design. The completed ER diagram serves as the implementation guide to those who create the actual database, so essentially the ER diagram is as important to the database designer as a blueprint is to the architect and…show more content…
The only importance of the surrogate key is to act as the primary key. It is also possible that the surrogate key exists.
A surrogate key is frequently a sequential number. Some databases provide a universally unique identifier (UUID) as a possible data type for surrogate keys.
Having the key independent of all other columns protects the database relationships from changes in data values or database design, which in turn makes the database more agile and guarantees uniqueness.
In a temporal database which comes with built-in support for handling data involving time, it is necessary to distinguish between the surrogate key and the business key. Every row would have both a business key and a surrogate key. The surrogate key identifies one unique row in the database, the business key identifies one unique entity of the modelled world. One table row represents a snapshot of time holding all the entities attributes for a defined time period. Those slices depict the whole lifespan of one business entity. For example, a table “EmployeeContracts” may hold temporal information to keep track of working hours of employees. The business key for one employee will be identical in both rows however the surrogate key for each row is
Open Document