Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
Integrity Rules are imperative to a good database design. Most RDBMS have these rules automatically, but it is safer to just make sure that the rules are already applied in the design. There are two types of integrity mentioned in integrity rules, entity and reference. Two additional rules that aren't necessarily included in integrity rules but are pertinent to database designs are business rules and domain rules.
Entity integrity exists when each primary key within a table has a value that is unique. this ensures that each row is uniquely identified by the primary key.One requirement for entity integrity is that a primary key cannot have a null value. The purpose of this integrity is to have each row to have a unique identity, and foreign key values can properly reference primary key values.
Reference integrity exists when a foreign contains a value that value refers to an exiting tuple/row in another relation. The purpose of reference integrity is to make it impossible to delete a row in one table whose primary key has mandatory matching foreign key values in another table.
Business rules are constraints or defintions created by some aspect of a business. They can apply to almost all aspects of a business and are meant to describte operations of a business. An example of a business rule might be no credit check is to be performed on return customers. This example would change a database design for a car company.
Domain rules or integrity specify that al columns in a database must be declared upon a defined domain. A domain is a set values of the same value type.
Other integrity rules include not null and unique constraints. The not null constraint can be placed on a column to ensure that every row in the table has a value for that column. The unique constraint is restriction placed on a column to ensure that no duplicate values exist for that column.