Data Structure Lecture 1
Data Structure Lecture 1
Introduction
Lec-1
22-Sep-18 1
DATA STRUCTURES
problems.
22-Sep-18 2
DATA STRUCTURES
22-Sep-18 3
GOALS OF THIS COURSE
Linked lists
Stacks
Queues
Tree
Graphs.
Implementation
22-Sep-18 4
GRADING POLICY
Mid Term 20
Final Term 50
Quizzes 10
Total 100
5
REFERENCE MATERIALS:
1. Data Structure by Seymour Lipschutz (Schaum’s Series)
22-Sep-18 7
ORGANIZING DATA
22-Sep-18 8
EFFICIENCY
Space
Time
22-Sep-18 9
EFFICIENCY
22-Sep-18 10
SELECTING A DATA STRUCTURE
22-Sep-18 11
DATA STRUCTURE PHILOSOPHY
22-Sep-18 12
PHYSICAL DATA REPRESENTATION
22-Sep-18 13
PHYSICAL DATA REPRESENTATION
22-Sep-18 14
PHYSICAL DATA REPRESENTATION
22-Sep-18 15
PHYSICAL DATA REPRESENTATION
Each record in a field may contain many field items, but the
22-Sep-18 16
FILE ORGANIZATIONS
22-Sep-18 17
FILE ORGANIZATIONS
22-Sep-18 18
FILE ORGANIZATIONS
– Retrieval
– Processing
– Selection
– Updation
– Deletion
22-Sep-18 19
FILE ORGANIZATIONS
Organization of files depend upon:
22-Sep-18 20
FILE ORGANIZATIONS
22-Sep-18 21
FILE ORGANIZATIONS
1. Sequential Files
22-Sep-18 22
SEQUENTIAL FILES
Records are stored one after the other on a storage
device based on the value of the search key of each
record.
22-Sep-18 24
SEQUENTIAL FILES
22-Sep-18 25
SEQUENTIAL FILES
Advantages ?
Disadvantages ?
22-Sep-18 26
DISADVANTAGES OF SEQUENTIAL
FILE ORGANIZATION
• Files are stored one after another, there is gap between the
file to insert new.
through hashing
22-Sep-18 29
DIRECT FILE ORGANIZATION:
It overcomes the problem of sequential method
Using fields key value we can access the desired record without
Advantages ?
No need of separate transaction file
Fast retrieval of records
Disadvantages ?
Possibility of less efficient use of storage space
Collision
22-Sep-18 31
INDEX SEQUENTIAL FILES
method
method
addresses
22-Sep-18 32
INDEX SEQUENTIAL FILES
22-Sep-18 33
22-Sep-18 34
INDEX SEQUENTIAL FILES
Advantages ?
When activity ratio less efficiently use of sequential
method
When activity ratio more efficiently use of direct
method
Disadvantages ?
Extra storage required
Access of a record slower than the direct files
22-Sep-18 35
ASSIGNMENT # 1
1.1
1.2
1.3
1.4
22-Sep-18 36