[Solved] COMPSCI4094 Assignment1-Bond Energy Algorithm of vertical fragmentation

$25

File Name: COMPSCI4094_Assignment1-Bond_Energy_Algorithm_of_vertical_fragmentation.zip
File Size: 668.82 KB

SKU: [Solved] COMPSCI4094 Assignment1-Bond Energy Algorithm of vertical fragmentation Category: Tag:
5/5 - (1 vote)

In this assignment you are required to implement the Bond Energy Algorithm of vertical fragmentation. Your code should contains two separate procedures AA Generator and CA Generator, where AA Generator 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, and CA Generator takes input of an affinity matrix AA and produces a clustered affinity matrix CA. For description of the BEA algorithm, definitions of AA and CA, please see lecture slides/textbook.

In this assignment, the Attribute Affinity is measured by the extended Otsuka-Ochiai coefficient (https://en.wikipedia.org/wiki/Yanosuke Otsuka) instead of the traditional method described in the textbook. 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. For the result of division, you must round it up to the nearest integer.

,

S1 S2 S3
q1 15 20 10
q2 5 0 0
q3 25 25 25
q4 5 0 0

Example

For AA Generator:

Input

  • The relation, called PROJ, has the following features Ai:

Label Name A1 PNO A2 PNAME

A3 BUDGET A4 LOC

  • Queries (qi):

q1: SELECT BUDGET FROM PROJ WHERE PNO=Value q2: SELECT PNAME, BUDGET FROM PROJ q3: SELECT PNAME FROM PROJ WHERE LOC=Value q4: SELECT SUM(BUDGET) FROM PROJ WHERE LOC=Value

  • Access frequency matrix ACC, where Si denotes the i-th site:

Output

  • The attribute affinity matrix AA:
A1 A2 A3 A4
A1 45 0 41 0
A2 0 71 1 71
A3 41 1 38 1
A4 0For CA Generator:Input The attribute affinity matrix AA: 71 1 71
A1 A2 A3 A4
A1 45 0 41 0
A2 0 71 1 71
A3 41 1 38 1
A4 0Output The attribute affinity matrix CA: 71 1 71
A1 A3 A4 A2
A1 45 41 0 0
A3 41 38 1 1
A4 0 1 71 71
A2 0 1 71 71

Web-submission instructions

  • First, type the following command, all on one line (replacing xxxxxxx with your student ID):

svn mkdir parents -m DDDM

https://version-control.adelaide.edu.au/svn/axxxxxxx/2020/s2/dddm/assignment1

  • Then, check out this directory and add your files: svn co https://version-control.adelaide.edu.au/svn/axxxxxxx/2020/s2/dddm/assignment1 cd assignment1 svn add AAGenerator.cpp svn add CAGenerator.cpp svn commit -m assignment1 solution
  • Next, go to the web submission system at:

https://cs.adelaide.edu.au/services/websubmission/

Navigate to 2020, Semester 2, Distributed Databases and Data Mining, Assignment 1. Then, click Tab Make Submission for this assignment and indicate that you agree to the declaration. The automark script will then check whether your code compiles. You can make as many resubmissions as you like. If your final solution does not compile you will not get any marks for this solution.

  • Note:
    1. The auto-marker script compiles and runs the two cpp files named AAGenera-tor.cpp and CAGenerator.cpp one by one.
    2. The auto-marker script will compile your AAGenerator.cpp and CAGenerator.cpp bythe following command:

g++ -std=c++11 AAGenerator.cpp -o runAA g++ -std=c++11 CAGenerator.cpp -o runCA

  • Your AAGenerator.cpp should accept three input text files in the order of Attributes(att), Queries (query) and Access Frequencies (acc), which are randomly generated by the system, then output and print the required attribute affinity matrix (aa). Your CAGenerator.cpp should accept input affinity matrix (aa) provided by the system rather than reading your AAGenerators output AA, then output and print the clustered affinity matrix (CA) as the output. In this way of testing AA and CA separately, your marks will be maximized you will receive marks for your correct CAGenerator coding even if your AAGenerator produces incorrect AA.
  1. The file path and the file name in your local machine will not work with our websub-mission system.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] COMPSCI4094 Assignment1-Bond Energy Algorithm of vertical fragmentation
$25