0
0
DBMS Theoryknowledge~5 mins

Integrity constraints in DBMS Theory - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What are integrity constraints in a database?
Integrity constraints are rules that ensure the accuracy and consistency of data in a database. They prevent invalid data from being entered.
Click to reveal answer
beginner
Name the four main types of integrity constraints.
The four main types are: 1) Entity Integrity, 2) Referential Integrity, 3) Domain Integrity, and 4) User-Defined Integrity.
Click to reveal answer
beginner
What is Entity Integrity?
Entity Integrity ensures that each row in a table has a unique and non-null primary key, so every record can be uniquely identified.
Click to reveal answer
intermediate
Explain Referential Integrity with a real-life example.
Referential Integrity means that a foreign key in one table must match a primary key in another table or be null. For example, a student's course enrollment must refer to an existing course.
Click to reveal answer
beginner
What is Domain Integrity?
Domain Integrity restricts the type, format, or range of values that can be stored in a column, like allowing only dates or positive numbers.
Click to reveal answer
Which constraint ensures that a primary key cannot be null?
AEntity Integrity
BReferential Integrity
CDomain Integrity
DUser-Defined Integrity
What does Referential Integrity enforce?
APrimary keys must be unique
BData types must be consistent
CForeign keys must match primary keys or be null
DUser permissions on data
Which constraint restricts the allowed values in a column?
AEntity Integrity
BDomain Integrity
CReferential Integrity
DUser-Defined Integrity
User-Defined Integrity constraints are:
ARules defined by users for specific business needs
BOnly related to foreign keys
CAutomatically enforced by the database engine
DStandard rules like primary key uniqueness
What happens if an integrity constraint is violated?
AThe database ignores the violation
BThe database deletes the entire table
CThe database automatically fixes the data
DThe database rejects the data operation
Describe the four main types of integrity constraints and their purpose.
Think about how each rule helps keep data accurate and consistent.
You got /4 concepts.
    Explain with an example how Referential Integrity works in a database.
    Consider how tables relate to each other in real life.
    You got /3 concepts.