---
title: "模型和数据库"
version: 5.1
locale: zh-hans
source: https://docs.djangoproject.com/zh-hans/5.1/topics/db/
canonical: https://djangodocs.dev/zh-hans/5.1/topics/db/
---
# 模型和数据库

模型准确且唯一的描述了数据。它包含您储存的数据的重要字段和行为。一般来说，每一个模型都映射一张数据库表。

- [模型](/zh-hans/5.1/topics/db/models/)
- [执行查询](/zh-hans/5.1/topics/db/queries/)
- [聚合](/zh-hans/5.1/topics/db/aggregation/)
- [搜索](/zh-hans/5.1/topics/db/search/)
- [管理器](/zh-hans/5.1/topics/db/managers/)
- [执行原生 SQL 查询](/zh-hans/5.1/topics/db/sql/)
- [数据库事务](/zh-hans/5.1/topics/db/transactions/)
- [多数据库](/zh-hans/5.1/topics/db/multi-db/)
- [表空间（Tablespaces）](/zh-hans/5.1/topics/db/tablespaces/)
- [数据库访问优化](/zh-hans/5.1/topics/db/optimization/)
- [数据库工具](/zh-hans/5.1/topics/db/instrumentation/)
- [辅助工具](/zh-hans/5.1/topics/db/fixtures/)
- [模型关联 API 用法示例](/zh-hans/5.1/topics/db/examples/)
