SlideShare a Scribd company logo
1 of 18
MERGING FILES
INTRODUCTION

   Merging in revision control, is a fundamental operation that
    reconciles multiple changes made to a revision-controlled collection
    of files.

   Most often, it is necessary when a file is modified by two people on
    two different computers at the same time.

   When two branches are merged, the result is a single collection of
    files that contains both sets of changes.

   External sorting may be used.
EXTERNAL SORTING
   External sorting is a term for a class of sorting algorithms that can
    handle massive amounts of data.

   External sorting is required when the data being sorted do not fit into
    the main memory of a computing device and instead they must reside
    in the slower external memory.

   External sorting typically uses a sort-merge strategy.

   In the merge phase, the sorted sub files are combined into a single
    larger file.
MERGE TECHNIQUES

   Two Way Merge

   Three Way Merge

   K-Way Merge
TWO WAY MERGE

   A two-way merge performs an automated difference
    analysis between a file 'A' and a file 'B'.



   This method considers the differences between the two
    files alone to conduct the merge and makes a "best-
    guess" analysis to generate the resulting merge.
TWO WAY MERGE
ALGORITHM
DISADVANTAGE OF TWO WAY MERGE

   This type of merge is usually the most error prone.

   Requires user intervention to verify and sometimes
    correct the result of the merge.
THREE WAY MERGE
   A three-way merge is performed after an automated difference
    analysis between a file 'A' and a file 'B' while also considering
    the origin, or parent, of both files.

   This type of merge is more likely to be usable in revision
    control systems, which can guarantee that such a parent exists
    and is known.

   The merge tool examines the differences and patterns
    appearing in the changes between both files as well as the
    parent.
THREE WAY MERGE
ADVANTAGES OF THREE WAY MERGE

   This merge is the most reliable and has performed well
    in practice.

   It has also required the least amount of user intervention.

   In many cases, requiring no intervention at all making
    the process eligible for task automation.
K-WAY MERGE ALGORITHM
Let there be two arrays:

•An array of k lists and
•An array of k index values corresponding to the current
element in each of the k lists, respectively.
Main loop of the K-Way Merge algorithm:
•Find the index of the minimum current item, minItem
•Process minItem(output it to the output list)
•For i=0 until i=k-1 (in increments of 1)
     If the current item of list i is equal to minItem then
    advance list i.
•Go back to the first step.
K-WAY MERGE
   Tournament sort is used.
PERFORMANCE FACTORS

   The number of records to be sorted.

   The size of the records.

   The number of storage devices used.

   The distribution of those devices on the available I/O
    channels.

   The distribution of key values in the input files.
THANK YOU

More Related Content

What's hot

What's hot (20)

3.9 external sorting
3.9 external sorting3.9 external sorting
3.9 external sorting
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
3 tier data warehouse
3 tier data warehouse3 tier data warehouse
3 tier data warehouse
 
15 puzzle problem using branch and bound
15 puzzle problem using branch and bound15 puzzle problem using branch and bound
15 puzzle problem using branch and bound
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 
Crash recovery in database
Crash recovery in databaseCrash recovery in database
Crash recovery in database
 
AVL Tree
AVL TreeAVL Tree
AVL Tree
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
 
Selection sorting
Selection sortingSelection sorting
Selection sorting
 
b+ tree
b+ treeb+ tree
b+ tree
 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques
 
Data mining technique (decision tree)
Data mining technique (decision tree)Data mining technique (decision tree)
Data mining technique (decision tree)
 
Lecture optimal binary search tree
Lecture optimal binary search tree Lecture optimal binary search tree
Lecture optimal binary search tree
 
Red black tree
Red black treeRed black tree
Red black tree
 
joins in database
 joins in database joins in database
joins in database
 
Log based and Recovery with concurrent transaction
Log based and Recovery with concurrent transactionLog based and Recovery with concurrent transaction
Log based and Recovery with concurrent transaction
 
Introduction to Web Mining and Spatial Data Mining
Introduction to Web Mining and Spatial Data MiningIntroduction to Web Mining and Spatial Data Mining
Introduction to Web Mining and Spatial Data Mining
 
Database language
Database languageDatabase language
Database language
 
Users of dbms
Users of dbmsUsers of dbms
Users of dbms
 

Viewers also liked

Algorithms for External Memory Sorting
Algorithms for External Memory SortingAlgorithms for External Memory Sorting
Algorithms for External Memory SortingMilind Gokhale
 
Technology development of horticultural production perhorti
Technology development of horticultural production perhortiTechnology development of horticultural production perhorti
Technology development of horticultural production perhortiArjunawiwaha Pandawa
 
Eight ways to optimise your website
Eight ways to optimise your websiteEight ways to optimise your website
Eight ways to optimise your websiteNed Wells
 
Collective identity
Collective identityCollective identity
Collective identityStellaK17
 
Bluetooth an introduction
Bluetooth an introductionBluetooth an introduction
Bluetooth an introductionTech_MX
 
יסודות האימון היהודי
יסודות האימון היהודייסודות האימון היהודי
יסודות האימון היהודיBSDjewishcoaching
 
Ceragem jade bed presentation
Ceragem jade bed presentationCeragem jade bed presentation
Ceragem jade bed presentationAhmed Bahaa
 
Client computing evolution ppt11
Client computing evolution ppt11Client computing evolution ppt11
Client computing evolution ppt11Tech_MX
 
Memory dbms
Memory dbmsMemory dbms
Memory dbmsTech_MX
 
5 ways to improve performance through indexing
5 ways to improve performance through indexing5 ways to improve performance through indexing
5 ways to improve performance through indexingJason Strate
 
An Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System ManagementAn Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System Managementfeiwin
 
Merge sort code in C explained
Merge sort code in C explained Merge sort code in C explained
Merge sort code in C explained Mohit Tare
 
Introduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and HeapsIntroduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and HeapsJason Strate
 

Viewers also liked (20)

Merging
MergingMerging
Merging
 
Merging for ihds.info
Merging for ihds.infoMerging for ihds.info
Merging for ihds.info
 
Algorithms for External Memory Sorting
Algorithms for External Memory SortingAlgorithms for External Memory Sorting
Algorithms for External Memory Sorting
 
Merging
Merging Merging
Merging
 
Technology development of horticultural production perhorti
Technology development of horticultural production perhortiTechnology development of horticultural production perhorti
Technology development of horticultural production perhorti
 
Mood board
Mood boardMood board
Mood board
 
Eight ways to optimise your website
Eight ways to optimise your websiteEight ways to optimise your website
Eight ways to optimise your website
 
Collective identity
Collective identityCollective identity
Collective identity
 
Bluetooth an introduction
Bluetooth an introductionBluetooth an introduction
Bluetooth an introduction
 
יסודות האימון היהודי
יסודות האימון היהודייסודות האימון היהודי
יסודות האימון היהודי
 
Ceragem jade bed presentation
Ceragem jade bed presentationCeragem jade bed presentation
Ceragem jade bed presentation
 
Client computing evolution ppt11
Client computing evolution ppt11Client computing evolution ppt11
Client computing evolution ppt11
 
Memory dbms
Memory dbmsMemory dbms
Memory dbms
 
5 ways to improve performance through indexing
5 ways to improve performance through indexing5 ways to improve performance through indexing
5 ways to improve performance through indexing
 
An Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System ManagementAn Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System Management
 
Merge sort code in C explained
Merge sort code in C explained Merge sort code in C explained
Merge sort code in C explained
 
Introduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and HeapsIntroduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and Heaps
 
Heaps
HeapsHeaps
Heaps
 
Files Management
Files ManagementFiles Management
Files Management
 
Presentation-Merge Sort
Presentation-Merge SortPresentation-Merge Sort
Presentation-Merge Sort
 

Similar to Merging files (Data Structure)

MarcEdit Shelter-In-Place Webinar 4: Merging, Clustering, and Integrations…oh...
MarcEdit Shelter-In-Place Webinar 4: Merging, Clustering, and Integrations…oh...MarcEdit Shelter-In-Place Webinar 4: Merging, Clustering, and Integrations…oh...
MarcEdit Shelter-In-Place Webinar 4: Merging, Clustering, and Integrations…oh...Terry Reese
 
Java Abs Java Productivity Creator & Analyzer
Java Abs   Java Productivity Creator & AnalyzerJava Abs   Java Productivity Creator & Analyzer
Java Abs Java Productivity Creator & Analyzerncct
 
A Survey on Improve Efficiency And Scability vertical mining using Agriculter...
A Survey on Improve Efficiency And Scability vertical mining using Agriculter...A Survey on Improve Efficiency And Scability vertical mining using Agriculter...
A Survey on Improve Efficiency And Scability vertical mining using Agriculter...Editor IJMTER
 
Review on Sorting Algorithms A Comparative Study
Review on Sorting Algorithms A Comparative StudyReview on Sorting Algorithms A Comparative Study
Review on Sorting Algorithms A Comparative StudyCSCJournals
 
Query optimization
Query optimizationQuery optimization
Query optimizationPooja Dixit
 
The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)theijes
 
Methodology for Optimizing Storage on Cloud Using Authorized De-Duplication –...
Methodology for Optimizing Storage on Cloud Using Authorized De-Duplication –...Methodology for Optimizing Storage on Cloud Using Authorized De-Duplication –...
Methodology for Optimizing Storage on Cloud Using Authorized De-Duplication –...IRJET Journal
 
Design of file system architecture with cluster
Design of file system architecture with clusterDesign of file system architecture with cluster
Design of file system architecture with clustereSAT Publishing House
 
EVALUATE DATABASE COMPRESSION PERFORMANCE AND PARALLEL BACKUP
EVALUATE DATABASE COMPRESSION PERFORMANCE AND PARALLEL BACKUPEVALUATE DATABASE COMPRESSION PERFORMANCE AND PARALLEL BACKUP
EVALUATE DATABASE COMPRESSION PERFORMANCE AND PARALLEL BACKUPijdms
 
Google File System
Google File SystemGoogle File System
Google File Systemvivatechijri
 
Clustering Algorithm Based On Correlation Preserving Indexing
Clustering Algorithm Based On Correlation Preserving IndexingClustering Algorithm Based On Correlation Preserving Indexing
Clustering Algorithm Based On Correlation Preserving IndexingIOSR Journals
 
EFFICIENT MIXED MODE SUMMARY FOR MOBILE NETWORKS
EFFICIENT MIXED MODE SUMMARY FOR MOBILE NETWORKSEFFICIENT MIXED MODE SUMMARY FOR MOBILE NETWORKS
EFFICIENT MIXED MODE SUMMARY FOR MOBILE NETWORKSijwmn
 
Mining elevated service itemsets on transactional recordsets using slicing
Mining elevated service itemsets on transactional recordsets using slicingMining elevated service itemsets on transactional recordsets using slicing
Mining elevated service itemsets on transactional recordsets using slicingeSAT Publishing House
 
Memory management Assignment Help
Memory management Assignment HelpMemory management Assignment Help
Memory management Assignment HelpJosephErin
 
Distribution transparency and Distributed transaction
Distribution transparency and Distributed transactionDistribution transparency and Distributed transaction
Distribution transparency and Distributed transactionshraddha mane
 
B036407011
B036407011B036407011
B036407011theijes
 

Similar to Merging files (Data Structure) (20)

MarcEdit Shelter-In-Place Webinar 4: Merging, Clustering, and Integrations…oh...
MarcEdit Shelter-In-Place Webinar 4: Merging, Clustering, and Integrations…oh...MarcEdit Shelter-In-Place Webinar 4: Merging, Clustering, and Integrations…oh...
MarcEdit Shelter-In-Place Webinar 4: Merging, Clustering, and Integrations…oh...
 
Java Abs Java Productivity Creator & Analyzer
Java Abs   Java Productivity Creator & AnalyzerJava Abs   Java Productivity Creator & Analyzer
Java Abs Java Productivity Creator & Analyzer
 
A Survey on Improve Efficiency And Scability vertical mining using Agriculter...
A Survey on Improve Efficiency And Scability vertical mining using Agriculter...A Survey on Improve Efficiency And Scability vertical mining using Agriculter...
A Survey on Improve Efficiency And Scability vertical mining using Agriculter...
 
Review on Sorting Algorithms A Comparative Study
Review on Sorting Algorithms A Comparative StudyReview on Sorting Algorithms A Comparative Study
Review on Sorting Algorithms A Comparative Study
 
Query optimization
Query optimizationQuery optimization
Query optimization
 
The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)
 
1816 1819
1816 18191816 1819
1816 1819
 
1816 1819
1816 18191816 1819
1816 1819
 
Methodology for Optimizing Storage on Cloud Using Authorized De-Duplication –...
Methodology for Optimizing Storage on Cloud Using Authorized De-Duplication –...Methodology for Optimizing Storage on Cloud Using Authorized De-Duplication –...
Methodology for Optimizing Storage on Cloud Using Authorized De-Duplication –...
 
Design of file system architecture with cluster
Design of file system architecture with clusterDesign of file system architecture with cluster
Design of file system architecture with cluster
 
Binary Sort
Binary SortBinary Sort
Binary Sort
 
EXECUTION OF ASSOCIATION RULE MINING WITH DATA GRIDS IN WEKA 3.8
EXECUTION OF ASSOCIATION RULE MINING WITH DATA GRIDS IN WEKA 3.8EXECUTION OF ASSOCIATION RULE MINING WITH DATA GRIDS IN WEKA 3.8
EXECUTION OF ASSOCIATION RULE MINING WITH DATA GRIDS IN WEKA 3.8
 
EVALUATE DATABASE COMPRESSION PERFORMANCE AND PARALLEL BACKUP
EVALUATE DATABASE COMPRESSION PERFORMANCE AND PARALLEL BACKUPEVALUATE DATABASE COMPRESSION PERFORMANCE AND PARALLEL BACKUP
EVALUATE DATABASE COMPRESSION PERFORMANCE AND PARALLEL BACKUP
 
Google File System
Google File SystemGoogle File System
Google File System
 
Clustering Algorithm Based On Correlation Preserving Indexing
Clustering Algorithm Based On Correlation Preserving IndexingClustering Algorithm Based On Correlation Preserving Indexing
Clustering Algorithm Based On Correlation Preserving Indexing
 
EFFICIENT MIXED MODE SUMMARY FOR MOBILE NETWORKS
EFFICIENT MIXED MODE SUMMARY FOR MOBILE NETWORKSEFFICIENT MIXED MODE SUMMARY FOR MOBILE NETWORKS
EFFICIENT MIXED MODE SUMMARY FOR MOBILE NETWORKS
 
Mining elevated service itemsets on transactional recordsets using slicing
Mining elevated service itemsets on transactional recordsets using slicingMining elevated service itemsets on transactional recordsets using slicing
Mining elevated service itemsets on transactional recordsets using slicing
 
Memory management Assignment Help
Memory management Assignment HelpMemory management Assignment Help
Memory management Assignment Help
 
Distribution transparency and Distributed transaction
Distribution transparency and Distributed transactionDistribution transparency and Distributed transaction
Distribution transparency and Distributed transaction
 
B036407011
B036407011B036407011
B036407011
 

More from Tech_MX

Virtual base class
Virtual base classVirtual base class
Virtual base classTech_MX
 
Theory of estimation
Theory of estimationTheory of estimation
Theory of estimationTech_MX
 
Templates in C++
Templates in C++Templates in C++
Templates in C++Tech_MX
 
String & its application
String & its applicationString & its application
String & its applicationTech_MX
 
Statistical quality__control_2
Statistical  quality__control_2Statistical  quality__control_2
Statistical quality__control_2Tech_MX
 
Stack data structure
Stack data structureStack data structure
Stack data structureTech_MX
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application Tech_MX
 
Spanning trees & applications
Spanning trees & applicationsSpanning trees & applications
Spanning trees & applicationsTech_MX
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2Tech_MX
 
Set data structure
Set data structure Set data structure
Set data structure Tech_MX
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating SystemTech_MX
 
Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Tech_MX
 
Motherboard of a pc
Motherboard of a pcMotherboard of a pc
Motherboard of a pcTech_MX
 
More on Lex
More on LexMore on Lex
More on LexTech_MX
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbmsTech_MX
 
Linear regression
Linear regressionLinear regression
Linear regressionTech_MX
 

More from Tech_MX (20)

Virtual base class
Virtual base classVirtual base class
Virtual base class
 
Uid
UidUid
Uid
 
Theory of estimation
Theory of estimationTheory of estimation
Theory of estimation
 
Templates in C++
Templates in C++Templates in C++
Templates in C++
 
String & its application
String & its applicationString & its application
String & its application
 
Statistical quality__control_2
Statistical  quality__control_2Statistical  quality__control_2
Statistical quality__control_2
 
Stack data structure
Stack data structureStack data structure
Stack data structure
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application
 
Spss
SpssSpss
Spss
 
Spanning trees & applications
Spanning trees & applicationsSpanning trees & applications
Spanning trees & applications
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2
 
Set data structure
Set data structure Set data structure
Set data structure
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
 
Parsing
ParsingParsing
Parsing
 
Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)
 
Motherboard of a pc
Motherboard of a pcMotherboard of a pc
Motherboard of a pc
 
More on Lex
More on LexMore on Lex
More on Lex
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbms
 
Linkers
LinkersLinkers
Linkers
 
Linear regression
Linear regressionLinear regression
Linear regression
 

Recently uploaded

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 

Recently uploaded (20)

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 

Merging files (Data Structure)

  • 2. INTRODUCTION  Merging in revision control, is a fundamental operation that reconciles multiple changes made to a revision-controlled collection of files.  Most often, it is necessary when a file is modified by two people on two different computers at the same time.  When two branches are merged, the result is a single collection of files that contains both sets of changes.  External sorting may be used.
  • 3. EXTERNAL SORTING  External sorting is a term for a class of sorting algorithms that can handle massive amounts of data.  External sorting is required when the data being sorted do not fit into the main memory of a computing device and instead they must reside in the slower external memory.  External sorting typically uses a sort-merge strategy.  In the merge phase, the sorted sub files are combined into a single larger file.
  • 4. MERGE TECHNIQUES  Two Way Merge  Three Way Merge  K-Way Merge
  • 5. TWO WAY MERGE  A two-way merge performs an automated difference analysis between a file 'A' and a file 'B'.  This method considers the differences between the two files alone to conduct the merge and makes a "best- guess" analysis to generate the resulting merge.
  • 7.
  • 9. DISADVANTAGE OF TWO WAY MERGE  This type of merge is usually the most error prone.  Requires user intervention to verify and sometimes correct the result of the merge.
  • 10. THREE WAY MERGE  A three-way merge is performed after an automated difference analysis between a file 'A' and a file 'B' while also considering the origin, or parent, of both files.  This type of merge is more likely to be usable in revision control systems, which can guarantee that such a parent exists and is known.  The merge tool examines the differences and patterns appearing in the changes between both files as well as the parent.
  • 12. ADVANTAGES OF THREE WAY MERGE  This merge is the most reliable and has performed well in practice.  It has also required the least amount of user intervention.  In many cases, requiring no intervention at all making the process eligible for task automation.
  • 13. K-WAY MERGE ALGORITHM Let there be two arrays: •An array of k lists and •An array of k index values corresponding to the current element in each of the k lists, respectively. Main loop of the K-Way Merge algorithm: •Find the index of the minimum current item, minItem •Process minItem(output it to the output list) •For i=0 until i=k-1 (in increments of 1) If the current item of list i is equal to minItem then advance list i. •Go back to the first step.
  • 14. K-WAY MERGE  Tournament sort is used.
  • 15.
  • 16.
  • 17. PERFORMANCE FACTORS  The number of records to be sorted.  The size of the records.  The number of storage devices used.  The distribution of those devices on the available I/O channels.  The distribution of key values in the input files.