Skip to content

robeespi/Database-design-by-Bond-Energy-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. Database design by Bond Energy Algorithm

The bond energy algorithm (BEA) was developed to determine how to group data and how to physically place data on RDBMS.

It can be used to cluster attributes based on usage and then perform logical or physical design accordingly. With BEA, the affinity (bond) between database attributes is based on common usage

This repo contains two separate procedures

  • AAGenerator.cpp
  • CAGenerator.cpp

AAGenerator takes the input of all attributes of a relation, a set of queries and their access frequencies at different sites, and produces the output of an affinity matrix AA

CA Generator takes input of an affinity matrix AA and produces a clustered affinity matrix CA.

the Attribute Affinity is measured by the extended Otsuka-Ochiai coefficient (https://en.wikipedia.org/wiki/Yanosuke Otsuka) i. The following equations show the details of the computation, where n is the number of attributes, and m is the number of sites, Aik is the number of times Attribute Ai is accessed by Query qk , considering of all sites.

alt text

2. Code Structure Overview

AAGenerator.cpp

  1. Accept three input text files in the order of Attributes (att), Queries (query) and Access Frequencies (acc) as command line arguments

  2. Read the features of the relation (att_2.txt)

  3. Read the queries (query_2.txt)

  4. Get attribute usage values (att_2.txt,query_2.txt)

  5. Read Access frequency matrix ACC

  6. Filling the attribute affinity matrix AA (usage, acc_2.txt, att_2.size, query_2.size)

  7. Output: Printing out the required attribute affinity matrix (AA----> aa_2.txt).

CAGenerator.cpp

1.Accept input affinity matrix (aa_2.txt) as a command line argument

2.Read the Affinity Matrix AA

3.Calculate the Clustered Affinity Matrix CA by Bond Energy Algorithm (calculating the bond and contribution of a placement as 2 separated functions)

4.Printing out Matrix CA

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages