# Constraint

A rule the database enforces to protect valid and consistent data.

## What does **Constraint** do in a relational database?

**Constraint** — A rule the database enforces to protect valid and consistent data.

Level: Novice · [More Database terms at this level](https://www.ask-codey.com/glossary/subjects/database/novice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/constraint
