Prepare for the A Level Computer Science OCR Exam with comprehensive quizzes that cover essential topics, flashcards, and detailed explanations to help you excel. Ace your exam with confidence!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What is referred to as referential integrity in a database?

  1. The ability to query data efficiently

  2. The consistency of data across related tables

  3. The speed of data retrieval

  4. The storage capacity of a database

The correct answer is: The consistency of data across related tables

Referential integrity refers specifically to the consistency of data across related tables within a database. This concept ensures that relationships between tables remain valid and reliable. For instance, if one table contains a foreign key that references a primary key in another table, referential integrity guarantees that every value of the foreign key matches a corresponding value in the primary key table. This prevents orphaned records—records that reference a non-existent entity—thereby maintaining the accuracy and integrity of the data throughout the database. In contrast, the other options refer to different aspects of database management and operation. Query efficiency pertains to how quickly and effectively data can be retrieved from the database, which does not directly relate to maintaining the relationship integrity. Speed of data retrieval looks at performance measures and optimization, rather than the validity of the relationships between records. Storage capacity discusses the limits of physical space available for data within the database, which is unrelated to the logical consistency of the data itself. Thus, referential integrity stands out as a crucial mechanism for preserving the coherence and reliability of data relationships in database systems.