What is the difference between schema and database?
Database schema are the logical structure of entities (tables or
object classes) and their relationships (keys, or object
associations) in a database. Schema can exist at different levels
of abstraction (see: en.wikipedia.org/wiki/Database_schema). Schema
themselves may or may not exist as such in a database. In general
schema at the higher levels of abstraction are design models that
are captured in printed documents, and authored by business
analysts and database designers, rather than created by database
programmers and stored in the database itself. But in some types of
databases, schema at any level of abstaction can be realized
physically. In Oracle databases, schema can be realized as schema
objects, which are a part of an Oracle database. These schema
objects may represent a human user's conceptual model of the
knowledge captured in an enterprise database. Thus defined, there
can be many schema that can be associated with one physical
database. In other kinds of relational database, an abstract user's
schema can be represented by logically linked metadata, views, and
stored procedures assocated with a user class. In object-oriented
databases, especially those based on the highly self-referential
language Smalltalk (e.g. Gemstone/S), schema are realized as
"physical" objects in the database as a matter of course, as well
as in the logical models captured in design documents. The schema
objects in such databases are, in essence, the classes comprising
the infrastructure of the database or application. Oracle-style
user schema are readily created; these would be realized as user
interface orchestrator classes.