Skip to content
We areTOP 1%
DBMS & SQL · Beginner · Topic 2 of 5

Keys & Constraints

4 questions.
Your progress0%
1st Visit
0/4
2nd Visit
0/4
Revise
0/4

Overview

Keys identify rows and connect tables, while constraints are rules that the database checks on every insert, update and delete, so invalid data is rejected no matter which application writes it. Interviewers expect you to define each kind of key precisely and point it out in a small table, to explain how primary keys, unique keys and foreign keys behave, and to say what happens to child rows when a parent row is deleted. Constraints such as NOT NULL, CHECK and DEFAULT appear in almost every schema-design question, so practise writing a short CREATE TABLE statement that uses each of them.

Questions

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account