0% found this document useful (0 votes)
11 views

Lecture 1-4

The document provides an overview of database systems, including definitions, motivations, applications, and limitations of traditional file-based systems. It discusses data abstraction, data models, database languages, design processes, and transaction management. Additionally, it identifies different types of database users and suggests readings for further understanding of the subject.

Uploaded by

eemanf240
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Lecture 1-4

The document provides an overview of database systems, including definitions, motivations, applications, and limitations of traditional file-based systems. It discusses data abstraction, data models, database languages, design processes, and transaction management. Additionally, it identifies different types of database users and suggests readings for further understanding of the subject.

Uploaded by

eemanf240
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Lecture 1-4

Introduction and Overview

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.

What is a database Management System?


Database systems give a set of tools for storing, searching and managing this
information

What is a database Application?


database application is simply a program that interacts with the database at some
point in its execution. It is an intermediary between user and DBMS.
4 Motivation Database Systems
Application development and maintenance costs
Declarative queries (what not how) and data independence
Efficient, correct, and independent data organization, size, access
Multi-user operations and access control
Synchronization of concurrent user queries and updates
Enforce access control (e.g., permissions on tables, views)
Consistency and data integrity
Eliminates redundancy and thus, enforces consistency
Enforces integrity constraints (e.g., semantic rules)
Logging and Recovery
Recovery of consistent state after HW or SW failure
Performance and Scalability
High performance for large datasets or high transaction throughput
Scale to large datasets with low memory requirements
5 Applications of Database-System
Enterprise Information: Sales, Accounting, Human Resource
Airline reservation systems: For reservation, scheduling
Banking systems: Credit and transaction, Finance
Telecommunication: records of calls, monthly bills, communication networks
6 Traditional File based System
A collection of application programs
perform services for the end-users, i.e. the
production of reports.
each program defines and manages its own
data.

We already discussed the different advantages of Database system,


based on those write any one limitation of File bases system
7 Limitation of File Based system
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

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

Concurrent access by multiple users


Uncontrolled concurrent accesses can lead to inconsistencies (i.e. two people reading a balance and
updating it at the same time)

Data isolation — multiple files and formats:


Programs are written in different languages, and so cannot easily access each other’s files.
Security problems
8 Data Abstraction
Three Layer ANSI-SPARC Architecture
External schemas (external level)
application programs hide details of data types.
Conceptual schema (logical level)
describes data stored in database, and the relationships among the data
Internal schema (physical level)
how a record (e.g., customer) is stored.
Types of Data Independence
Logical data independence (external views and applications independent of logical data model)
Physical data independence (logical data model independent of underlying data organization)
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.
9 Data Models
A collection of tools for describing
Data, Data relationships, Data semantics, Data
constraints
A data model provides a way to describe the
design of a database at the physical, logical,
and view levels.
Relational model
Entity-Relationship data model (mainly for database
design)
Object-based data models (Object-oriented and Object-
relational)
Relational model
Semistructured data model (XML)
ER Diagram
1
0
Database Languages
Database system provides DDL to specify the database schema and DML to
express database queries and updates.
DDL: Specification notation for defining the database schema
E.g. create table account (
account-number char(10),
balance integer)

DML: Language for accessing and manipulating the data


There are basically two types
Procedural DMLs– user specifies what data is required and how to get those data
Nonprocedural DMLs– user specifies what data is required without specifying how to
get those data
SQL is the most widely used query language
1
1
Database Design
The process of designing the general structure of the database
Specification: to characterize fully the data needs of the prospective database users.
Conceptual Design: The focus at this point is on describing the data and their
relationships
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?
There are principally two ways to tackle the problem.
entity-relationship model
Normalization: that takes as input the set of all attributes and generates a set of tables

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

You might also like