Maintaining Database Integrity: Ensuring Consistency & Validity - Essay Sample

Paper Type:  Essay
Pages:  3
Wordcount:  699 Words
Date:  2023-08-13

Introduction

Database integrity is essential to every organization that stores data on a massive scale (Connolly & Begg, 2015). Maintaining database integrity ensures the consistency and validity of stored data. In the concept of database integrity, integrity is expressed in the form of constraints. These constraints are consistency rules, which the database should not violate. Constraints apply to all relationships between units. Although the concept of database integrity is broad, it is possible to understand its purpose and methodology (Connolly & Begg, 2015). Hence, this paper seeks to explore the purpose of integrity constraints and identify the main types of integrity constraints on a logical data model.

Trust banner

Is your time best spent reading someone else’s essay? Get a 100% original essay FROM A CERTIFIED WRITER!

Integrity constraints constitute a mechanism used to limit the possible states of a database (Pokorný et al., 2017). Also, integrity constraints can be viewed as tools that are used to ensure the consistency and accuracy of data within a relational database. Without integrity constraints, updates, data insertion, and other database processes cannot perform effectively. Most importantly, data integrity would be affected. When changes are made by authorized users, integrity constraints ensure that those changes do not result in loss of data integrity. Thus, integrity constraints guard a database against accidental damage (Pokorný et al., 2017).

There are various types of integrity constraints. They include domain integrity, referential integrity, entity integrity, and key constraints (Pokorný et al., 2017). Domain integrity defines a data type, size, length, and range. In addition to this, domain integrity determines if a value is an attribute’s value is unique. Domain integrity also defines the specific values for an attribute and the default value. Entity integrity is a rule which states that in a database, any relation value cannot be null. According to the constraint of referential integrity, if a foreign key value exists, then it must match the primary key value unless the foreign key value is null (Pokorný et al., 2017). Referential integrity includes four rules which every database must follow. The first rule is that a record cannot be deleted from the primary table if matching records already exist in a related table. The second rule is that the key value in the primary table cannot be changed if there are related records. The third rule is that a value cannot be entered in the foreign key field of a related table if the value does not exist in the primary key field. The fourth rule is that a null value can be entered in the foreign key field provided that the records are unrelated (Pokorný et al., 2017).

Key constraints determine the unique identifiers within the subsets of a relation (Pokorný et al., 2017). Key constraints can be further subdivided into primary, unique, foreign, not null, and check constraints. A primary key is used to identify the columns that make a certain row of data exclusive. Typically, a primary key only consists of a single column. However, a primary key can also comprise more than one column. A unique constraint is similar to a primary key because every value in that column must be unique. However, unlike a primary key, a unique constraint can be placed on another column albeit it is not in use as a primary key (Pokorný et al., 2017).

A foreign key also includes a column in a table. However, in this case, the column is normally in a child table. The foreign key is used to orient a primary key in a parent table (Pokorný et al., 2017). Foreign key constraints are the main mechanisms used to implement referential integrity within a database. A not-null constraint is used to disallow the entry of null values in a column. However, null is normally the default where not null is unspecified. Check constraints are used to check for the validity of data entering columns within a table. Also, check constraints are used as data protective tools since they enable back-end database edits (Pokorný et al., 2017).

References

Connolly, T. M., & Begg, C. E. (2015). Database systems: A practical approach to design, implementation, and management. Pearson Education.

Pokorný, J., Valenta, M., & Kovacic, J. (2017). Integrity constraints in graph databases. Procedia Computer Science, 109, 975-981. https://doi.org/10.1016/j.procs.2017.05.456

Cite this page

Maintaining Database Integrity: Ensuring Consistency & Validity - Essay Sample. (2023, Aug 13). Retrieved from https://proessays.net/essays/maintaining-database-integrity-ensuring-consistency-validity-essay-sample

logo_disclaimer
Free essays can be submitted by anyone,

so we do not vouch for their quality

Want a quality guarantee?
Order from one of our vetted writers instead

If you are the original author of this essay and no longer wish to have it published on the ProEssays website, please click below to request its removal:

didn't find image

Liked this essay sample but need an original one?

Hire a professional with VAST experience and 25% off!

24/7 online support

NO plagiarism