---
title: Constraints
sidebar_label: Constraints
description: Foreign keys, check constraints, and data integrity
---

# Constraints

Foreign keys, check constraints, and data integrity

## How-to guides

### [How to add a foreign key](/docs/postgres-howtos/schema-design/constraints/how-to-add-a-foreign-key)

*Difficulty: intermediate • Time: 5 min*

### [How to remove a foreign key](/docs/postgres-howtos/schema-design/constraints/how-to-remove-a-foreign-key)

*Difficulty: intermediate • Time: 5 min*

### [How to find int4 PKs with out-of-range risks in a large database](/docs/postgres-howtos/schema-design/constraints/how-to-find-int4-pks-with-out-of-range-risks)

*Difficulty: intermediate • Time: 5 min*

