0% found this document useful (0 votes)
9 views6 pages

Fragmentations

Fragmentation involves dividing a database table into fragments or subsets. There are three main types - horizontal which divides rows, vertical which divides columns, and derived horizontal which divides rows based on conditions. Horizontal ensures completeness and disjointness while vertical ensures completeness within each fragment. Reconstruction combines fragments using common columns or keys.

Uploaded by

seeyoooulaterbye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views6 pages

Fragmentations

Fragmentation involves dividing a database table into fragments or subsets. There are three main types - horizontal which divides rows, vertical which divides columns, and derived horizontal which divides rows based on conditions. Horizontal ensures completeness and disjointness while vertical ensures completeness within each fragment. Reconstruction combines fragments using common columns or keys.

Uploaded by

seeyoooulaterbye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Fragmentation

1. Primary Horizontal Fragmentation:


- Definition: Primary horizontal fragmentation involves breaking a
table into subsets based on the values of one or more columns,
resulting in separate fragments.
- Example: Consider a table "Employee" with columns: EmployeeID,
Name, Department, Salary. Primary horizontal fragmentation could
be done based on the "Department" column, creating fragments like
"Employee_Dept1," "Employee_Dept2," etc.
- Completeness: Each row is included in one and only one fragment,
ensuring completeness.
- Reconstruction: To reconstruct the original table, you would need
to combine all fragments using the common column (e.g.,
"Department").
- Disjointness: Rows in each fragment are distinct; there is no
overlap.

2. Derived Horizontal Fragmentation:


- Definition: Derived horizontal fragmentation is based on
predefined queries or conditions, resulting in fragments that satisfy
specific criteria.
- Example: Continuing with the "Employee" table, a derived
horizontal fragment might include only rows where "Salary" is
greater than a certain threshold.
- Completeness: Completeness depends on the defined condition; it
may not include all rows.
- Reconstruction: Reconstruction is based on the specified
condition; only rows satisfying that condition are reconstructed.
- Disjointness: Fragments are disjoint based on the defined
condition.

3. Vertical Fragmentation:
- Definition: Vertical fragmentation involves dividing a table by
selecting specific columns for each fragment.
- Example: For the "Employee" table, one vertical fragment could
include only the columns "EmployeeID" and "Name," and another
fragment includes "Department" and "Salary."
- Completeness: Each fragment contains only a subset of columns,
ensuring completeness within the fragment.
- Reconstruction: Reconstruction requires combining fragments
horizontally based on a common column or key.
- Disjointness: Columns in each fragment are distinct; there is no
overlap.

Properties:

- Completeness:
- Primary Horizontal Fragmentation: Ensures completeness by
assigning each row to exactly one fragment.
- Derived Horizontal Fragmentation: Completeness depends on the
defined condition. Fragments may not include all rows.
- Vertical Fragmentation: Each fragment is complete in terms of
columns but may not contain all rows.

- Reconstruction:
- Primary Horizontal Fragmentation: Reconstruction is
straightforward by combining fragments using a common column.
- Derived Horizontal Fragmentation: Reconstruction is based on the
defined condition; only rows satisfying that condition are
reconstructed.
- Vertical Fragmentation: Reconstruction requires combining
fragments horizontally based on a common key.

- Disjointness:
- Primary Horizontal Fragmentation: Rows in each fragment are
distinct; there is no overlap.
- Derived Horizontal Fragmentation: Fragments are disjoint based
on the defined condition.
- Vertical Fragmentation: Columns in each fragment are distinct;
there is no overlap.

In summary, horizontal fragmentation divides rows based on values


or conditions, ensuring completeness and disjointness. Vertical
fragmentation divides columns, ensuring completeness within each
fragment. Reconstruction depends on the fragmentation type and
requires combining fragments based on common columns or keys.

Certainly! Let's go through detailed examples for each type of


fragmentation mentioned:

1. Primary Horizontal Fragmentation:


- Example Table: Employee
```

- Fragmentation:
- Fragments based on the "Department" column:

- Fragment 3 (Sales):
```

2. Derived Horizontal Fragmentation:

- Fragmentation:
- Fragment based on a condition (e.g., Salary greater than 55000):

3. Vertical Fragmentation:
- Fragmentation:
- Fragments based on columns:

These examples illustrate how each type of fragmentation divides a


table into fragments based on specific criteria or conditions. The goal
is to manage and organize data in a way that aligns with the
requirements of a given database system or application.

You might also like