Class Doctrine\DBAL\Schema\Schema

extends AbstractAsset

Object representation of a database schema.

Different vendors have very inconsistent naming with regard to the concept of a "schema". Doctrine understands a schema as the entity that conceptually wraps a set of database objects such as tables, sequences, indexes and foreign keys that belong to each other into a namespace. A Doctrine Schema has nothing to do with the "SCHEMA" defined as in PostgreSQL, it is more related to the concept of "DATABASE" that exists in MySQL and PostgreSQL.

Every asset in the doctrine schema has a name. A name consists of either a namespace.local name pair or just a local unqualified name.

The abstraction layer that covers a PostgreSQL schema is the namespace of an database object (asset). A schema can have a name, which will be used as default namespace for the unqualified database objects that are created in the schema.

In the case of MySQL where cross-database queries are allowed this leads to databases being "misinterpreted" as namespaces. This is intentional, however the CREATE/DROP SQL visitors will just filter this queries and do not execute them. Only the queries for the currently connected database are executed.

Methods
Methods inherited from Doctrine\DBAL\Schema\AbstractAsset
isInDefaultNamespace(), getNamespaceName(), getShortestName(), getFullQualifiedName(), isQuoted(), getName(), getQuotedName()