Coder Social home page Coder Social logo

join-size-estimator's Introduction

Estimation of the Size of Joins

This is a Java application that calculates and prints the estimated join size, actual join size, and the estimation error for two tables in a database. The application takes the name of the two tables as command-line arguments along with the JDBC URL, username, and password for the database connection.

Run-time Arguments

  • url: The JDBC URL for the database connection
  • username: The username for the database connection
  • password: The password for the database connection
  • firstRelation: The first relation for the natural join
  • secondRelation: The second relation for the natural join

Prerequisites

To run this application, you need to have the following:

  • Java Development Kit (JDK) version 8 or higher
  • PostgreSQL server
  • PostgreSQL JDBC driver: The .jar file needs to be accessible when compiling your code. If it is not in the path and you are using the Eclipse IDE, you can add it to your project by going to “Project > Properties > Java Build Path > Add External JARs” and selecting the .jar file.
  • University database: Download and import the large dataset from the textbook site.

Usage

To use the application, compile and execute the main method of the Application class with the appropriate command-line arguments.

java estimator.Application <url> <username> <password> <firstRelation> <secondRelation>

Exceptions

The application may throw the following exceptions:

  • MissingArgumentException: When any of the required command-line arguments are missing.
  • SQLException: When an error occurs during the database connection or query execution.
  • IllegalArgumentException: When the given relation names do not exist in the database.

Author

This application was created by Evangeli Silva [email protected] as part of the ICSI 508 course at the University at Albany.

join-size-estimator's People

Contributors

evangelisilva 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.