10-06-2013, 01:52 PM
Database System Concepts
Database System.pdf (Size: 4.44 MB / Downloads: 40)
DBMS.pdf (Size: 1.55 MB / Downloads: 61)
Introduction
A database-management system (DBMS) is a collection of interrelated data and a
set of programs to access those data. The collection of data, usually referred to as the
database, contains information relevant to an enterprise. The primary goal of a DBMS
is to provide a way to store and retrieve database information that is both convenient
and efficient.
Database systems are designed to manage large bodies of information. Management
of data involves both defining structures for storage of information and providing
mechanisms for the manipulation of information. In addition, the database
system must ensure the safety of the information stored, despite system crashes or
attempts at unauthorized access. If data are to be shared among several users, the
system must avoid possible anomalous results.
Because information is so important in most organizations, computer scientists
have developed a large body of concepts and techniques for managing data. These
concepts and technique form the focus of this book. This chapter briefly introduces
the principles of database systems.
Database System Applications
Databases are widely used. Here are some representative applications:
• Banking: For customer information, accounts, and loans, and banking transactions.
• Airlines: For reservations and schedule information. Airlines were among the
first to use databases in a geographically distributed manner—terminals situated
around the world accessed the central database system through phone
lines and other data networks.
Database Systems versus File Systems
Consider part of a savings-bank enterprise that keeps information about all customers
and savings accounts. One way to keep the information on a computer is
to store it in operating system files. To allow users to manipulate the information, the
system has a number of application programs that manipulate the files, including
• A program to debit or credit an account
• A program to add a new account
• A program to find the balance of an account
• A program to generate monthly statements
System programmers wrote these application programs to meet the needs of the
bank.
New application programs are added to the system as the need arises. For example,
suppose that the savings bank decides to offer checking accounts. As a result,
the bank creates new permanent files that contain information about all the checking
accounts maintained in the bank, and it may have to write new application programs
to deal with situations that do not arise in savings accounts, such as overdrafts. Thus,
as time goes by, the system acquires more files and more application programs.
View of Data
A database system is a collection of interrelated files and a set of programs that allow
users to access and modify these files. A major purpose of a database system is to
provide users with an abstract view of the data. That is, the system hides certain
details of how the data are stored and maintained.
Data Abstraction
For the system to be usable, it must retrieve data efficiently. The need for efficiency
has led designers to use complex data structures to represent data in the database.
Since many database-systems users are not computer trained, developers hide the
complexity from users through several levels of abstraction, to simplify users’ interactions
with the system:
• Physical level. The lowest level of abstraction describes how the data are actually
stored. The physical level describes complex low-level data structures in
detail.
• Logical level. The next-higher level of abstraction describes what data are
stored in the database, and what relationships exist among those data. The
logical level thus describes the entire database in terms of a small number
of relatively simple structures. Although implementation of the simple structures
at the logical level may involve complex physical-level structures, the
user of the logical level does not need to be aware of this complexity. Database
administrators, who must decide what information to keep in the database,
use the logical level of abstraction.
Instances and Schemas
Databases change over time as information is inserted and deleted. The collection of
information stored in the database at a particular moment is called an instance of the
database. The overall design of the database is called the database schema. Schemas
are changed infrequently, if at all.
The concept of database schemas and instances can be understood by analogy to
a program written in a programming language. A database schema corresponds to
the variable declarations (along with associated type definitions) in a program. Each
variable has a particular value at a given instant. The values of the variables in a
program at a point in time correspond to an instance of a database schema.
Database systems have several schemas, partitioned according to the levels of abstraction.
The physical schema describes the database design at the physical level,
while the logical schema describes the database design at the logical level.Adatabase
may also have several schemas at the view level, sometimes called subschemas, that
describe different views of the database.
The Entity-Relationship Model
The entity-relationship (E-R) data model is based on a perception of a real world that
consists of a collection of basic objects, called entities, and of relationships among these
objects. An entity is a “thing” or “object” in the real world that is distinguishable
from other objects. For example, each person is an entity, and bank accounts can be
considered as entities.
Entities are described in a database by a set of attributes. For example, the attributes
account-number and balance may describe one particular account in a bank,
and they form attributes of the account entity set. Similarly, attributes customer-name,
customer-street address and customer-city may describe a customer entity.
An extra attribute customer-id is used to uniquely identify customers (since it may
be possible to have two customers with the same name, street address, and city).
A unique customer identifier must be assigned to each customer. In the United States,
many enterprises use the social-security number of a person (a unique number the
U.S. government assigns to every person in the United States) as a customer
identifier.