Lecture 1-4
Lecture 1-4
Marina Gul
Sukkur IBA University Khairpur Campus
2 Agenda
Course Outline and Course
Organization
Motivation and Goals
Introduction to Database
3 Definition
What is Data?
distinct pieces of information
What is a database?
Collection of related data.
Integrity problems
Integrity constraints (e.g. account balance > 0) become part of program code
Hard to add new constraints or change existing ones
Atomicity of updates
Failures in transaction may leave database in an inconsistent state with partial updates carried out
Logical Design: designer maps the high-level conceptual schema onto the
implementation data model of the database system that will be used
Physical Design: the physical features of the database are specified. These features
include the form of file organization and the internal storage structures
1
2
Data Storage and Querying
A database system is partitioned into modules that deal with each of the
responsibilities of the overall system.
Storage manager is a program module that provides the interface between the
low-level data stored in the database and the application programs and queries
submitted to the system. The storage manager is responsible to the following tasks:
Interaction with the OS file manager
Efficient storing, retrieving and updating of data
Query processor simplify and facilitate access to data. The query processor
components include:
DDL interpreter, which interprets DDL statements and records the definitions in the data
dictionary.
DML compiler, which translates DML statements in a query language into an evaluation
plan consisting of low-level instructions that the query evaluation engine understands.
Query evaluation engine, which executes low-level instructions generated by the DML
compiler.
1
3
Transaction Management
What if the system fails?
What if more than one user is concurrently updating the same data?
A transaction is a collection of operations that performs a single logical
function in a database application
Transaction-management component ensures that the database remains
in a consistent (correct) state despite system failures (e.g., power failures and
operating system crashes) and transaction failures.
Concurrency-control manager controls the interaction among the
concurrent transactions, to ensure the consistency of the database.
1
4
Database Users
Users are differentiated by the way they expect to interact with the system
Application programmers – interact with system through DML calls
Sophisticated users – form requests in a database query language
Specialized users – write specialized database applications that do not fit
into the traditional data processing framework
Naïve users – invoke one of the permanent application programs that have
been written previously
E.g. people accessing database over the web, bank tellers, clerical staff
1
5
Database System Internals
1
6
Suggested Reading
Chapter 1 of Database System Concepts by Abraham Silberschatz
Chapter 1,2,3,4 of Database Systems: A Practical Approach to
Design, Implementation, and Management by Thomas Conolly