Code Monkey home page Code Monkey logo

dscalersource's Introduction

This tool implements the algorithm of Dscaler Algorithm published in VLDB2016. http://www.comp.nus.edu.sg/~upsizer/dscaler.pdf

It is implemented using Netbeans IDE.

The programme only works for relational database. All files must be stored in one dir. Assuming we have four table, A.txt, B.txt, C.txt, D.txt stored in the dir testDB/ We first need to convert the keys to integers for efficiency purpose.

===============Preparation============

We need to prepare a configuration file, called inputDB/config.txt

Assuming

  1. C references A and B, and D references C.
  2. C is UNIQUE(the foreign key pairs does not repeat)

The configuration will look like the following:

A #numberOfFKs #numberOfTuples Uniqness a_pk a_fk1 a_fk2 nonkeys B #numberOfFKs #numberOfTuples ... ......

In our example, A's pk is call "id", A has 0 FKs, A has 4 tuples, A is not UNIQUE. Hence, it will look like the following: A 0 4 false id nonkeys

For C, C's pk is "id", C has 2 FKs, C has 4 tuples, C is UNIQUE. Then it will look like

C 2 4 true id A_id-A:id B_id:B-id nonkeys

Before "-" is the attribute name in C,"A_id" Between "-" and ":" is the referenced table for "A_id", "A" After ":" is the referenced attribute name in the reference table.

For example, config.txt might look like the following: A 0 4 0 id nonKeys B 0 4 0 id nonKeys C 2 4 true id A_id-A:id B_id-B:id nonKeys D 1 4 0 id C_id-C:id nonKeys

================Scaling================

To scale DB, you can do a uniform scaling (all tables scale by the same ratio):

java -jar -Xmx50g DscalerSource.jar -i inputDB/ -o output/ -static 0.1

Or, you can scale the table non-uniformly (specify the scaled table size). To specify the tablesize, you need to have inputDB/scaleTable.txt which indicates the scaled table size. The format is the following:

#scaledSize A #scaledSize B ....

By having that, we can scale the database by using the following command:

java -jar Dscaler.jar -i inputDB/ -o output/ -dynamic inputDB/scaleTable.txt

*** -dynamic inputDB/scaleTable.txt tells the location of the scaling file. *** config.txt must always be stored in the input folder

==============External Libs===============

Please download https://github.com/jayCool/CommonLibs for CommonLibs.jar.

Please feel free to contact [email protected].

dscalersource's People

Contributors

jaycool avatar

Stargazers

Jeffrey Tao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.