---
title: Schema design
sidebar_label: Schema design
description: Best practices for designing efficient PostgreSQL schemas and managing database objects.
---

# Schema design

Best practices for designing efficient PostgreSQL schemas and managing database objects.

## Guides by category

### DDL operations

Safely perform schema changes with minimal downtime.

- [How to redefine a PK without downtime](/docs/postgres-howtos/schema-design/ddl-operations/how-to-redefine-a-PK-without-downtime) - 6 min *(intermediate)*
- [How to drop a column](/docs/postgres-howtos/schema-design/ddl-operations/how-to-drop-a-column) - 5 min *(advanced)*
- [How to add a column](/docs/postgres-howtos/schema-design/ddl-operations/how-to-add-a-column) - 5 min *(advanced)*
- [How to add a CHECK constraint without downtime](/docs/postgres-howtos/schema-design/ddl-operations/how-to-add-a-check-constraint-without-downtime) - 5 min *(intermediate)*

### Data types

Choose the right data types and understand their performance implications.

- [How to use UUID](/docs/postgres-howtos/schema-design/data-types/how-to-use-uuid) - 5 min *(intermediate)*
- [UUID v7 and partitioning (TimescaleDB)](/docs/postgres-howtos/schema-design/data-types/uuid-v7-and-partitioning-timescaledb) - 5 min *(advanced)*
- [How to quickly check data type and storage size of a value](/docs/postgres-howtos/schema-design/data-types/how-to-quickly-check-data-type-and-storage-size-of-a-value) - 5 min *(intermediate)*

### Constraints

Implement and manage database constraints effectively.

- [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) - 5 min
- [How to remove a foreign key](/docs/postgres-howtos/schema-design/constraints/how-to-remove-a-foreign-key) - 5 min
- [How to add a foreign key](/docs/postgres-howtos/schema-design/constraints/how-to-add-a-foreign-key) - 5 min

