File and Database Management Systems

Download Report

Transcript File and Database Management Systems

File and Database Management Systems


Why do we need to take this course ?
Why do we need to learn file and/or
database management systems?


we need to store and retrieve a large collection
of data into/from files on disk.
We need to do it efficiently and conveniently.
Q:
What is the file ?
What is the file management system?
What is the database?
What is the database management system?
Why should we study file structures ?
Why should we study the database management systems?
How?
Objectives

Understand fundamental concepts




Textbook


Relational database model
Query languages and/or SQL
File structures: B-tree and hash table
Abraham Silberschatz,Henry F.Korth, S.Sudarshan, Database
System Concepts (Sixth Edition), Indian Institute of
Tecbnology, Bombay,2011
Get hand-on experience


Oracle and SQL
Development of Java-based database applications


JDBC
Berkeley DB
Course Topics

Entity-relationship (ER) model


Database design tool
Relational database model




A set of tables
Relational algebra and calculus
SQL query language
File structures


B-tree
Hash table
Course Administration

Grading





Re-examination


None
Collaboration


two assignments
Two (mini)- projects (group)
Midterm
Final
Collaborate on assignments, but do not merely copy.
Moodle Course page

forums
Evolution of Computer Applications
1. computing machines:
Z:= X * Y
2. permanent data storage devices:
RAM, disks, tapes
3. file management systems
retrieve information efficiently from
a large amount of data stored on disk
4. database management systems
efficient as well as convenient information
retrieval
Basic structure of a computer
CPU
I/O
RAM
(Random Access Memory)
Disk: high capacity with low speed
RAM: low capacity with high speed
Disk
File: a collection of related information defined by its creator.
Physical file: a file actually exists in a storage devise.
( a collection of bites, as seen by the operating system.)
Logical file: a file viewed by users and programs.
( a collection of records.)
A file management system, usually within the operating system, is
used to efficiently access physical files stored in the secondary storage
devices.
Functions: create, updates, retrieval
Criterion: efficiency
Key consideration: high speed RAM access vs. low speed
disk access
A file processing system within an operation system
a logic file
Operating
system
physical
files
A file system sets up mappings between logical files and
physical files.
Data: any information
Manufacturing
University
Hospital
Bank
Product data
Student data, courses
Patient data, facilities
Account data
Database: a large collection of data
an integrated collection of data
Database management system:
a software system that provides an efficient as well
as convenient environment for accessing data in a
database.
Database Management System Structure
naive
users
application
programmers
casual
users
database
administrator
application
programs
system
calls
query
database
scheme
data manipulation
language
precompiler
application
program
object code
query
processor
data definition
language
compiler
database
manager
DBMS
file manager
data
files
data
dictionary
H.F. Korth and A. Silberschatz. Database System Concepts, McGraw-Hill, 1986.
Why file management systems?
efficient file accesses
Why database management system?
efficient and convenient data access
File management systems:
goal:
efficiency
problem: high speed ram vs. low speed disk access
solution: complicated file structures
Database management systems:
goal:
efficiency as well as convenience
problem: conflicts between efficiency and convenience
solution: data independence supported by various database
models
History of File Organizations:
Sequential search
index sequential
B-tree
Hashing
Get information from a disk file
in just a few disk accesses
Classification of Database Models:
Entity-relationship
network
Various database models provide
hierarchical
logical and physical data independence
relation
to separate simple logical database
object-oriented
structures and complicated physical
deductive
file structures.