Ticker

6/recent/ticker-posts

Data Fragmentation - NEED and TYPES of Data Fragmentation

 


Data Fragmentation

Data fragmentation allows one to break a single object into two or more segments or fragments. The object might be a user's database, a system database, or a table. Each fragment can be stored at any site over a computer network. Information about data fragmentation is stored in the Distributed Data Catalog (DDC), from which it is accessed by the transaction processor to process user requests.

Data fragmentation strategies are based at the table level and consist of dividing a table into logical fragments. 

Need to Fragment a Relation

The reasons for fragmenting a relation are as follows:

1) Use of Partial Data by Applications: In general, applications work with views rather than entire relations. Therefore, it may .be more appropriate to work with subsets of relations rather than entire data.

2) Increases Efficiency: Data is stored close to most frequently used site, thus retrieval would be faster. Also, data that is not needed by local applications is not stored, thus the size of data to be looked into is smaller.

3) Parallelism of Transaction Execution: A transaction can be divided into several sub--queries that can operate on fragments in parallel. This increases the degree of concurrency in the system, thus allowing transactions to execute efficiently.

4) Security: Data not required by local applications is not stored at the site. thus no unnecessary security violations may exist.

Types of Fragmentation

There are following types of fragmentation:

Types of Fragmentation
  • Horizontal Fragmentation
  • Mixed Fragmentation
  • Vertical Fragmentation
  • Derived Horizontal Fragmentation

Horizontal Fragmentation: 

Horizontal fragments, as the name suggests are subsets of tuples. Horizontal fragmentation (HF) allows a relation or class to be partitioned into disjoint tuples or instances.

Horizontal fragmentation groups together the tuples in a relation that are collectively used by the important transactions.

A horizontal fragment is produced by specifying a WHERE clause condition that performs a restriction on the tuples in the relation. It can also be defined using the selection operation of the relational algebra.

Vertical Fragmentation:

Vertical fragments are subsets of attributes. Vertical fragmentation groups together only those attributes in A relation that are used jointly by several important transactions.

A vertical fragment is defined using the projection operation of the relational algebra.

In its most simple form, vertical fragmentation is the same as that of decomposition. In general, a relation can be constructed on taking Natural join of all vertical fragments.

Mixed fragmentation:

Sometimes, horizontal or vertical fragmentation of a database schema by itself is insufficient to adequately distribute the data for some applications. Instead, mixed or hybrid fragmentation is required. Mixed fragmentation consists of a horizontal fragment that is vertically fragmented, or a vertical fragment that is then horizontal fragmented.

Derived Horizontal Fragmentation: 

Some applications may involve a join of two or more relations. If the relations are stored at different locations, there may be a significant overhead in processing the join, in such cases. it may be more appropriate to ensure that the relations or fragments of relations that are joined together are at the same location We can achieve this using derived horizontal fragmentation. After going through the basis of concepts relating to distributed database systems, let us sketch the process of design of distributed database systems.