Because of the critical importance of database
technology to the smooth running of an
enterprise, database systems include complex
mechanisms to deliver the required
performance, security, and availability, and
allow database administrators to control the use
of these features.
Storage
Main articles: Computer data storage and
Database engine
Database storage is the container of the
physical materialization of a database. It
comprises the internal (physical) level in the
database architecture. It also contains all the
information needed (e.g., metadata, "data about
the data", and internal data structures) to
reconstruct the conceptual level and external
level from the internal level when needed.
Putting data into permanent storage is generally
the responsibility of the database engine a.k.a.
"storage engine". Though typically accessed by
a DBMS through the underlying operating
system (and often utilizing the operating
systems' file systems as intermediates for
storage layout), storage properties and
configuration setting are extremely important for
the efficient operation of the DBMS, and thus are
closely maintained by database administrators.
A DBMS, while in operation, always has its
database residing in several types of storage
(e.g., memory and external storage). The
database data and the additional needed
information, possibly in very large amounts, are
coded into bits. Data typically reside in the
storage in structures that look completely
different from the way the data look in the
conceptual and external levels, but in ways that
attempt to optimize (the best possible) these
levels' reconstruction when needed by users
and programs, as well as for computing
additional types of needed information from the
data (e.g., when querying the database).
Some DBMSs support specifying which
character encoding was used to store data, so
multiple encodings can be used in the same
database.
Various low-level database storage structures
are used by the storage engine to serialize the
data model so it can be written to the medium
of choice. Techniques such as indexing may be
used to improve performance. Conventional
storage is row-oriented, but there are also
column-oriented and correlation databases.
Materialized views
Main article: Materialized view
Often storage redundancy is employed to
increase performance. A common example is
storing materialized views, which consist of
frequently needed external views or query
results. Storing such views saves the expensive
computing of them each time they are needed.
The downsides of materialized views are the
overhead incurred when updating them to keep
them synchronized with their original updated
database data, and the cost of storage
redundancy.
Replication
Main article: Database replication
Occasionally a database employs storage
redundancy by database objects replication
(with one or more copies) to increase data
availability (both to improve performance of
simultaneous multiple end-user accesses to a
same database object, and to provide resiliency
in a case of partial failure of a distributed
database). Updates of a replicated object need
to be synchronized across the object copies. In
many cases the entire database is replicated.
Security
Main article: Database security
Database security deals with all various aspects
of protecting the database content, its owners,
and its users. It ranges from protection from
intentional unauthorized database uses to
unintentional database accesses by
unauthorized entities (e.g., a person or a
computer program).
Database access control deals with controlling
who (a person or a certain computer program)
is allowed to access what information in the
database. The information may comprise
specific database objects (e.g., record types,
specific records, data structures), certain
computations over certain objects (e.g., query
types, or specific queries), or utilizing specific
access paths to the former (e.g., using specific
indexes or other data structures to access
information). Database access controls are set
by special authorized (by the database owner)
personnel that uses dedicated protected
security DBMS interfaces.
This may be managed directly on an individual
basis, or by the assignment of individuals and
privileges to groups, or (in the most elaborate
models) through the assignment of individuals
and groups to roles which are then granted
entitlements. Data security prevents
unauthorized users from viewing or updating
the database. Using passwords, users are
allowed access to the entire database or
subsets of it called "subschemas". For example,
an employee database can contain all the data
about an individual employee, but one group of
users may be authorized to view only payroll
data, while others are allowed access to only
work history and medical data. If the DBMS
provides a way to interactively enter and update
the database, as well as interrogate it, this
capability allows for managing personal
databases.
Data security in general deals with protecting
specific chunks of data, both physically (i.e.,
from corruption, or destruction, or removal;
e.g., see physical security ), or the interpretation
of them, or parts of them to meaningful
information (e.g., by looking at the strings of
bits that they comprise, concluding specific
valid credit-card numbers; e.g., see data
encryption ).
Change and access logging records who
accessed which attributes, what was changed,
and when it was changed. Logging services
allow for a forensic database audit later by
keeping a record of access occurrences and
changes. Sometimes application-level code is
used to record changes rather than leaving this
to the database. Monitoring can be set up to
attempt to detect security breaches.
Transactions and concurrency
Database transactions can be used to introduce
some level of fault tolerance and data integrity
after recovery from a crash. A database
transaction is a unit of work, typically
encapsulating a number of operations over a
database (e.g., reading a database object,
writing, acquiring lock, etc.), an abstraction
supported in database and also other systems.
Each transaction has well defined boundaries in
terms of which program/code executions are
included in that transaction (determined by the
transaction's programmer via special
transaction commands).
The acronym ACID describes some ideal
properties of a database transaction: Atomicity ,
Consistency , Isolation , and Durability .
Further information: Concurrency control
Migration
See also section Database migration in
article Data migration
A database built with one DBMS is not portable
to another DBMS (i.e., the other DBMS cannot
run it). However, in some situations it is
desirable to move, migrate a database from one
DBMS to another. The reasons are primarily
economical (different DBMSs may have different
total costs of ownership or TCOs), functional,
and operational (different DBMSs may have
different capabilities). The migration involves the
database's transformation from one DBMS type
to another. The transformation should maintain
(if possible) the database related application
(i.e., all related application programs) intact.
Thus, the database's conceptual and external
architectural levels should be maintained in the
transformation. It may be desired that also
some aspects of the architecture internal level
are maintained. A complex or large database
migration may be a complicated and costly
(one-time) project by itself, which should be
factored into the decision to migrate. This in
spite of the fact that tools may exist to help
migration between specific DBMSs. Typically a
DBMS vendor provides tools to help importing
databases from other popular DBMSs.
Building, maintaining, and tuning
Main article: Database tuning
After designing a database for an application,
the next stage is building the database.
Typically an appropriate general-purpose DBMS
can be selected to be utilized for this purpose.
A DBMS provides the needed user interfaces to
be utilized by database administrators to define
the needed application's data structures within
the DBMS's respective data model. Other user
interfaces are used to select needed DBMS
parameters (like security related, storage
allocation parameters, etc.).
When the database is ready (all its data
structures and other needed components are
defined) it is typically populated with initial
application's data (database initialization, which
is typically a distinct project; in many cases
using specialized DBMS interfaces that support
bulk insertion) before making it operational. In
some cases the database becomes operational
while empty of application data, and data is
accumulated during its operation.
After the database is created, initialised and
populated it needs to be maintained. Various
database parameters may need changing and
the database may need to be tuned (tuning ) for
better performance; application's data
structures may be changed or added, new
related application programs may be written to
add to the application's functionality, etc.
Backup and restore
Main article: Backup
Sometimes it is desired to bring a database
back to a previous state (for many reasons,
e.g., cases when the database is found
corrupted due to a software error, or if it has
been updated with erroneous data). To achieve
this a backup operation is done occasionally or
continuously, where each desired database state
(i.e., the values of its data and their embedding
in database's data structures) is kept within
dedicated backup files (many techniques exist
to do this effectively). When this state is
needed, i.e., when it is decided by a database
administrator to bring the database back to this
state (e.g., by specifying this state by a desired
point in time when the database was in this
state), these files are utilized to restore that
state.
Other
Other DBMS features might include:
Database logs
Graphics component for producing graphs
and charts, especially in a data warehouse
system
Query optimizer – Performs query
optimization on every query to choose for it the
most efficient query plan (a partial order (tree)
of operations) to be executed to compute the
query result. May be specific to a particular
storage engine.
Tools or hooks for database design,
application programming, application program
maintenance, database performance analysis
and monitoring, database configuration
monitoring, DBMS hardware configuration (a
DBMS and related database may span
computers, networks, and storage units) and
related database mapping (especially for a
distributed DBMS), storage allocation and
database layout monitoring, storage migration,
etc.
technology to the smooth running of an
enterprise, database systems include complex
mechanisms to deliver the required
performance, security, and availability, and
allow database administrators to control the use
of these features.
Storage
Main articles: Computer data storage and
Database engine
Database storage is the container of the
physical materialization of a database. It
comprises the internal (physical) level in the
database architecture. It also contains all the
information needed (e.g., metadata, "data about
the data", and internal data structures) to
reconstruct the conceptual level and external
level from the internal level when needed.
Putting data into permanent storage is generally
the responsibility of the database engine a.k.a.
"storage engine". Though typically accessed by
a DBMS through the underlying operating
system (and often utilizing the operating
systems' file systems as intermediates for
storage layout), storage properties and
configuration setting are extremely important for
the efficient operation of the DBMS, and thus are
closely maintained by database administrators.
A DBMS, while in operation, always has its
database residing in several types of storage
(e.g., memory and external storage). The
database data and the additional needed
information, possibly in very large amounts, are
coded into bits. Data typically reside in the
storage in structures that look completely
different from the way the data look in the
conceptual and external levels, but in ways that
attempt to optimize (the best possible) these
levels' reconstruction when needed by users
and programs, as well as for computing
additional types of needed information from the
data (e.g., when querying the database).
Some DBMSs support specifying which
character encoding was used to store data, so
multiple encodings can be used in the same
database.
Various low-level database storage structures
are used by the storage engine to serialize the
data model so it can be written to the medium
of choice. Techniques such as indexing may be
used to improve performance. Conventional
storage is row-oriented, but there are also
column-oriented and correlation databases.
Materialized views
Main article: Materialized view
Often storage redundancy is employed to
increase performance. A common example is
storing materialized views, which consist of
frequently needed external views or query
results. Storing such views saves the expensive
computing of them each time they are needed.
The downsides of materialized views are the
overhead incurred when updating them to keep
them synchronized with their original updated
database data, and the cost of storage
redundancy.
Replication
Main article: Database replication
Occasionally a database employs storage
redundancy by database objects replication
(with one or more copies) to increase data
availability (both to improve performance of
simultaneous multiple end-user accesses to a
same database object, and to provide resiliency
in a case of partial failure of a distributed
database). Updates of a replicated object need
to be synchronized across the object copies. In
many cases the entire database is replicated.
Security
Main article: Database security
Database security deals with all various aspects
of protecting the database content, its owners,
and its users. It ranges from protection from
intentional unauthorized database uses to
unintentional database accesses by
unauthorized entities (e.g., a person or a
computer program).
Database access control deals with controlling
who (a person or a certain computer program)
is allowed to access what information in the
database. The information may comprise
specific database objects (e.g., record types,
specific records, data structures), certain
computations over certain objects (e.g., query
types, or specific queries), or utilizing specific
access paths to the former (e.g., using specific
indexes or other data structures to access
information). Database access controls are set
by special authorized (by the database owner)
personnel that uses dedicated protected
security DBMS interfaces.
This may be managed directly on an individual
basis, or by the assignment of individuals and
privileges to groups, or (in the most elaborate
models) through the assignment of individuals
and groups to roles which are then granted
entitlements. Data security prevents
unauthorized users from viewing or updating
the database. Using passwords, users are
allowed access to the entire database or
subsets of it called "subschemas". For example,
an employee database can contain all the data
about an individual employee, but one group of
users may be authorized to view only payroll
data, while others are allowed access to only
work history and medical data. If the DBMS
provides a way to interactively enter and update
the database, as well as interrogate it, this
capability allows for managing personal
databases.
Data security in general deals with protecting
specific chunks of data, both physically (i.e.,
from corruption, or destruction, or removal;
e.g., see physical security ), or the interpretation
of them, or parts of them to meaningful
information (e.g., by looking at the strings of
bits that they comprise, concluding specific
valid credit-card numbers; e.g., see data
encryption ).
Change and access logging records who
accessed which attributes, what was changed,
and when it was changed. Logging services
allow for a forensic database audit later by
keeping a record of access occurrences and
changes. Sometimes application-level code is
used to record changes rather than leaving this
to the database. Monitoring can be set up to
attempt to detect security breaches.
Transactions and concurrency
Database transactions can be used to introduce
some level of fault tolerance and data integrity
after recovery from a crash. A database
transaction is a unit of work, typically
encapsulating a number of operations over a
database (e.g., reading a database object,
writing, acquiring lock, etc.), an abstraction
supported in database and also other systems.
Each transaction has well defined boundaries in
terms of which program/code executions are
included in that transaction (determined by the
transaction's programmer via special
transaction commands).
The acronym ACID describes some ideal
properties of a database transaction: Atomicity ,
Consistency , Isolation , and Durability .
Further information: Concurrency control
Migration
See also section Database migration in
article Data migration
A database built with one DBMS is not portable
to another DBMS (i.e., the other DBMS cannot
run it). However, in some situations it is
desirable to move, migrate a database from one
DBMS to another. The reasons are primarily
economical (different DBMSs may have different
total costs of ownership or TCOs), functional,
and operational (different DBMSs may have
different capabilities). The migration involves the
database's transformation from one DBMS type
to another. The transformation should maintain
(if possible) the database related application
(i.e., all related application programs) intact.
Thus, the database's conceptual and external
architectural levels should be maintained in the
transformation. It may be desired that also
some aspects of the architecture internal level
are maintained. A complex or large database
migration may be a complicated and costly
(one-time) project by itself, which should be
factored into the decision to migrate. This in
spite of the fact that tools may exist to help
migration between specific DBMSs. Typically a
DBMS vendor provides tools to help importing
databases from other popular DBMSs.
Building, maintaining, and tuning
Main article: Database tuning
After designing a database for an application,
the next stage is building the database.
Typically an appropriate general-purpose DBMS
can be selected to be utilized for this purpose.
A DBMS provides the needed user interfaces to
be utilized by database administrators to define
the needed application's data structures within
the DBMS's respective data model. Other user
interfaces are used to select needed DBMS
parameters (like security related, storage
allocation parameters, etc.).
When the database is ready (all its data
structures and other needed components are
defined) it is typically populated with initial
application's data (database initialization, which
is typically a distinct project; in many cases
using specialized DBMS interfaces that support
bulk insertion) before making it operational. In
some cases the database becomes operational
while empty of application data, and data is
accumulated during its operation.
After the database is created, initialised and
populated it needs to be maintained. Various
database parameters may need changing and
the database may need to be tuned (tuning ) for
better performance; application's data
structures may be changed or added, new
related application programs may be written to
add to the application's functionality, etc.
Backup and restore
Main article: Backup
Sometimes it is desired to bring a database
back to a previous state (for many reasons,
e.g., cases when the database is found
corrupted due to a software error, or if it has
been updated with erroneous data). To achieve
this a backup operation is done occasionally or
continuously, where each desired database state
(i.e., the values of its data and their embedding
in database's data structures) is kept within
dedicated backup files (many techniques exist
to do this effectively). When this state is
needed, i.e., when it is decided by a database
administrator to bring the database back to this
state (e.g., by specifying this state by a desired
point in time when the database was in this
state), these files are utilized to restore that
state.
Other
Other DBMS features might include:
Database logs
Graphics component for producing graphs
and charts, especially in a data warehouse
system
Query optimizer – Performs query
optimization on every query to choose for it the
most efficient query plan (a partial order (tree)
of operations) to be executed to compute the
query result. May be specific to a particular
storage engine.
Tools or hooks for database design,
application programming, application program
maintenance, database performance analysis
and monitoring, database configuration
monitoring, DBMS hardware configuration (a
DBMS and related database may span
computers, networks, and storage units) and
related database mapping (especially for a
distributed DBMS), storage allocation and
database layout monitoring, storage migration,
etc.