9 - The Database Design Part-1
9 - The Database Design Part-1
1
Database Design
• Introduction to Data Storage
• Flat Files Data Storage Approach
• Database Approach
• Types of Database Systems
• Data Modeling
• Concepts to Distributed Database
• Introduction to Big Data
2
1. Introduction to Database Design
3
1. Introduction
4
1. Introduction to Database Design
Balance Storage
Customer Customer
Banking System
Query about Balance
Balance
1. Introduction to Database Design
Balance Storage
Customer X
Banking System
Query about Balance
Balance
1. Introduction to Database Design
Balance Storage
Customer X
Banking System
Query about Balance
Balance
??
Example
2. Flat files Data Storage, Conventional File System, Traditional File System Approach
8
2. Flat files Data Storage, Conventional File System, Traditional File System Approach
10
2. Flat files Data Storage, Conventional File System, Traditional File System Approach
Example:
11
2. Flat files Data Storage, Conventional File System, Traditional File System Approach
Key Attributes
Field: A group of characters with certain type that support some purposeful
action.
File organization: Way of organizing data, records, fields, inside the file. It
can take different forms, such as: sequential, indexed sequential, direct, …
File Accessing: Way of how to access data, records, inside the file. It can take
different forms, such as: sequential accessing, indexed sequential accessing,
direct accessing, … 12
2. Flat files Data Storage, Conventional File System, Traditional File System Approach
Transaction file: Usually, it is used to enter changes that update the master file and
produce reports with updates done.
New Master file: Master file after updating.
Work file: files that are created during processing of other files as dummy file to help
in the processing since some programs can run more efficiently if a work file is used (ex:
a work file that is resorted so that records may be accessed more quickly). Example
Report file (Print File): When a program generating printed output, and there is no
available printer, the output of the program is directed to the report file which can be
reprinted later, this process is called spooling.
Next
13
2. Flat files Data Storage, Conventional File System, Traditional File System Approach
Sorted by
Sorted by Customer
Date number
Invoices File
Order File
Order
Order
Order
Order
Order
Order
Order
Order Invoice
Generation Back
Order
Order
Order
Order
Order
Order
Order
Invoice
14
2. Flat files Data Storage, Conventional File System, Traditional File System Approach
Sorted by
Sorted by Customer
Date number
Invoices File
Order File
Order
Order
Order
Order
Order Soring by
Order
Order
Order Invoice
Customer
Number Generation Back
Order
Order
Order
Order
Order
Order
Order
Invoice
15
2. Flat files Data Storage, Conventional File System, Traditional File System Approach
Master File
System Application-1
System Application-2
System Application-1
System Application
Master file
after
New Master File
updating
2. Flat files Data Storage, Conventional File System, Traditional File System Approach
System Application-1
System Application-2
System Application-1
System Application
Master file
after
New Master File
updating
17
2. Flat files Data Storage, Conventional File System, Traditional File System Approach
To be sorted by
Customer
number
Records are
sorted by Master File Working File Transaction File
date
System Application-1
System Application-2
System Application-1
System Application
Master file
after
New Master File
updating
2. Flat files Data Storage, Conventional File System, Traditional File System Approach
To be sorted by
Customer
number
Records are
sorted by Master File Working File Transaction File
date
System Application-1
System Application-2 Print File
System Application-1
System Application
Master file
after
New Master File
updating
Reports
19
End
20