Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Horizontal vs Vertical Fragmentation in Distributed Database Management Systems (DDBMS)

Tags:

In the context in DDBMS, what is the difference between Vertical Fragmentation and Horizontal Fragmentation?

Is it such that the relation's extension is fragmented for vertical fragmentation and intension fragmentation is horizontal fragmentation?

like image 764
DreX Avatar asked Apr 25 '11 09:04

DreX


People also ask

What is the difference between horizontal and vertical fragmentation of distributed databases?

Vertical fragmentation assigns subsets of attributes to different tables. Horizontal fragmentation assigns subsets of instances to different tables.

What are different data fragmentation techniques in distributed databases?

We have three methods for data fragmenting of a table: Horizontal fragmentation. Vertical fragmentation. Mixed or Hybrid fragmentation.

What is Ddbms explain in detail?

A DBMS that enables end users or application programmers to view a collection of physically separate databases as one logical single-system image.

What is horizontal fragmentation example?

Horizontal fragmentation involves taking rows (records) from a table and placing different rows at different nodes (locations). For example, the customer table may be fragmented such that the customers for a given office are stored at that office.


2 Answers

Suppose you have a relation, Student.

You divide relation Student in two sets (call them set1 and set2) such that half of the attributes of Student are in set1 and half of them are in set2. This is called 'vertical fragmentation', as a relation is fragmented along columns (similar to tearing a page vertically). Original relation is obtained by take the natural join of all the sets. For the natural join we require at least one attribute which is common to all the sets(generally it is the primary key).

But if our relation divided so that a subset of rows (see here all attributes are present in rows) is present with site1 (for example), another subset is present with site2, and so on, this is called 'horizontal fragmentation', and original relation is obtained by taking the union of all the sets. It's like tearing a page horizontally.

As is clear, this is in the context of Distributed DBMS.

like image 127
Sanjay Rajpal Avatar answered Sep 21 '22 12:09

Sanjay Rajpal


Say we have this relation

customer_id | Name | Area       | Payment Type  | Sex
      1     | Bob  | London     | Credit card   | Male
      2     | Mike | Manchester | Cash          | Male
      3     | Ruby | London     | Cash          | Female

Horizontal Fragmentation are subsets of tuples (rows)

Fragment 1

customer_id | Name | Area       | Payment Type  | Sex
      1     | Bob  | London     | Credit card   | Male
      2     | Mike | Manchester | Cash          | Male

Fragment 2

customer_id | Name | Area       | Payment Type  | Sex
      3     | Ruby | London     | Cash          | Female

Vertical fragmentation are subset of attributes

Fragment 1

customer_id | Name | Area       | Sex
      1     | Bob  | London     | Male
      2     | Mike | Manchester | Male
      3     | Ruby | London     Female

Fragment 2

customer_id | Payment Type
      1     | Credit card 
      2     | Cash        
      3     | Cash        
like image 44
Bikal Basnet Avatar answered Sep 23 '22 12:09

Bikal Basnet