Database Management 1
Database Management 1
Contents
1. Introduction
2. Database Concepts
3. View of Data
4. File System
5. Database Management System (DBMS)
6. Purpose of DBMS
7. Types of DBMS
8. History of DBMS
9. Database Architecture
10. Data Independencies
1
DBMS Chapter One IS304
1. Introduction
o A single piece of data is a single fact about something we are interested in.
o In any environment there are things that are important to you and there are
facts about those things that are worth remembering.
o A ‘‘thing’’ as a concept is broad enough to include a person, an organization
like a company, or an event that took place such as a particular meeting.
o Information is the result of processing raw data to reveal its meaning.
o Data processing can be as simple as organizing data to reveal patterns or as
complex as making forecasts or drawing inferences using statistical modeling.
o A database is a shared, integrated computer structure that stores a collection of:
End-user data: that is, raw facts of interest to the end user,
and Metadata: or data about data, through which the end-user data are
integrated and managed.
2
DBMS Chapter One IS304
2. Database Concepts
o Thing or object in our environment that we want to keep track of is called an
entity.
o A collection of entities of the same type (e.g., all the company’s employees) is
called an entity set.
o An attribute is a property of, a characteristic of, or a fact that we know about
an entity.
3
DBMS Chapter One IS304
o The subschema, which defines the portion of the database “seen” by the
application programs that actually produce the desired information from the
data contained within the database. The existence of subschema definitions
allows all application programs to simply invoke the subschema required to
access the appropriate database file(s).
3. View of Data
4
DBMS Chapter One IS304
o Since many database system 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.
5
DBMS Chapter One IS304
• View level. The highest level of abstraction describes only part of the
entire database. Even though the logical level uses simpler structures,
complexity remains because of the variety of information stored in a large
database. Many users of the database system do not need all this
information; instead, they need to access only a part of the database. The
view level of abstraction exists to simplify their interaction with the system.
The system may provide many views for the same database.
3. 3 Data Models
o Data model: a collection of conceptual tools for describing data, data
relationships, data semantics, and consistency constraints. A data model
provides a way to describe the design of a database at the physical, logical,
and view levels. The data models can be classified into four different
categories :
• Relational Model. The relational model uses a collection of tables to
represent both data and the relationships among those data. Each table has
multiple columns, and each column has a unique name. Tables are also
known as relations. The relational model is an example of a record-based
model. Record-based models are so named because the database is
structured in fixed-format records of several types. Each table contains
records of a particular type. Each record type defines a fixed number of
fields, or attributes.
7
DBMS Chapter One IS304
4. File System
o In the recent past, a manager of almost any small organization was able to keep
track of necessary data by using a manual file system.
o Such a file system was traditionally composed of a collection of file folders,
each properly tagged and kept in a filing cabinet.
o Ideally, the contents of each file folder were logically related. For example, a
file folder in a doctor’s office might contain patient data, one file folder for each
patient. All of the data in that file folder would describe only that particular
patient’s medical history.
o As long as a data collection was relatively small and an organization’s
managers had few reporting requirements, the manual system served its role
well as a data repository.
8
DBMS Chapter One IS304
o Using the CUSTOMER file’s contents, the Data Processing specialist wrote
programs that produced very useful reports for the insurance company’s sales
department:
Monthly summaries that showed the types and amounts of insurance
sold by each agent.
Monthly checks to determine which customers must be contacted for
renewal.
Reports that analyzed the ratios of insurance types sold by each agent.
Periodic customer contact letters designed to summarize coverage and
to provide various customer relations bonuses.
9
DBMS Chapter One IS304
o The security features are difficult to program and are, therefore, often
omitted in a file system environment.
10
DBMS Chapter One IS304
6. Functions of DBMS
o A DBMS performs several important functions that guarantee the integrity and
consistency of the data in the database. Most of those functions are transparent
to end users, and most can be achieved only through the use of a DBMS.
1. Data dictionary management.
The DBMS stores definitions of the data elements and their relationships
(metadata) in a data dictionary.
The DBMS uses the data dictionary to look up the required data
component structures and relationships, thus relieving you from having to
code such complex relationships in each program.
Additionally, any changes made in a database structure are automatically
recorded in the data dictionary, thereby freeing you from having to
modify all of the programs that access the changed structure.
11
DBMS Chapter One IS304
12
DBMS Chapter One IS304
4. Security management.
The DBMS creates a security system that enforces user security and data
privacy.
Security rules determine which users can access the database, which data
items each user can access, and which data operations (read, add, delete,
or modify) the user can perform. This is especially important in
multiuser database systems.
13
DBMS Chapter One IS304
14
DBMS Chapter One IS304
7. Types of DBMS
The most popular way of classifying databases today, however, is based on how
they will be used and on the time sensitivity of the information gathered from
them.
o Online retailers: For sales data noted above plus online order tracking,
generation of recommendation lists, and maintenance of online product
evaluations.
o Banking: For customer information, accounts, loans, and banking transactions.
15
DBMS Chapter One IS304
8. History of DBMS
16
DBMS Chapter One IS304
o 1980s:
o IBM Research developed techniques for the construction of an
efficient relational database system.
o The fully functional System R prototype led to IBM’s first relational
database product, SQL/DS.
o At the same time, the Ingres system was being developed at the
University of California at Berkeley. It led to a commercial product of
the same name.
o Initial commercial relational database systems, such as IBM DB2,
Oracle, Ingres, and DEC Rdb, played a major role in advancing
techniques for efficient processing of declarative queries.
o The 1980s also saw much research on parallel and distributed
databases, as well as initial work on object-oriented databases.
o Early 1990s:
o The SQL language was designed primarily for decision support
applications.
o Decision support and querying reemerged as a major application area
for databases.
o Database vendors also began to add object-relational support to their
databases.
o 1990s:
o The major event of the 1990s was the explosive growth of the World
Wide Web.
o Database systems now had to support very high transaction-
processing rates, as well as very high reliability and 24 × 7 availability
(availability 24 hours a day, 7 days a week, meaning no downtime for
scheduled maintenance activities).
17
DBMS Chapter One IS304
o 2000s:
o XML and the associated query language XQuery as a new database
technology.
o Open-source database systems are emerged, particularly PostgreSQL
and MySQL. Several novel distributed data-storage systems have
been built to handle the data management requirements of very large
Web sites such as Amazon, Facebook, Google, Microsoft and
Yahoo.
o Data mining algorithms and streaming data, such as stock-market
ticker data or computer network monitoring data.
9. Database Architecture
o An early proposal for a standard terminology and general architecture for
database systems was produced in 1971 by the DBTG (Data Base Task
Group).
o The DBTG recognized the need for a two-level approach with a system view
called the schema and user views called subschemas.
o The American National Standards Institute (ANSI) Standards Planning and
Requirements Committee (SPARC), ANSI/X3/SPARC, produced a similar
terminology and architecture in 1975, ANSI-SPARC recognized the need for
a three-level approach with a system catalog.
o The levels form a three-level architecture comprising an external, a
conceptual, and an internal level.
o The way users perceive the data is called the external level.
o The way the DBMS and the operating system perceive the data is the
internal level, where the data is actually stored using the data structures and
files organizations.
18
DBMS Chapter One IS304
o The conceptual level provides both the mapping and the desired
independence between the external and internal levels.
o The objective of the three-level architecture is to separate each user’s view
of the database from the way the database is physically represented.
o There are several reasons why this separation is desirable:
Each user should be able to access the same data, but have a
different customized view of the data. Each user should be able
to change the way he or she views the data, and this change
should not affect other users.
Users should not have to deal directly with physical database
storage details, such as indexing or hashing. In other words, a
user’s interaction with the database should be independent of
storage considerations.
The Database Administrator (DBA) should be able to change
the database storage structures without affecting the users’
views.
The internal structure of the database should be unaffected by
changes to the physical aspects of storage, such as the
changeover to a new storage device.
The DBA should be able to change the conceptual structure of
the database without affecting all users.
19
DBMS Chapter One IS304
21
DBMS Chapter One IS304
o The physical level below the DBMS consists of items only the operating
system knows, such as exactly how the sequencing is implemented and
whether the fields of internal records are stored as contiguous bytes on the
disk.
22
DBMS Chapter One IS304
23