lecture 3 history of database file system
TRANSCRIPT
-
8/14/2019 Lecture 3 History of Database File System
1/42
DBMS
Lecture 3
History of DatabaseFile System
3 Levels of Abstraction
Types of DatabasesComponents of DBMS
Hitesh Mahapatra
-
8/14/2019 Lecture 3 History of Database File System
2/42
2
Brief History of Database Systems
1940's, 50's Initial use of computers as
calculators. Limited data, focus on algorithms.
Science, military applications
1960's Business uses. Organizational data,
customer data, sales, inventory, accounting, etc.
File system based, high emphasis on
applications programs to extract and assimilatedata. Larger amounts of data, relatively simple
calculations
-
8/14/2019 Lecture 3 History of Database File System
3/42
3
1970'sThe relational model. Data separated into
individual tables. Related by keys. Initially
required heavy system resources. Examples:
Oracle, Sybase, Informix, IBM DB2
1980's Microcomputers - the IBM PC, Apple
Macintosh. Database program such as DBase,Paradox, FoxPro, MS Access. Individual user
can create, maintain small databases
-
8/14/2019 Lecture 3 History of Database File System
4/42
-
8/14/2019 Lecture 3 History of Database File System
5/42
5
Before we have DBMS
Before we have DBMS
UserInventory
Control
Applications DataFiles
UserCustomer
Order
Question: When a customer ordered 10 PC
monitors, how many files do you have to update? Key issues: data sharing,
data redundancy
-
8/14/2019 Lecture 3 History of Database File System
6/42
6
A Simple Architecture
A Simple Architecture
SQL
C/C++
Programs
DBMS
ApplicationsDatabases
Shared facilities:Backup and recoveryData storage and
access modules
Programming tools,
etc.
-
8/14/2019 Lecture 3 History of Database File System
7/42
-
8/14/2019 Lecture 3 History of Database File System
8/42
8
Limitations of a File System
Separated and Isolated Data - Coordination and
representation of data is difficult
Data Duplication - Wastes space and can lead to
data integrity (inconsistency) problems
Application Program Dependencies - Changes to a
single file can require changes to numerous
application programs
Lack of Data Sharing - Difficult to control access to
files
-
8/14/2019 Lecture 3 History of Database File System
9/42
9
Purpose of Database SystemsPurpose of Database Systems
Database management systems were developed to handle
the difficulties caused by different people writing different
applications independently
-
8/14/2019 Lecture 3 History of Database File System
10/42
10
A DBMS attempts to resolve the following
problems:
Data redundancy and inconsistency by keeping one
copy of a data item in the database
Difficulty in accessing data by providing query
languages
Integrity problems by enforcing constraints (age > 0)
Concurrent access by multiple users
Security problems
Purposes of Database SystemsPurposes of Database Systems
-
8/14/2019 Lecture 3 History of Database File System
11/42
11
Integrated Database Environment
Byte
Data-item or field
Record
File or Table
DatabaseDatabase management systems
-
8/14/2019 Lecture 3 History of Database File System
12/42
12
Unit of measurement of data
One Byte - 8 bits
Maximum value in one bit
Maximum value in one byte
-
8/14/2019 Lecture 3 History of Database File System
13/42
13
Integrated Database Environment DataStorage Hierarchy
Database
Record
File
Field
Character(byte)
-
8/14/2019 Lecture 3 History of Database File System
14/42
14
Advantages of Database Approach
Minimal data redundancy
Data consistency and Integrity - by
controlling access and minimizing data
duplication
Enforcement of standards
Uniform security
-
8/14/2019 Lecture 3 History of Database File System
15/42
15
Application program independence - by storingdata in a uniform fashion
Data Sharing - by controlling access to data
items, many users can access data concurrently
Backup and Recovery
-
8/14/2019 Lecture 3 History of Database File System
16/42
16
Disadvantages of Database Approach
DBMS has High initial cost
DBMS has High Overhead - requirespowerful computers
DBMS are not special purpose softwareprograms e.g., contrast an accountingsoftware package like Quicken orPeachTree with DBMS like MS Access
Additional expertise required
-
8/14/2019 Lecture 3 History of Database File System
17/42
17
Cost issue
Related with developing DBMS
Related with hardware cost
Related with higher programming cost
/ users trainingRelated with conversion cost
-
8/14/2019 Lecture 3 History of Database File System
18/42
18
3-level architecture
User/View Level
Logical Level
Physical Level
v1 v2 v3
-
8/14/2019 Lecture 3 History of Database File System
19/42
19
3-Level Architecture
Logical Level:
e.g. tables
STUDENT (roll number, name)COURSE (roll number, course id, grade)
Physical Level:
how are these tables stored, how many bytes,
restrictions etc
-
8/14/2019 Lecture 3 History of Database File System
20/42
-
8/14/2019 Lecture 3 History of Database File System
21/42
21
view 1 view 2 ..... view n
Logical
view
Physical
view
Payroll Inventory Sales
Companydatabase
Filesondisks
Three Levels of AbstractionThree Levels of Abstraction
-
8/14/2019 Lecture 3 History of Database File System
22/42
22
View Level:Define a subset of the database for a
particular application
Logical Level:
Describes data stored in database, andthe relationships among the
data
-
8/14/2019 Lecture 3 History of Database File System
23/42
23
Physical Level:
Describe how a record is stored on disks.
e.g., Divide the customer records into 3
partitions and store them on disks 1, 2 and
3
-
8/14/2019 Lecture 3 History of Database File System
24/42
24
DatabasesTypes & Physical Locations
Shared Databases
Shared by users in an organization within onelocation
Typically found on local-area networks
-
8/14/2019 Lecture 3 History of Database File System
25/42
25
Databases
Types & Physical LocationsDistributed Databases
Database stored on different computers in
different locations connected by a client / server
type of network
Two methods are:Partitioning
Duplicating
-
8/14/2019 Lecture 3 History of Database File System
26/42
-
8/14/2019 Lecture 3 History of Database File System
27/42
27
Database Administrator (DBA)
The person who co-ordinates all relatedactivities and needs for an organizations
database
Responsibilities include: database design, implementation and operation
user coordination
system security
backup and recovery
performance monitoring
-
8/14/2019 Lecture 3 History of Database File System
28/42
28
schema definition (logical level)
Physical schema (storage structure,
access methods)
schemas modifications
granting authorizations
-
8/14/2019 Lecture 3 History of Database File System
29/42
29
Components of DBMS
Data
Hardware
Software
Users
-
8/14/2019 Lecture 3 History of Database File System
30/42
30
Contents of a Database
A Database contains:
User Data
Metadata
Indexes
-
8/14/2019 Lecture 3 History of Database File System
31/42
31
User Data
Data users work with directly by entering,
updating and viewing
For our purposes, data will be generally stored
in tables with some relationships between tables
Each table has one or more columns. A set of
columns forms a database record
-
8/14/2019 Lecture 3 History of Database File System
32/42
32
Meta Data
Recall that a database is self
describing
Metadata: Data about data
Data that describe how user data are stored interms of table name, column name, data type,
length, primary keys, etc
-
8/14/2019 Lecture 3 History of Database File System
33/42
-
8/14/2019 Lecture 3 History of Database File System
34/42
34
Indexes
In keeping with our desire to provide users with
several different views of data, indexes provide
an alternate means of accessing user data.
Sorting and Searching:
An index for our new banking example might
include the account numbers in a sorted order
Indexes allow the database to access a record
without having to search through the entire table
-
8/14/2019 Lecture 3 History of Database File System
35/42
35
Updating data requires an extra step: The
index must also be updated
Example: Index in a book consists of two things:
1)A Keyword stored in order
2) Apointerto the rest of the information. In thecase of the book, the pointer is a page number
-
8/14/2019 Lecture 3 History of Database File System
36/42
36
Roles Involve In Integrated Database Environment
Database Administrator
Application Programmers
End-users
-
8/14/2019 Lecture 3 History of Database File System
37/42
37
Files ManagementBasic File Operations
The operations possible on a file are: Open
Close
Save Save As
Print
Import / Export
Upload / Download
-
8/14/2019 Lecture 3 History of Database File System
38/42
38
Files ManagementFile Manipulation Operations
Some operations are used for filemanipulation:
Creation of tables
Insertion of records
Deletion of records
Modification of records Sorting of records
-
8/14/2019 Lecture 3 History of Database File System
39/42
39
Files ManagementTypes Of Files
Data Files - contain only data
Master File - contain relatively permanent recordsthat are periodically updated
Transaction File - a temporary holding file that holds
all changes to be made to the master file
-
8/14/2019 Lecture 3 History of Database File System
40/42
40
Files ManagementTypes Of Files
Table Files
Table files are permanent files containing
reference data used when processing
transaction files
Report Files
These are the collected contents of individual
repots or documents produced by the system
-
8/14/2019 Lecture 3 History of Database File System
41/42
41
Files Management
Data Processing Methods
Online Processing
Also called real-time processing
Transactions entered into a computer systems asthey take place, and update the master files as the
transactions occur
Storage must be online and fast
May require expensive infrastructure
Used in financial institutions, airline etc
-
8/14/2019 Lecture 3 History of Database File System
42/42
42
Files Management
Data Processing Methods
Batch Processing
Data collected over certain period of time in a
transaction file and then processed against a master
file all at one time
Less expensive but slow procedure
Uses offline storage method
Widely used in financial institutions computerized
system