Giter VIP home page Giter VIP logo

dbreaker's Introduction

Project Structure

  • calcite_interface/: (java) code for running calcite on top of mysql.
  • dbreaker-py/: (python) code for sampling and mutating SQL queries.

Docker Setup

The docker is the environment for testing queries. If you don't have docker, you can install them following https://docs.docker.com/install/ To build the docker:

docker build -t dbtest .

docker run -it dbtest

Once you are inside the docker, you can run:

./config_db.sh

to initialize the database and the connector.

To test queries, run

./run_sql.sh [DDL_FILE.ddl.sql] [SQL_FILE.sql] [OUTPUT_FILE]

Examples of DDL_FILE.ddl.sql and SQL_FILE.sql can be found in calcite_interface/example.

Python Setup

Required Python Version: 3.6

(Peplace pip and python with pip3 and python3 if Python 3.6 is not your default python in the following commands)

In order to run query generator, you need to install the following python utils.

Install requirements

pip install -r requirements.txt or conda install --file requirements.txt

Install dbreaker in editable mode

pip install -e .

Run Generator

python main.py --tables 5 --columns 5 --selects 5

This command generates 5 seperate query files each containing a create table statement of a table with 5 columns along with 5 selects to go with it.

Related Work

http://vldb.org/conf/2007/papers/industrial/p1243-bati.pdf

dbreaker's People

Contributors

a19990200130067 avatar k24dizzle avatar mestway avatar

Watchers

 avatar  avatar

dbreaker's Issues

Tasks

Schema generator (in generator.py)

  • number of tables (probably <5 tables)
  • number of columns
  • types column names

Sample Select queries (without aggregations first)

  • projectionItems, tableExpr....

toStr function for Select and Schema

  • toStr for projection ....
  • toStr for schema (CREATE TABLE ....)

Requirement

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.