Vous êtes sur la page 1sur 7

DBMS (Database Management System)

Stands for "Database Management System." In short, a DBMS is a database


program. Technically speaking, it is a software system that uses a standard method
of cataloging, retrieving, and running queries on data. The DBMS manages incoming
data, organizes it, and provides ways for the data to be modified or extracted by
users or other programs.

Some DBMS examples include MySQL, PostgreSQL, Microsoft Access, SQL


Server, FileMaker, Oracle, RDBMS, dBASE, Clipper, and FoxPro. Since there are so
many database management systems available, it is important for there to be a way
for them to communicate with each other. For this reason, most database software
comes with an Open Database Connectivity (ODBC) driver that allows the database
to integrate with other databases. For example, common SQL statements such as
SELECT and INSERT are translated from a program's proprietary syntax into a
syntax other databases can understand.

Data Independence
Database management within the environment of a centralized DBMS relies on the process
of data independence. While data transparency still exists as far as the ability of different
applications to access and use the data for completing tasks, no program or application can read
and then begin to make changes to the data itself. The consistency of the data makes the overall
process of maintaining and managing a single database or multiple databases within a single
environment much easier.

One of the functions of data independence is to restrict access to the storage structure of
the data by the user applications. By effectively hiding the specifics of the structure from the
applications, the potential for any one application to alter the nature of thedata becomes
impossible. Thus, the essential data retains its integrity and remains consistent no matter how
many databases or database applications access the core data.

Data independence is normally thought of in terms of two levels or types.


Logical data independence makes it possible to change the structure of the data independently of
modifying the applications or programs that make use of the data. There is no need to rewrite
current applications as part of the process of adding to or removing data from then system.

DBMS approach
- real solution: data abstraction
- it is the name of the game in database systems
- one copy at one location of all data
- access to the data only through DBMS:
no application programs directly touch the data
user --- application program --
DBMS -- files
user --- application program --
- DBMS offers a stable view of the data, which is not
affected by reformatting or reorganization of data
- many different views of the same data are supported

Logical and Physical Data Organization


Logical organization
- conceptual or logical format of the data
(e.g., employee record has E#, Name, Address)
Physical organization
- actual structure of the data and all supporting access
structures (e.g., index)
(e.g., employee: E# 32 bits
Name 30 bytes
Address 50 bytes)
Benefit
- application programs must know the logical organization
but the physical organization is an implementation detail
they need not know

DBMS Architecture
Different abstract levels
- a widely accepted general architecture for a database
- database described by three abstract levels
- internal schema (physical database)
- conceptual schema (conceptual database)
- external schema (view)
Objectives
- insulation of application programs and data
- support of multiple user views
- use of schema to store the DB description (mete-data)

The Three Schema Architecture


External schema
- describes a subset of the database that a particular user group is interested in, according
to the format the format user wants, and hides the rest
- may contain virtual data that is derived from the files, but is not explicitly stored

Conceptual schema
- hides the details of physical storage structures and concentrates on describing entities,
data types, relationships, operations, and constraints.

Internal schema
- describes the physical storage structure of the DB
- uses a low-level (physical) data model to describe the complete details of data storage
and access paths
Three Schema Architecture
Data and meta-data
- three schemas are only meta-data (descriptions of data)
- data actually exists only at the physical level
Mapping
- DBMS must transform a request specified on an external schema into a request against
the conceptual schema, and then into the internal schema
- requires information in meta-data on how to accomplish the mapping among various
levels
- overhead (time-consuming) leading to inefficiencies
- few DBMSs have implemented the full three-schema architecture

Benefits of Three Schema Architecture


Logical data independence
- the capacity to change the conceptual schema without having to change external
schema or application prgms ex: Employee (E#, Name, Address, Salary)
A view including only E# and Name is not affected by changes in any other attributes.
Physical data independence
- the capacity to change the internal schema without having to change the conceptual (or
external) schema
- internal schema may change to improve the performance (e.g., creating additional
access structure)
- easier to achieve logical data independence, because application programs are
dependent on logical structures

Data Models
Data abstraction
- one fundamental characteristic of the database approach
- hides details of data storage that are not needed by most database users and applications

Data model
- a set of data structures and conceptual tools used to describe the structure of a database
(data types, relationships, and constraints)
- used in the definition of the conceptual, external, and internal schema
- must provide means for DB designers to represent the real-world information
completely and naturally.

Data Models
High-level (conceptual) data models
- use concepts such as entities, attributes, relationships
- object-based models: ER model, OO model Representational (implementation) data
models
- most frequently used in commercial DBMSs
- record-based models: relational, hierarchical, network

Low-level (physical) data models


- to describe the details of how data is stored
- captures aspects of database system implementation: record structures (fixed/variable
length) and ordering, access paths (key indexing), etc.

Schemas and Instances


In any data model, it is important to distinguish between the description of the database
and the database itself.

Database schema (meta-data)


- overall description of a database, specified by a set of definitions
- specified during database design (not change frequently)
- similar to the notion of type definition in programs

Database instance
- current contents of the database (actual data): DB state
- may change frequently

Distinction between database schema and database state


- a database just specified (or defined) is in empty state
- initial state would be achieved when the data is loaded
- DBMS is responsible to ensure every database state is valid

Data Definition and Manipulation Languages


Data definition language (DDL)
- not a procedural language
- notations for describing the types of entities and relationships among entities

DDL statements −−→ data dictionary


Data manipulation language (DML)
- for accessing and modifying data
- non-procedural: specifying "what" to access
- procedural: specifying "what" and "how" to get
- non-procedural languages could be easy to use but may not be efficient

DBMS Classification
Criteria
- data model on which DBMS is based
- number of users supported by DBMS: single/multi user
- numberof sites: centralized vs distributed
- homogeneity: homogeneous vs heterogeneous (federated)
- general-purpose vs special-purpose

<ex> airline reservation and telephone directory systems on-line transaction precessing
(OLTP) systems need to support large # of concurrent transactions w/o delays

Data model
- the main criterion for classification
- entity-relationship (ER) model
- object-oriented (OO) model
- relational, network, hierarchical model

Data Models
ER model
- popular high-level conceptual model used in DB design
- proposed by P. Chen in 1976 (ACM TODS)
- perception of real-world consisting of a collection of entities and relationships among
them OO model

- DB is defined in terms of objects, their properties, and their operations (methods)

Relational model
- represents a DB as a collection of tables Network model
- represents DB as record types and 1:N relationships Hierarchical model
- represents data as hierarchical tree structures

Types of Users in DBMS


There are different types of user that play different roles in a database environment. Following is a brief
description of these users:
(1) Application Programmers:
Application programmer is the person who is responsible for implementing the required functionality of
database for the end user. Application programmer works according to the specification provided by the
system analyst.
(2) End Users:
End users are those persons who interact with the application directly. They are responsible to insert, delete
and update data in the database. They get information from the system as and when required. Different
types of end users are as follows:
Naive Users: Naive users are those users who do not have any technical knowledge about the DBMS. They
use the database through application programs by using simple user interface. They perform all operations
by using simple commands provided in the user interface.
Example: The data entry operator in an office is responsible for entering records in the database. He
performs this task by using menus and buttons etc. He does not know anything about database or DBMS.
He interacts with the database through the application program.
Sophisticated Users: Sophisticated users are the users who are familiar with the structure of database and
facilities of DBMS. Such users can use a query language such as SQL to perform the required operations on
databases. Some sophisticated users can also write application programs.
(3) Database Administrator:
Database administrator is responsible for, managing the whole database system. He designs creates and
maintains the database. He manages the users who can access this database, and controls integrity issues.
He also monitors the performance of the system and makes changes in the system as and when required.

Database Administrator : One of the main reasons for using DBMSs is to have central control
of both the data and the program that access data. The persons who has such central control
authority over the system is called DBA. The functions of DBA includes :
•Schema definition
•Storage structure and access method definition
•Schema and physical organization
•Granting of authorization of data access

Database Manager : A database manager is a program module which provides the interface
between the low-level data stored in the database and the application program and queries
submitted to the system.

Task of a database manager :-


•Security
•Integrity
•Concurrency control

Database system architecture


The Three levels of architecture:

The Internal level •


.
The External level •
.
The Conceptual level •
.
An example of the three levels.
External (COBOL):
01 EMPC.
02 EMPNO PIC x(6).
02 DEPTNO PIC X(4).

Conceptual:

EMPLOYEE
EMPLOYEE_NUMBER CHARACTER (6)
DEPARTMENT_NUMBER CHARACTER (4).

Internal:
STORED_EMP BYTES = 20
PREFIX TYPE=BYTE(6),OFFSET=0
EMP# TYPE = BYTE(6),OFFSET=6,INDEX=EMPX
DEPT# TYPE =BYTE(4),OFFSET=12

External View
external view level is closest to the users. It is concerned with the way the data is viewed by
individual users. You can say that external level is the individual user level. A user can either
be an application programmer or an end-user, but DBA is an important special case.

The external level consists of many different external views of the database. Each external
view describes the part of the database that a particular user group is interested in and hides
the rest of the database from that user group. In addition, different views may have different
representations of the same data. For example, one user may view date in the form (day,
month, year), while another may view dateas (year, month, day). Some users may view
calculated data, which is not actually stored in database. The calculated data is created
temporarily when needed. For example, marks of subject "C++" of students are stored in the
database and average marks of this subject are calculated by system when the user refers to
it. Similarly, if a date-of-birth of a student is stored in the database then you can find the age
of the student.

The external views are defined by means of external schemas, which are written in the data
definition language (DDL). Usually, the DBA writes an external schema to create a user view.
Each user's schema gives a complete description of each type of external record that
appears in that user's view. An external record is a record seen by a particular user (a part of
his external view). Actually, an external view is acollection of external records.

Tasks of the DBA

• Defining the conceptual schema.


• Defining the internal schema
• Liaising with users.
• Defining security and integrity constraints
• Defining dup and reload policies
• Monitoring performance and responding to
changing requirements.

The functions of DBMS:

. Data definition.
• Data manipulation.
• DML requests.
• Planned.
• Unplanned.
• Optimization and execution.
• Data security and integrity.
• Data recovery and concurrency.
• Data dictionary.
• Performance.

Vous aimerez peut-être aussi