7
The **Engine** is the starting point for any SQLAlchemy application. It's
8
"home base" for the actual database and its DBAPI, delivered to the SQLAlchemy
9
application through a connection pool and a **Dialect**, which describes how
7
The :class:`.Engine` is the starting point for any SQLAlchemy application. It's
8
"home base" for the actual database and its :term:`DBAPI`, delivered to the SQLAlchemy
9
application through a connection pool and a :class:`.Dialect`, which describes how
10
10
to talk to a specific kind of database/DBAPI combination.
12
12
The general structure can be illustrated as follows:
14
14
.. image:: sqla_engine_arch.png
16
Where above, an :class:`~sqlalchemy.engine.base.Engine` references both a
17
:class:`~sqlalchemy.engine.base.Dialect` and a :class:`~sqlalchemy.pool.Pool`,
16
Where above, an :class:`.Engine` references both a
17
:class:`.Dialect` and a :class:`.Pool`,
18
18
which together interpret the DBAPI's module functions as well as the behavior
45
45
Supported Databases
46
46
====================
48
SQLAlchemy includes many :class:`~sqlalchemy.engine.base.Dialect` implementations for various
49
backends; each is described as its own package in the :ref:`sqlalchemy.dialects_toplevel` package. A
50
SQLAlchemy dialect always requires that an appropriate DBAPI driver is installed.
52
The table below summarizes the state of DBAPI support in SQLAlchemy 0.7. The values
55
* yes / Python platform - The SQLAlchemy dialect is mostly or fully operational on the target platform.
56
* yes / OS platform - The DBAPI supports that platform.
57
* no / Python platform - The DBAPI does not support that platform, or there is no SQLAlchemy dialect support.
58
* no / OS platform - The DBAPI does not support that platform.
59
* partial - the DBAPI is partially usable on the target platform but has major unresolved issues.
60
* development - a development version of the dialect exists, but is not yet usable.
61
* thirdparty - the dialect itself is maintained by a third party, who should be consulted for
62
information on current support.
63
* \* - indicates the given DBAPI is the "default" for SQLAlchemy, i.e. when just the database name is specified
65
=============================================================== =========================== =========== =========== =========== ================= ============
66
Driver Connect string Py2K Py3K Jython Unix Windows
67
=============================================================== =========================== =========== =========== =========== ================= ============
69
ibm-db_ thirdparty thirdparty thirdparty thirdparty thirdparty thirdparty
70
**Drizzle** :ref:`(docs) <drizzle_toplevel>`
71
mysql-python_ ``drizzle+mysqldb``\* yes development no yes yes
72
**Firebird / Interbase** :ref:`(docs) <firebird_toplevel>`
73
kinterbasdb_ ``firebird+kinterbasdb``\* yes development no yes yes
74
**Informix** :ref:`(docs) <informix_toplevel>`
75
informixdb_ ``informix+informixdb``\* yes development no unknown unknown
76
**MaxDB** :ref:`(docs) <maxdb_toplevel>`
77
sapdb_ ``maxdb+sapdb``\* development development no yes unknown
78
**Microsoft Access** :ref:`(docs) <access_toplevel>`
79
pyodbc_ ``access+pyodbc``\* development development no unknown yes
80
**Microsoft SQL Server** :ref:`(docs) <mssql_toplevel>`
81
adodbapi_ ``mssql+adodbapi`` development development no no yes
82
`jTDS JDBC Driver`_ ``mssql+zxjdbc`` no no development yes yes
83
mxodbc_ ``mssql+mxodbc`` yes development no yes with FreeTDS_ yes
84
pyodbc_ ``mssql+pyodbc``\* yes development no yes with FreeTDS_ yes
85
pymssql_ ``mssql+pymssql`` yes development no yes yes
86
**MySQL** :ref:`(docs) <mysql_toplevel>`
87
`MySQL Connector/J`_ ``mysql+zxjdbc`` no no yes yes yes
88
`MySQL Connector/Python`_ ``mysql+mysqlconnector`` yes development no yes yes
89
mysql-python_ ``mysql+mysqldb``\* yes development no yes yes
90
OurSQL_ ``mysql+oursql`` yes yes no yes yes
91
pymysql_ ``mysql+pymysql`` yes development no yes yes
92
rdbms_ (Google Appengine) ``mysql+gaerdbms`` yes development no no no
93
**Oracle** :ref:`(docs) <oracle_toplevel>`
94
cx_oracle_ ``oracle+cx_oracle``\* yes development no yes yes
95
`Oracle JDBC Driver`_ ``oracle+zxjdbc`` no no yes yes yes
96
**Postgresql** :ref:`(docs) <postgresql_toplevel>`
97
pg8000_ ``postgresql+pg8000`` yes yes no yes yes
98
`PostgreSQL JDBC Driver`_ ``postgresql+zxjdbc`` no no yes yes yes
99
psycopg2_ ``postgresql+psycopg2``\* yes yes no yes yes
100
pypostgresql_ ``postgresql+pypostgresql`` no yes no yes yes
101
**SQLite** :ref:`(docs) <sqlite_toplevel>`
102
pysqlite_ ``sqlite+pysqlite``\* yes yes no yes yes
103
sqlite3_ ``sqlite+pysqlite``\* yes yes no yes yes
104
**Sybase ASE** :ref:`(docs) <sybase_toplevel>`
105
mxodbc_ ``sybase+mxodbc`` development development no yes yes
106
pyodbc_ ``sybase+pyodbc``\* partial development no unknown unknown
107
python-sybase_ ``sybase+pysybase`` yes [1]_ development no yes yes
108
=============================================================== =========================== =========== =========== =========== ================= ============
110
.. [1] The Sybase dialect currently lacks the ability to reflect tables.
111
.. _psycopg2: http://www.initd.org/
112
.. _pg8000: http://pybrary.net/pg8000/
113
.. _pypostgresql: http://python.projects.postgresql.org/
114
.. _mysql-python: http://sourceforge.net/projects/mysql-python
115
.. _MySQL Connector/Python: https://launchpad.net/myconnpy
116
.. _OurSQL: http://packages.python.org/oursql/
117
.. _pymysql: http://code.google.com/p/pymysql/
118
.. _rdbms: https://developers.google.com/cloud-sql/docs/developers_guide_python
119
.. _PostgreSQL JDBC Driver: http://jdbc.postgresql.org/
120
.. _sqlite3: http://docs.python.org/library/sqlite3.html
121
.. _pysqlite: http://pypi.python.org/pypi/pysqlite/
122
.. _MySQL Connector/J: http://dev.mysql.com/downloads/connector/j/
123
.. _cx_Oracle: http://cx-oracle.sourceforge.net/
124
.. _Oracle JDBC Driver: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
125
.. _kinterbasdb: http://firebirdsql.org/index.php?op=devel&sub=python
126
.. _pyodbc: http://code.google.com/p/pyodbc/
127
.. _mxodbc: http://www.egenix.com/products/python/mxODBC/
128
.. _FreeTDS: http://www.freetds.org/
129
.. _adodbapi: http://adodbapi.sourceforge.net/
130
.. _pymssql: http://code.google.com/p/pymssql/
131
.. _jTDS JDBC Driver: http://jtds.sourceforge.net/
132
.. _ibm-db: http://code.google.com/p/ibm-db/
133
.. _informixdb: http://informixdb.sourceforge.net/
134
.. _sapdb: http://www.sapdb.org/sapdbapi.html
135
.. _python-sybase: http://python-sybase.sourceforge.net/
137
Further detail on dialects is available at :ref:`dialect_toplevel`.
48
SQLAlchemy includes many :class:`.Dialect` implementations for various
49
backends. Dialects for the most common databases are included with SQLAlchemy; a handful
50
of others require an additional install of a separate dialect.
52
See the section :ref:`dialect_toplevel` for information on the various backends available.
140
56
.. _create_engine_args: