SlideShare a Scribd company logo
NEHRUREVATHY
DEPT
. OF BCA
DATABASE MANAGEMENT SYSTEM
Any Queries:nehrurevathy@gmail.com
Three primary methods:
1.sequential storage
2.creating index table for data
3.direct/hashed key storage
1.sequential storage
Each row is stored in a predefined order.
Uses:
-- data retrieval is always in a fixed order.
--contains a lot of common data.
--backup for transferring data to a different db.
Drawbacks:
1.finding an arbitrary row is much slower.
2.deletion is fast and efficient but the
problem occurs when you want to inserta
new row.
8 SUDHARCHANAN
9 YOKESH
ID NAME
1 AGASH
2 AJITH Insert a new data with the name of
3 HARISH
naresh.
4 MUGESH
5 DINESH
6 MANOJ
7 LOGESH
Step1:Read each row.
Step2:Decide if this row comes before the
new row,
- - - I f so,store it in a new table.
Step3:Reach the insertion point,save the new
row of data.
Step4:Append the rest of the data to the end
of the new table.
To add a row of data,the db has to retrieve
every row in the table.
Operations for inserting a new row into a
table:
Sort the name and insert the new
row(naresh).
Copy the top of the table to a newtable.
Store the new data row (10 Naresh).
Copy the rest of the data.
ID NAME
1 AGASH
2 AJITH
5 DINESH
3 HARISH
6 MANOJ
4 MUGESH
10 NARESH
7 LOKESH
8
9
SUDHARC
H
YOKESH
ANAN
Problems of sequential tables can be solved
by using a indexes.
Use of pointers:
--when data is stored,it is stored atsome
location.
--This location is identified by address.
-- A variable that points to this address is
called a pointer.
--Physical pointers used to provide fast
access to data.
Drawbacks:
-- db is tied to a specific disk drive.
--Data must be stored in the same physical
location.
Backup restoring
Move the db to a new drive
DATA
KEY V
ALUE ADDRESS
POINTER
ADDRESS
Data can be stored in
one location.
key value can be
stored in a different
location.
When the db retrieves
the key value,it follows
the pointer to retrieve
the associated data.
Faster access to data.
Sorts and stores the key value from the
original table along with a pointer to the rest
of the data in each row.
USES:
--Fast random and sequential accessto
tables.
-- DB system can search the index and use
the pointers to retrieve the desireddata.
Address ID Name
A11 1 K
A22 2 B
A32 3 G
A42 4 A
A47 5 L
A58 6 W
A63 7 V
A67 8 U
A78 9 R
A83 10 S
ID Pointer
1 A11
2 A22
3 A32
4 A42
5 A47
6 A58
7 A63
8 A67
9 A78
10 A83
Name Pointer
K A11
B A22
G A32
A A42
L A47
W A58
V A63
U A67
R A78
S A83
Indexed for ID and
Name
Sorted index can be searched rapidly.
If you search a file sequentially,use N+1/2
data look ups to find the desired row.
Binary Search:keeps splitting the data set in
half until it findsthe desired data.
Example:
To find the entry for Perin.start at the
midpoint 14 /2=7 and the 7th entry is Manoj.
NAME
AGASH
AJITH
DINESH
HARISH
KARTHICK
LOKESH
MANOJ
MUKESH
NARESH
PERIN
PRATHI
RATHAKRISHNAN
SURENDHAR
YOKESH
Since Perin comes after Manoj,you have
eliminated first half of the entries in the
table.
NAME
AGASH
AJITH
DINESH
HARISH
KARTHICK
LOKESH
MANOJ
Name
MUKESH
NARESH
PERIN
PRATHI
RATHAKRISHNAN
SURENDHAR
YOKESH
Now divide the remaining entries
in half to find the new mid point
7/2=3.5=>4.
Now Perin comes before Prathi,so
remaining entries.
Repeat this process until you find
the desired value.
requires four lookup steps to
find the entry for Perin.
Drawbacks:
If the index is stored sequentially then it
faces the same difficulties with inserting a
new row as the sequential approach.
Indexes are defined when a new row of data
is added to the table,every index is to be
modified.
Steps to select an indexed columns:
1. To index only the columns that require
random searches.
2.Index the columns used in the JOIN
condition.
3. To test your application with large amount
of simple data and heavy usage.
4. A good analyser can monitor usage,
- - - identifyproblems.
--- suggest which columns should be
indexed.
To solve a insert problem,indexes can
generally based on linked list instead of
sequential index list.
With a linked list,
---Any data element can be stored
separately.
A pointer is then used to link to the next data
item.
An index element – 3 parts:
1.Key Value
2.A pointer to the associated data element.
3.A pointer to the next index element.
Advantage:
Insertion and deletion of data can be made
easily and rapidly.
Eaton B71 ***B14 A58
B29
B14 Eles B71 A97
New element keep the B14
address
Farris B38 A63
B71
Inserting a new key row into a linked list
requires three basic steps:
1.Store the data and store the index element
keeping the address of each.
2.Find the point in the index to insert the
new row using a binary search.
3.Change the link pointers.
Link the elements into a tree.
Each element contains:
--key value.
--pointer to the rest of thedata.
-- two link pointers.
< key Data <=
Two links:
1.Left Pointer– lower values.
2.Right Pointer- value greater than or to the value
in the node.
Root Node - highest node on the tree.
Bottom Node – called as leaves end of the tree
branches.
The number of nodes between the root and the leaves
are called the depth of the tree.
Set the degree m and m is usually an odd
number.
-- The degree represents the maximum
number of children that can fall below
any node.
Every node (except the root) must have between
m/ 2 and m children.
All leaves are at the same level or depth.
All key values are displayed on the bottom
leaves.
A non-leaf nodes with n children will contain n-1
key values.
Leaves are connected by pointers.
Advantage:
--provides a guaranteed level of performance
for access to the data.
-- fast sequential retrieval.
--ability to add or delete elements from the
tree.
Store all the key values in numbered storage
location.
Key value is converted to a storage location
number and is divided by a prime number.
Example:
Consider 100 elements with key values
ranging from 100 to 999.
-- 101 is the prime number.
--divide each key value by the prime number
and look at the remainder.
528 key value
23
remainder
Location number
528 key value will be s.tored in location number 23
If two keys have the same remainder,one is
stored in an overflow location.
711
310
528
Overflow /collisions
Uses:
1.fast for finding and storing randomdata.
2.The key value is immediately converted
into a storage location.
Drawbacks:
1.no sequential retrieval of data.
2.more time to reorganize the table.
3.decide the space that will be needed before
you collect the data.
THANK YOU

More Related Content

What's hot

Chapter 8: tree data structure
Chapter 8:  tree data structureChapter 8:  tree data structure
Chapter 8: tree data structure
Mahmoud Alfarra
 
linked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutoriallinked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutorial
Afzal Badshah
 
Data structures
Data structuresData structures
Data structures
MADHAVASAIYENDUVA
 
Data Structure using c language for beginners
Data Structure using c language for beginners Data Structure using c language for beginners
Data Structure using c language for beginners
Vinayak SofTech
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithms
Aakash deep Singhal
 
Data structures 1
Data structures 1Data structures 1
Data structures 1
Pardhasaradhy
 
Introduction of Data Structure
Introduction of Data StructureIntroduction of Data Structure
Introduction of Data Structure
Mandavi Classes
 
Linked list (introduction) 1
Linked list (introduction) 1Linked list (introduction) 1
Linked list (introduction) 1
DrSudeshna
 
Introductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, QueueIntroductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, Queue
Ghaffar Khan
 
SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query Optimization
Brian Gallagher
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure ppt
NalinNishant3
 
computer notes - Linked list
computer notes - Linked listcomputer notes - Linked list
computer notes - Linked list
ecomputernotes
 
Linked List
Linked ListLinked List
Linked List
Keshav Vaswani
 
Introduction of Data Structures and Algorithms by GOWRU BHARATH KUMAR
Introduction of Data Structures and Algorithms by GOWRU BHARATH KUMARIntroduction of Data Structures and Algorithms by GOWRU BHARATH KUMAR
Introduction of Data Structures and Algorithms by GOWRU BHARATH KUMAR
BHARATH KUMAR
 
Chapter 1( intro &amp; overview)
Chapter 1( intro &amp; overview)Chapter 1( intro &amp; overview)
Chapter 1( intro &amp; overview)
MUHAMMAD AAMIR
 
Binary tree
Binary treeBinary tree
Binary tree
Maria Saleem
 
Java Linked List Tutorial | Edureka
Java Linked List Tutorial |  EdurekaJava Linked List Tutorial |  Edureka
Java Linked List Tutorial | Edureka
Edureka!
 
Data structure week y 4
Data structure week y 4Data structure week y 4
Data structure week y 4
karmuhtam
 
Data Structure # vpmp polytechnic
Data Structure # vpmp polytechnicData Structure # vpmp polytechnic
Data Structure # vpmp polytechnic
lavparmar007
 
Presentation on Data Structure
Presentation on Data StructurePresentation on Data Structure
Presentation on Data Structure
A. N. M. Jubaer
 

What's hot (20)

Chapter 8: tree data structure
Chapter 8:  tree data structureChapter 8:  tree data structure
Chapter 8: tree data structure
 
linked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutoriallinked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutorial
 
Data structures
Data structuresData structures
Data structures
 
Data Structure using c language for beginners
Data Structure using c language for beginners Data Structure using c language for beginners
Data Structure using c language for beginners
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithms
 
Data structures 1
Data structures 1Data structures 1
Data structures 1
 
Introduction of Data Structure
Introduction of Data StructureIntroduction of Data Structure
Introduction of Data Structure
 
Linked list (introduction) 1
Linked list (introduction) 1Linked list (introduction) 1
Linked list (introduction) 1
 
Introductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, QueueIntroductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, Queue
 
SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query Optimization
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure ppt
 
computer notes - Linked list
computer notes - Linked listcomputer notes - Linked list
computer notes - Linked list
 
Linked List
Linked ListLinked List
Linked List
 
Introduction of Data Structures and Algorithms by GOWRU BHARATH KUMAR
Introduction of Data Structures and Algorithms by GOWRU BHARATH KUMARIntroduction of Data Structures and Algorithms by GOWRU BHARATH KUMAR
Introduction of Data Structures and Algorithms by GOWRU BHARATH KUMAR
 
Chapter 1( intro &amp; overview)
Chapter 1( intro &amp; overview)Chapter 1( intro &amp; overview)
Chapter 1( intro &amp; overview)
 
Binary tree
Binary treeBinary tree
Binary tree
 
Java Linked List Tutorial | Edureka
Java Linked List Tutorial |  EdurekaJava Linked List Tutorial |  Edureka
Java Linked List Tutorial | Edureka
 
Data structure week y 4
Data structure week y 4Data structure week y 4
Data structure week y 4
 
Data Structure # vpmp polytechnic
Data Structure # vpmp polytechnicData Structure # vpmp polytechnic
Data Structure # vpmp polytechnic
 
Presentation on Data Structure
Presentation on Data StructurePresentation on Data Structure
Presentation on Data Structure
 

Similar to DATASTORAGE

Linked list (1).pptx
Linked list (1).pptxLinked list (1).pptx
Linked list (1).pptx
rajveersingh643731
 
ds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdfds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdf
KamranAli649587
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
shameen khan
 
single linked list
single linked listsingle linked list
single linked list
Sathasivam Rangasamy
 
Linkedlists
LinkedlistsLinkedlists
Linkedlists
Rajendran
 
CS8391-DATA-STRUCTURES.pdf
CS8391-DATA-STRUCTURES.pdfCS8391-DATA-STRUCTURES.pdf
CS8391-DATA-STRUCTURES.pdf
raji175286
 
Notes of bca Question paper for exams and tests
Notes of bca Question paper for exams and testsNotes of bca Question paper for exams and tests
Notes of bca Question paper for exams and tests
priyanshukumar97908
 
B TREE ( a to z concept ) in data structure or DBMS
B TREE ( a to z concept ) in data structure  or DBMSB TREE ( a to z concept ) in data structure  or DBMS
B TREE ( a to z concept ) in data structure or DBMS
MathkeBhoot
 
Data structure
 Data structure Data structure
Data structure
Shahariar limon
 
Linked list.docx
Linked list.docxLinked list.docx
Linked list.docx
EmilyMengich
 
linked lists in data structures
linked lists in data structureslinked lists in data structures
linked lists in data structures
DurgaDeviCbit
 
module 3-.pptx
module 3-.pptxmodule 3-.pptx
module 3-.pptx
kumarkaushal17
 
B+ trees and height balance tree
B+ trees and height balance treeB+ trees and height balance tree
B+ trees and height balance tree
Jasleen Kaur (Chandigarh University)
 
Data Structures_Linked List
Data Structures_Linked ListData Structures_Linked List
Data Structures_Linked List
ThenmozhiK5
 
Data Structure Question Bank(2 marks)
Data Structure Question Bank(2 marks)Data Structure Question Bank(2 marks)
Data Structure Question Bank(2 marks)
pushpalathakrishnan
 
DS_LinkedList.pptx
DS_LinkedList.pptxDS_LinkedList.pptx
DS_LinkedList.pptx
msohail37
 
DS Module 03.pdf
DS Module 03.pdfDS Module 03.pdf
DS Module 03.pdf
SonaPathak5
 
unit 1.pptx
unit 1.pptxunit 1.pptx
unit 1.pptx
ssuser7922b8
 
Linked List
Linked ListLinked List
Linked List
BHARATH KUMAR
 
Unit 4 data storage and querying
Unit 4   data storage and queryingUnit 4   data storage and querying
Unit 4 data storage and querying
Ravindran Kannan
 

Similar to DATASTORAGE (20)

Linked list (1).pptx
Linked list (1).pptxLinked list (1).pptx
Linked list (1).pptx
 
ds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdfds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdf
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
 
single linked list
single linked listsingle linked list
single linked list
 
Linkedlists
LinkedlistsLinkedlists
Linkedlists
 
CS8391-DATA-STRUCTURES.pdf
CS8391-DATA-STRUCTURES.pdfCS8391-DATA-STRUCTURES.pdf
CS8391-DATA-STRUCTURES.pdf
 
Notes of bca Question paper for exams and tests
Notes of bca Question paper for exams and testsNotes of bca Question paper for exams and tests
Notes of bca Question paper for exams and tests
 
B TREE ( a to z concept ) in data structure or DBMS
B TREE ( a to z concept ) in data structure  or DBMSB TREE ( a to z concept ) in data structure  or DBMS
B TREE ( a to z concept ) in data structure or DBMS
 
Data structure
 Data structure Data structure
Data structure
 
Linked list.docx
Linked list.docxLinked list.docx
Linked list.docx
 
linked lists in data structures
linked lists in data structureslinked lists in data structures
linked lists in data structures
 
module 3-.pptx
module 3-.pptxmodule 3-.pptx
module 3-.pptx
 
B+ trees and height balance tree
B+ trees and height balance treeB+ trees and height balance tree
B+ trees and height balance tree
 
Data Structures_Linked List
Data Structures_Linked ListData Structures_Linked List
Data Structures_Linked List
 
Data Structure Question Bank(2 marks)
Data Structure Question Bank(2 marks)Data Structure Question Bank(2 marks)
Data Structure Question Bank(2 marks)
 
DS_LinkedList.pptx
DS_LinkedList.pptxDS_LinkedList.pptx
DS_LinkedList.pptx
 
DS Module 03.pdf
DS Module 03.pdfDS Module 03.pdf
DS Module 03.pdf
 
unit 1.pptx
unit 1.pptxunit 1.pptx
unit 1.pptx
 
Linked List
Linked ListLinked List
Linked List
 
Unit 4 data storage and querying
Unit 4   data storage and queryingUnit 4   data storage and querying
Unit 4 data storage and querying
 

Recently uploaded

The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 

Recently uploaded (20)

The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 

DATASTORAGE

  • 1. NEHRUREVATHY DEPT . OF BCA DATABASE MANAGEMENT SYSTEM Any Queries:nehrurevathy@gmail.com
  • 2. Three primary methods: 1.sequential storage 2.creating index table for data 3.direct/hashed key storage 1.sequential storage Each row is stored in a predefined order. Uses: -- data retrieval is always in a fixed order. --contains a lot of common data. --backup for transferring data to a different db.
  • 3. Drawbacks: 1.finding an arbitrary row is much slower. 2.deletion is fast and efficient but the problem occurs when you want to inserta new row.
  • 4. 8 SUDHARCHANAN 9 YOKESH ID NAME 1 AGASH 2 AJITH Insert a new data with the name of 3 HARISH naresh. 4 MUGESH 5 DINESH 6 MANOJ 7 LOGESH
  • 5. Step1:Read each row. Step2:Decide if this row comes before the new row, - - - I f so,store it in a new table. Step3:Reach the insertion point,save the new row of data. Step4:Append the rest of the data to the end of the new table.
  • 6. To add a row of data,the db has to retrieve every row in the table. Operations for inserting a new row into a table: Sort the name and insert the new row(naresh). Copy the top of the table to a newtable. Store the new data row (10 Naresh). Copy the rest of the data.
  • 7. ID NAME 1 AGASH 2 AJITH 5 DINESH 3 HARISH 6 MANOJ 4 MUGESH 10 NARESH 7 LOKESH 8 9 SUDHARC H YOKESH ANAN
  • 8. Problems of sequential tables can be solved by using a indexes. Use of pointers: --when data is stored,it is stored atsome location. --This location is identified by address. -- A variable that points to this address is called a pointer. --Physical pointers used to provide fast access to data.
  • 9. Drawbacks: -- db is tied to a specific disk drive. --Data must be stored in the same physical location. Backup restoring Move the db to a new drive
  • 10. DATA KEY V ALUE ADDRESS POINTER ADDRESS Data can be stored in one location. key value can be stored in a different location. When the db retrieves the key value,it follows the pointer to retrieve the associated data.
  • 11. Faster access to data. Sorts and stores the key value from the original table along with a pointer to the rest of the data in each row. USES: --Fast random and sequential accessto tables. -- DB system can search the index and use the pointers to retrieve the desireddata.
  • 12. Address ID Name A11 1 K A22 2 B A32 3 G A42 4 A A47 5 L A58 6 W A63 7 V A67 8 U A78 9 R A83 10 S ID Pointer 1 A11 2 A22 3 A32 4 A42 5 A47 6 A58 7 A63 8 A67 9 A78 10 A83 Name Pointer K A11 B A22 G A32 A A42 L A47 W A58 V A63 U A67 R A78 S A83 Indexed for ID and Name
  • 13. Sorted index can be searched rapidly. If you search a file sequentially,use N+1/2 data look ups to find the desired row. Binary Search:keeps splitting the data set in half until it findsthe desired data. Example: To find the entry for Perin.start at the midpoint 14 /2=7 and the 7th entry is Manoj.
  • 14. NAME AGASH AJITH DINESH HARISH KARTHICK LOKESH MANOJ MUKESH NARESH PERIN PRATHI RATHAKRISHNAN SURENDHAR YOKESH Since Perin comes after Manoj,you have eliminated first half of the entries in the table. NAME AGASH AJITH DINESH HARISH KARTHICK LOKESH MANOJ
  • 15. Name MUKESH NARESH PERIN PRATHI RATHAKRISHNAN SURENDHAR YOKESH Now divide the remaining entries in half to find the new mid point 7/2=3.5=>4. Now Perin comes before Prathi,so remaining entries. Repeat this process until you find the desired value. requires four lookup steps to find the entry for Perin.
  • 16. Drawbacks: If the index is stored sequentially then it faces the same difficulties with inserting a new row as the sequential approach. Indexes are defined when a new row of data is added to the table,every index is to be modified.
  • 17. Steps to select an indexed columns: 1. To index only the columns that require random searches. 2.Index the columns used in the JOIN condition. 3. To test your application with large amount of simple data and heavy usage. 4. A good analyser can monitor usage, - - - identifyproblems. --- suggest which columns should be indexed.
  • 18. To solve a insert problem,indexes can generally based on linked list instead of sequential index list. With a linked list, ---Any data element can be stored separately. A pointer is then used to link to the next data item.
  • 19.
  • 20. An index element – 3 parts: 1.Key Value 2.A pointer to the associated data element. 3.A pointer to the next index element. Advantage: Insertion and deletion of data can be made easily and rapidly.
  • 21. Eaton B71 ***B14 A58 B29 B14 Eles B71 A97 New element keep the B14 address Farris B38 A63 B71
  • 22. Inserting a new key row into a linked list requires three basic steps: 1.Store the data and store the index element keeping the address of each. 2.Find the point in the index to insert the new row using a binary search. 3.Change the link pointers.
  • 23. Link the elements into a tree. Each element contains: --key value. --pointer to the rest of thedata. -- two link pointers.
  • 24. < key Data <= Two links: 1.Left Pointer– lower values. 2.Right Pointer- value greater than or to the value in the node. Root Node - highest node on the tree. Bottom Node – called as leaves end of the tree branches. The number of nodes between the root and the leaves are called the depth of the tree.
  • 25. Set the degree m and m is usually an odd number. -- The degree represents the maximum number of children that can fall below any node. Every node (except the root) must have between m/ 2 and m children. All leaves are at the same level or depth. All key values are displayed on the bottom leaves. A non-leaf nodes with n children will contain n-1 key values. Leaves are connected by pointers.
  • 26. Advantage: --provides a guaranteed level of performance for access to the data. -- fast sequential retrieval. --ability to add or delete elements from the tree.
  • 27. Store all the key values in numbered storage location. Key value is converted to a storage location number and is divided by a prime number. Example: Consider 100 elements with key values ranging from 100 to 999. -- 101 is the prime number. --divide each key value by the prime number and look at the remainder.
  • 28. 528 key value 23 remainder Location number 528 key value will be s.tored in location number 23
  • 29. If two keys have the same remainder,one is stored in an overflow location. 711 310 528 Overflow /collisions
  • 30. Uses: 1.fast for finding and storing randomdata. 2.The key value is immediately converted into a storage location. Drawbacks: 1.no sequential retrieval of data. 2.more time to reorganize the table. 3.decide the space that will be needed before you collect the data.