Pertemuan 2 - Database Management Systems (DBMS)
Pertemuan 2 - Database Management Systems (DBMS)
Management
Systems (DBMS)
Ahmad Luky Ramdani. S.Kom, M.Kom
Ira Safitri, M.Si.
Rohmi Dyah Astuti, S.Si., M.Cs.
Yuliana, M.Cs.
Persentase Penilaian
c. Praktikum 20%
d. Tugas 20%
e. Kuis 10%
Database Management System
• A database-management system (DBMS) is a collection of interrelated
data and a set of programs to access those data.
• 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.
• Database applications:
• Banking: all transactions
• Airlines: reservations, schedules
• Universities: registration, grades
• Sales: customers, products, purchases
• Manufacturing: production, inventory, orders, supply chain
• Human resources: employee records, salaries, tax deductions
Why we need database system?
• Data redundancy and inconsistency
o Multiple file formats, duplication of information in
different files
• Difficulty in accessing data
o Need to write a new program to carry out each new task
• Data isolation — multiple files and formats
• Integrity problems
o Integrity constraints (e.g. account balance > 0) become part of
program code
o Hard to add new constraints or change existing ones
Why we need database system?
(cont.)
• Atomicity of updates
o Failures may leave database in an inconsistent state with
partial updates carried out
o E.g. transfer of funds from one account to another should
either complete or not happen at all
• Concurrent access by multiple users
o Concurrent accessed needed for performance
o Uncontrolled concurrent accesses can lead to
inconsistencies
o E.g. two people reading a balance and updating it at the same time
• Security problems
Why Use a DBMS?
• Data independence and efficient access
• Reduced application development time
• Data integrity and security
• Uniform data administration
• Concurrent access, recovery from crashes
View of Data
Data Abstraction
• 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.
• 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.
Data Abstraction
Instances and Schemas
• Similar to types and variables in programming
languages
• Schema – the logical structure of the database
• e.g., the database consists of information about a set
of customers and accounts and the relationship
between them)
• Analogous to type information of a variable in a
program
• Physical schema: database design at the physical
level
• Logical schema: database design at the logical level
• Instance – the actual content of the database at
a particular point in time
Instances and Schemas (cont.)
Database
Structure of a DBMS
• A typical DBMS has a layered
architecture
• The figure does not show the
concurrency control and
recovery components
• This is one of several possible
architectures
• Each system has its own
variations
Application Architectures
Two-tier architecture: E.g. client programs
using ODBC/JDBC to
communicate with a database
Three-tier architecture: E.g. web-based
applications, and
applications built using “middleware”
Application Architectures
Databases make these folks happy…