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

9

20

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?

Octal answered 25/4, 2011 at 9:58 Comment(0)
A
47

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.

Advantage answered 17/6, 2011 at 19:16 Comment(2)
An excellent and clear explanation. Just a shame that my lecturer can't write nearly as well you...Raskind
My paid lecturer could not explain me 2 hours of class. You did it in a minute(for free hehe). thanksBrocatel
T
24

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        
Thorner answered 31/8, 2013 at 10:25 Comment(0)
L
6

Original table-. enter image description here


enter image description here

Image comment: It's completely up to you choose how the columns is assembled at each site.


  1. Split the original table up (vertically) by attributes.
  2. Distribute the pieces to the sites of your DDBMS however you like and reassemble them.

    (Usually you want to include the primary key column into each of the fragments, so that you can obtain the original table again if needed).


enter image description here


  1. Split the original table up (horizontally) by row.

  2. Distribute the pieces to the sites of your DDBMS however you like and reassemble them.


Labelle answered 8/5, 2020 at 13:31 Comment(0)
B
2

Vertical fragmentation is required only for distributed databases. Say one of relation R has several attributes. Some of these attribute is consist in R1 and other is R2. Then we are joining page vertically. This is called vertical fragmentation.

Bargeboard answered 20/11, 2011 at 20:15 Comment(0)
N
2

Data fragmentation is an important feature of Distributed Database Management Systems (DDBMS) Horizontal Fragmentation is splitting of tables horizontally that is into tuples or rows. For example, a COMPANY table having 1000 records can be horizontally fragmented into ten fragments, each fragment having 100 unique records.

Vertical Fragmentation is fragmenting of table into columns known as set or site, where every site must have at least one column in common such as the primary key attribute column (so that when the fragmented sites when needed can again be formed to a whole (parent) table using the common column). For example, the EMPLOYEE table having attributes as ENO (PRIMARY KEY), ENAME, ADDRESS, EMAIL & SALARY. Vertically fragmenting this table into two sites such as site1 and site2. Columns in site1 are ENO, ENAME & ADDRESS. Columns in site2 are ENO, EMAIL & SALARY.

Neils answered 1/5, 2016 at 15:14 Comment(0)
P
1

Horizontal Fragmentation divides the relation into tuples called rows

Vertical fragmentation divides the relation into attributes called columns.

Depending upon our application view requirement, we can fragment the relation into horizontal or vertical.

The degree for fragmentation & correctness rule based on application view

Panther answered 5/7, 2013 at 8:34 Comment(0)
S
1

Basically Horizontal Fragmentation splits tables by row wise . In case of vertical Fragmentation splits table column wise.

In the Horizontal Fragmentation Table remain same as previous.Only the rows are splits. In Vertical Fragmentation one table splits into two or more tables.

Sandrocottus answered 17/11, 2014 at 16:46 Comment(0)
L
0

Horizontal Fragmentation splits tables by rows. It differs from Vertical Fragmentation in that the relationship between key columns and non-key columns remains the same. The content of the tables differ by key value.

Horizontal fragmentation e.g: The company wants each department to maintain its own data. In this example, there would be only one row in each department's Department table, and the other tables contain only the data for the department's employees.

Ludicrous answered 29/11, 2015 at 10:46 Comment(0)
H
0

In simple words in Horizontal fragmentation we split the table into tuples mean in rows the structure of table remain same only we split the one or tow rows . In vertical fragmentation we split the table with respect to attribute column we make moer table from the original table

Horsefaced answered 16/6, 2019 at 4:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.