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

模型是您的数据唯一而且准确的信息来源。它包含您正在储存的数据的重要字段和行为。一般来说，每一个模型都映射一个数据库表。

- [模型](/zh-hans/2.0/topics/db/models/)
- [Making queries](/zh-hans/2.0/topics/db/queries/)
- [聚合](/zh-hans/2.0/topics/db/aggregation/)
- [Search](/zh-hans/2.0/topics/db/search/)
- [Managers](/zh-hans/2.0/topics/db/managers/)
- [Performing raw SQL queries](/zh-hans/2.0/topics/db/sql/)
- [数据库事务](/zh-hans/2.0/topics/db/transactions/)
- [Multiple databases](/zh-hans/2.0/topics/db/multi-db/)
- [Tablespaces](/zh-hans/2.0/topics/db/tablespaces/)
- [Database access optimization](/zh-hans/2.0/topics/db/optimization/)
- [Database instrumentation](/zh-hans/2.0/topics/db/instrumentation/)
- [Examples of model relationship API usage](/zh-hans/2.0/topics/db/examples/)
