Referential Integrity Easy Definition Essay

refers to the accuracy and consistency of data within a relationship.

In relationships, data is linked between two or more tables. This is achieved by having the foreign key (in the associated table) reference a primary key value (in the primary – or parent – table). Because of this, we need to ensure that data on both sides of the relationship remain intact.

So, referential integrity requires that, whenever a foreign key value is used it must reference a valid, existing primary key in the parent table.


For example, if we delete record number 15 in a primary table, we need to be sure that there’s no foreign key in any related table with the value of 15. We should only be able to delete a primary key if there are no associated records. Otherwise, we would end up with an orphaned record.

Here, the related table contains a foreign key value that doesn’t exist in the primary key field of the primary table (i.e. the “CompanyId” field). This has resulted in an “orphaned record”.

So referential integrity will prevent users from:

  • Adding records to a related table if there is no associated record in the primary table.
  • Changing values in a primary table that result in orphaned records in a related table.
  • Deleting records from a primary table if there are matching related records.

Consequences of a Lack of Referential Integrity

A lack of referential integrity in a database can lead to incomplete data being returned, usually with no indication of an error. This could result in records being “lost” in the database, because they’re never returned in queries or reports.

It could also result in strange results appearing in reports (such as products without an associated company).

Or worse yet, it could result in customers not receiving products they paid for.

Worse still, it could affect life and death situations, such as a hospital patient not receiving the correct treatment, or a disaster relief team not receiving the correct supplies or information.

Data Integrity

Referential integrity is a subset of data integrity, which is concerned with the accuracy and consistency of all data (relationship or otherwise). Maintaining data integrity is a crucial part of working with databases.

Is Tess in ‘Tess of the d'Urbervilles' portrayed as being responsible for her own demise? [pdf 40 KB]

Yours is a beautifully clear essay. You write very well, and your prose is delightful to read. You've also done your research and it shows. There is a remarkable lack of vagary about society or feminism in your piece, and you've picked canny quotes from your secondary sources that elucidate and situate your arguments.

You've also located some wonderfully specific quotations from your primary source to support your argument that Hardy's narrator sympathises with Tess. Some of your close readings are wonderfully astute, as when you point out that Tess implores Angel, rather than commanding him. Slightly less persuasive is your assertion that Tess is the victim of Alec's eyes; I suspect you might have found better quotations, descriptions, or incidents denouncing Alec's gaze.

You are clearly very good at pursuing and proving an argument. I encourage you to be a bit more experimental in your next essay; perhaps choose a less straightforward topic and see where it takes you.

Please see penciled notes throughout on shortening sentences and watching for comma splices (please look this term up in a style manual if it is unfamiliar).


Leave a Reply

Your email address will not be published. Required fields are marked *