introduction.rst 1.25 KB
Newer Older
1 2 3 4
Introduction
============

The Doctrine database abstraction & access layer (DBAL) offers a
5
lightweight and thin runtime layer around a PDO-like API and a lot
6 7 8 9 10 11 12 13 14 15
of additional, horizontal features like database schema
introspection and manipulation through an OO API.

The fact that the Doctrine DBAL abstracts the concrete PDO API away
through the use of interfaces that closely resemble the existing
PDO API makes it possible to implement custom drivers that may use
existing native or self-made APIs. For example, the DBAL ships with
a driver for Oracle databases that uses the oci8 extension under
the hood.

16 17 18 19 20 21 22 23 24 25
The following database vendors are currently supported:

- MySQL
- Oracle
- Microsoft SQL Server
- PostgreSQL
- SAP Sybase SQL Anywhere
- SQLite
- Drizzle

26 27
The Doctrine 2 database layer can be used independently of the
object-relational mapper. In order to use the DBAL all you need is
28
the class loader provided by Composer, to be able to autoload the classes:
29

30
.. code-block:: php
31 32

    <?php
33 34
    
    require_once 'vendor/autoload.php';
35 36 37 38 39 40 41

Now you are able to load classes that are in the
``/path/to/doctrine`` directory like
``/path/to/doctrine/Doctrine/DBAL/DriverManager.php`` which we will
use later in this documentation to configure our first Doctrine
DBAL connection.