You are on page 1of 35

Chapter 1: Introduction

Database System Concepts, 6th Ed.


©Silberschatz, Korth and Sudarshan
See www.db-book.com for conditions on re-use
Why DBMS?
In the early days, database applications were built on top of file systems.

Drawbacks of using file systems to store data:


•Data redundancy and inconsistency
• Multiple file formats, duplication of information in different files
•Difficulty in accessing data
• Need to write a new program to carry out each new task
•Data isolation
• multiple files and formats
•Integrity problems
• Integrity constraints (e.g. account balance > 0) become part of program
code
• Hard to add new constraints or change existing ones

Database System Concepts - 6th Edition 1.2 ©Silberschatz, Korth and Sudarshan
What is Database?
A database is a collection of data, typically describing the activities of one or
more related data.

For example, a university database might contain information about the


following:

•Entities such as students, faculty, courses, and classrooms.

•Relationships between entities, such as students' enrollment in courses,


faculty teaching courses, and the use of rooms for courses.

Database System Concepts - 6th Edition 1.3 ©Silberschatz, Korth and Sudarshan
What is DBMS?

A Data Base Management System, or DBMS, is software designed to assist in


maintaining and utilizing large collections of data. A DBMS will provide

•Database Design: How to describe a real-world enterprise in terms of data


•Data Analysis: How to answer questions about the enterprise by posing
queries over the data in the DBMS?
•Concurrency and Robustness: How does a DBMS allow many users to access
data concurrently, and how does it protect the data in the event of system
failures?
•Efficiency and Scalability: How does a DBMS store large datasets and answer
questions against this data efficiency?
•Concurrency: It is the ability of database to allow multiple users to affect
multiple transactions.
4

Database System Concepts - 6th Edition 1.4 ©Silberschatz, Korth and Sudarshan
Advantages of
DBMS
Some advantage of DBMS are
•Redundancy can be reduced
•Inconsistency can be avoided
•The data can be shared
•Standards can be enforced
•Security can be enforced
•Integrity can be maintained

Some dis-advantage of DBMS are


•Confidentiality, Privacy and
Security
•Enterprise vulnerability

Database System Concepts - 6th Edition 1.5 ©Silberschatz, Korth and Sudarshan
Basic
Definitions
• Database: A collection of related data.

• Data: Known facts that can be recorded and have an implicit meaning.

• Database Management System (DBMS): general- purpose software system


that facilitates the processes of defining, constructing, manipulating, and sharing
databases among various users and applications.(or)

(DBMS) as a "software system that enables users to define, create,


maintain and control access to the database“.

Ex:- MySQL, Microsoft SQL Server, Oracle Database, and Microsoft Access.

• Database System: The DBMS software together with the


data itself. Sometimes, the applications are also included. 6

Database System Concepts - 6th Edition 1.6 ©Silberschatz, Korth and Sudarshan
Basic
Definitions
• Data: Known facts that can be recorded and have an implicit meaning.

Database System Concepts - 6th Edition 1.7 ©Silberschatz, Korth and Sudarshan
Basic
Definitions

Database System Concepts - 6th Edition 1.8 ©Silberschatz, Korth and Sudarshan
Typical DBMS Terminology
• Anapplication program accesses the database by sending queries
or requests for data to the DBMS.

• A query typically causes some data to be retrieved

• A transaction may cause some data to be read and some data to be written
into the database.

Database System Concepts - 6th Edition 1.9 ©Silberschatz, Korth and Sudarshan
A simplified database
environment

1
0

Database System Concepts - 6th Edition 1.10 ©Silberschatz, Korth and Sudarshan
When not to use a
DBMS
• Main inhibitors (costs) of using a DBMS:
– High initial investment and possible need for additional hardware.
– Overhead for providing generality, security, concurrency control,
recovery, and integrity
functions.

• When a DBMS may be unnecessary:


– If the database and applications are simple, well defined, and not expected to change.
– If there are stringent real-time requirements that may not be met because of DBMS
overhead.
– If access to data by multiple users is not required.
• When no DBMS may suffice:
– If the database system is not able to handle the complexity of data because of modeling
limitations
– If the database users need special operations not supported by the
DBMS.

Database System Concepts - 6th Edition 1.11 ©Silberschatz, Korth and Sudarshan
Typical DBMS
Functionality
1) Define a database in terms of data types, structures and constraints
2) Construct or Load the Database on a secondary storage medium
3) Manipulating the database by querying, generating reports,
insertions,
deletions and modifications to its content
4) Concurrent Processing and Sharing by a set of users and programs –
yet, keeping all data valid and consistent

Other features:
– Protection or Security measures to prevent unauthorized access
– “Active” processing to take internal actions on data
– Presentation and Visualization of data
1
2

Database System Concepts - 6th Edition 1.12 ©Silberschatz, Korth and Sudarshan
Database Management System
(DBMS)
 DBMS contains information about a particular enterprise
 Collection of interrelated data
 Set of programs to access the data
 An environment that is both convenient and efficient to use
 Database Applications:
 Banking: transactions
 Airlines: reservations, schedules
 Universities: registration, grades
 Sales: customers, products, purchases
 Online retailers: order tracking, customized
recommendations
 Manufacturing: production, inventory, orders, supply chain
 Human resources: employee records, salaries, tax
deductions
 Databases can be very large.
 Databases touch all aspects of our lives

Database System Concepts - 6th Edition 1.13 ©Silberschatz, Korth and Sudarshan
University Database Example
 Application program examples
 Add new students, instructors, and courses
 Register students for courses, and generate
class rosters
 Assign grades to students, compute grade
point averages (GPA) and generate transcripts
 In the early days, database applications were
built directly on top of file systems

Database System Concepts - 6th Edition 1.14 ©Silberschatz, Korth and Sudarshan
Drawbacks of using file systems to
store data

 Data redundancy and inconsistency


 Multiple file formats, duplication of information in
different files
 Difficulty in accessing data
 Need to write a new program to carry out each new
task
 Data isolation
 Multiple files and formats
 Integrity problems
 Integrity constraints (e.g., account balance > 0)
become “buried” in program code rather than being
stated explicitly
 Hard to add new constraints or change existing ones

Database System Concepts - 6th Edition 1.15 ©Silberschatz, Korth and Sudarshan
Drawbacks of using file systems to store data
(Cont.)

 Atomicity of updates
 Failures may leave database in an inconsistent state with
partial updates carried out
 Example: Transfer of funds from one account to another
should either complete or not happen at all
 Concurrent access by multiple users
 Concurrent access needed for performance
 Uncontrolled concurrent accesses can lead to
inconsistencies
 Example: Two people reading a balance (say 100) and
updating it by withdrawing money (say 50 each) at the
same time
 Security problems
 Hard to provide user access to some, but not all, data

Database systems offer solutions to all the above problems

Database System Concepts - 6th Edition 1.16 ©Silberschatz, Korth and Sudarshan
Main Characteristics of the Database
Approach
• Self-describing nature of a database system: A DBMS catalog stores the
description of the database. (The description is called meta-data). This
allows the DBMS software to work with different databases.

• Insulation between programs and data (Data independence) : Allows


changing data storage structures and operations without having to change
the DBMS access programs.

• Data Abstraction: A data model is used to hide storage details and


present
the users with a conceptual view of the database.

Database System Concepts - 6th Edition 1.17 ©Silberschatz, Korth and Sudarshan
Support of multiple views of the data: Each user may see a different
view of the database, which describes only the data of interest to
that user.

Sharing of data and multiuser transaction processing: Allowing a set of


concurrent users to retrieve and to update the database.

Concurrency control: with in the dbms guarantees that each


transaction is correctly executed or completely aborted.

OLTP(Online Transaction Processing) is a major part of database


applications.

Database System Concepts - 6th Edition 1.18 ©Silberschatz, Korth and Sudarshan
Types of Databases and
Database Applications
• Big Data Storage Systems or NoSQL databases
• Geographic Information Systems (GIS)
• Data Warehouses and OLAP systems
• Numeric and Textual Databases
• Real-time and Active Databases
• Multimedia Databases

Database System Concepts - 6th Edition 1.19 ©Silberschatz, Korth and Sudarshan
Levels of Abstraction
 Physical level: describes how a record (e.g., instructor) is
stored.
 Logical level: describes data stored in database, and the
relationships among the data.
type instructor = record
ID : integer;
name : string;
dept_name : string;
salary : integer;
end;
 View level: application programs hide details of data
types. Views can also hide information (such as an
employee’s salary) for security purposes.

Database System Concepts - 6th Edition 1.20 ©Silberschatz, Korth and Sudarshan
View of Data

An architecture for a database system

Database System Concepts - 6th Edition 1.21 ©Silberschatz, Korth and Sudarshan
Instances and Schemas
 Similar to types and variables in programming languages
 Logical Schema – the overall logical structure of the database
 Example: The database consists of information about a set of
customers and accounts in a bank and the relationship
between them
 Analogous to type information of a variable in a program
 Physical schema–
schema the overall physical structure of the database
 Instance – the actual content of the database at a particular point
in time
 Analogous to the value of a variable
 Physical Data Independence – the ability to modify the physical
schema without changing the logical schema
 Applications depend on the logical schema
 In general, the interfaces between the various levels and
components should be well defined so that changes in some
parts do not seriously influence others.

Database System Concepts - 6th Edition 1.22 ©Silberschatz, Korth and Sudarshan
Database Design
The process of designing the general structure of the
database:
 Logical Design – Deciding on the database
schema. Database design requires that we find a
“good” collection of relation schemas.
 Business decision – What attributes should we
record in the database?
 Computer Science decision – What relation
schemas should we have and how should the
attributes be distributed among the various
relation schemas?
 Physical Design – Deciding on the physical layout
of the database

Database System Concepts - 6th Edition 1.23 ©Silberschatz, Korth and Sudarshan
Database Design (Cont.)
 Is there any problem with this relation?

Database System Concepts - 6th Edition 1.24 ©Silberschatz, Korth and Sudarshan
Design Approaches
 Need to come up with a methodology to ensure that
each of the relations in the database is “good”
 Two ways of doing so:
 Entity Relationship Model (Chapter 7)
 Models an enterprise as a collection of
entities and relationships
 Represented diagrammatically by an entity-
relationship diagram:
 Normalization Theory (Chapter 8)
 Formalize what designs are bad, and test for
them

Database System Concepts - 6th Edition 1.25 ©Silberschatz, Korth and Sudarshan
Database
Users
Users may be divided into
•Actors on the Scene -

those who actually use and control the


content.

• Workers Behind the Scene -


those who enable the DBMS software to
database to be developed and the be designed and
implemented.

Database System Concepts - 6th Edition 1.26 ©Silberschatz, Korth and Sudarshan
Database
Users
Actors on the
scene:
–Database administrators: responsible for authorizing access to the database, for co-ordinating
and monitoring its use, acquiring software, and hardware resources, controlling its use and
monitoring efficiencyof operations.

–Database Designers: responsible to define the the structure, the constraints, and
content, functions or transactions against communicate with the end-users
the database. They must understand their needs. and

–End-users: they use the data for queries, reports and some of them actually update
the
database content.

Database System Concepts - 6th Edition 1.27 ©Silberschatz, Korth and Sudarshan
Workers behind
Scene

■ DBMS system designers and implementers design and implement


the DBMS modules and interfaces as a software package. A
DBMS is a very complex software system that consists of
many modules, including modules for implementing the
catalog, query language processing, interface processing,
accessing and buffering data, controlling concurrency, and
handling data recovery and security. The DBMS must
interface with other system software, such as the operating
system and compilers for various programming languages.

Database System Concepts - 6th Edition 1.28 ©Silberschatz, Korth and Sudarshan
■Tool developers design and implement tools—the software packages that
facilitate database modelling and design, database system design, and improved
performance. Tools are optional packages that are often purchased separately.
They include packages for database design, performance monitoring, natural
language or graphical interfaces, prototyping, simulation, and test data
generation. In many cases, independent software vendors develop and market
these tools.
■Operators and maintenance personnel (system administration personnel) are
responsible for the actual running and maintenance of the hardware and software
environment for the database system

Database System Concepts - 6th Edition 1.29 ©Silberschatz, Korth and Sudarshan
Categories of End-
users
• Casual : access database occasionally when needed
• Naïve or Parametric : they make up a large section of the end-user population.
• They use previously well-defined functions in the form of “canned transactions”
against the database.
Example: bank-tellers / reservation clerks who do this activity for an entire shift of
operations.
• Sophisticated : these include business analysts, scientists, engineers, others
thoroughly familiar with the system capabilities. Many use tools in the form of
software packages that work closely with the stored database.
• Stand-alone : mostly maintain personal databases using ready-to-use packaged
applications.
Example: the user of a financial software package that stores a variety of personal
financial data

Database System Concepts - 6th Edition 1.30 ©Silberschatz, Korth and Sudarshan
Database Users and
Administrators

Databas
e

Database System Concepts - 6th Edition 1.31 ©Silberschatz, Korth and Sudarshan
Database System Internals

Database System Concepts - 6th Edition 1.32 ©Silberschatz, Korth and Sudarshan
Database Architecture

The architecture of a database systems is greatly


influenced by
the underlying computer system on which the database is
running:
 Centralized
 Client-server
 Parallel (multi-processor)
 Distributed

Database System Concepts - 6th Edition 1.33 ©Silberschatz, Korth and Sudarshan
History of Database Systems
 1950s and early 1960s:
 Data processing using magnetic tapes for storage
 Tapes provided only sequential access
 Punched cards for input
 Late 1960s and 1970s:
 Hard disks allowed direct access to data
 Network and hierarchical data models in widespread
use
 Ted Codd defines the relational data model
 Would win the ACM Turing Award for this work
 IBM Research begins System R prototype
 UC Berkeley begins Ingres prototype
 High-performance (for the era) transaction
processing

Database System Concepts - 6th Edition 1.34 ©Silberschatz, Korth and Sudarshan
History (cont.)
 1980s:
 Research relational prototypes evolve into commercial
systems
 SQL becomes industrial standard
 Parallel and distributed database systems
 Object-oriented database systems
 1990s:
 Large decision support and data-mining applications
 Large multi-terabyte data warehouses
 Emergence of Web commerce
 Early 2000s:
 XML and XQuery standards
 Automated database administration
 Later 2000s:
 Giant data storage systems
 Google BigTable, Yahoo PNuts, Amazon, ..

Database System Concepts - 6th Edition 1.35 ©Silberschatz, Korth and Sudarshan

You might also like