~ubuntu-branches/debian/sid/sqlalchemy/sid

« back to all changes in this revision

Viewing changes to doc/_sources/core/schema.txt

  • Committer: Package Import Robot
  • Author(s): Piotr Ożarowski
  • Date: 2014-06-27 20:17:13 UTC
  • mfrom: (1.4.28)
  • Revision ID: package-import@ubuntu.com-20140627201713-g6p1kq8q1qenztrv
Tags: 0.9.6-1
* New upstream release
* Remove Python 3.X build tag files, thanks to Matthias Urlichs for the
  patch (closes: #747852)
* python-fdb isn't in the Debian archive yet so default dialect for firebird://
  URLs is changed to obsolete kinterbasdb, thanks to Russell Stuart for the
  patch (closes: #752145)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. _schema_toplevel:
2
 
 
3
 
==========================
4
 
Schema Definition Language
5
 
==========================
6
 
 
7
 
.. module:: sqlalchemy.schema
8
 
 
9
 
This section references SQLAlchemy **schema metadata**, a comprehensive system of describing and inspecting
10
 
database schemas.
11
 
 
12
 
The core of SQLAlchemy's query and object mapping operations are supported by
13
 
*database metadata*, which is comprised of Python objects that describe tables
14
 
and other schema-level objects. These objects are at the core of three major
15
 
types of operations - issuing CREATE and DROP statements (known as *DDL*),
16
 
constructing SQL queries, and expressing information about structures that
17
 
already exist within the database.
18
 
 
19
 
Database metadata can be expressed by explicitly naming the various components
20
 
and their properties, using constructs such as
21
 
:class:`~sqlalchemy.schema.Table`, :class:`~sqlalchemy.schema.Column`,
22
 
:class:`~sqlalchemy.schema.ForeignKey` and
23
 
:class:`~sqlalchemy.schema.Sequence`, all of which are imported from the
24
 
``sqlalchemy.schema`` package. It can also be generated by SQLAlchemy using a
25
 
process called *reflection*, which means you start with a single object such
26
 
as :class:`~sqlalchemy.schema.Table`, assign it a name, and then instruct
27
 
SQLAlchemy to load all the additional information related to that name from a
28
 
particular engine source.
29
 
 
30
 
A key feature of SQLAlchemy's database metadata constructs is that they are
31
 
designed to be used in a *declarative* style which closely resembles that of
32
 
real DDL. They are therefore most intuitive to those who have some background
33
 
in creating real schema generation scripts.
34
 
 
35
 
.. toctree::
36
 
    :maxdepth: 1
37
 
 
38
 
    metadata
39
 
    reflection
40
 
    defaults
41
 
    constraints
42
 
    ddl
43
 
 
44
 
 
45