Giter VIP home page Giter VIP logo

cs623-project's Introduction

CS623-Project Team 5

Add postgresql jdbc driver into the project once the project is cloned into the system folder. And add it to the buildpath.

Download the jdbc driver from the link here: https://jdbc.postgresql.org/download.html

Links to the Demo video

Link to demo video: https://drive.google.com/file/d/1WQg-atW7DAFzm4TzvSUY7K1wkUeKn5um/view?usp=sharing

Below is the link for ER Diagram.

https://drive.google.com/file/d/1JMGz05tpCs_kEYf09XUVv_Wl5TkQG87c/view?usp=sharing

Picture

Database Schema: 'cs623'

Tables: Product(#prod, pname, price), Depot(#dep, addr, volume), Stock(#prod, #dep, quantity)

Project Structure:

  • Transaction Class and Object classes Product, Depot and Stock
  • In the main method, set the transaction isolation level to Serializable
  • Methods:
    • defineTables - Creates Product, Depot, Stock tables in the database if not exists
    • getProductFromUser - To get product data from user
    • getStockDataFromUser - To get stock data from user
    • addProduct - Adds product to Product table
    • addStock - Adds stock to Stock table
    • doTransaction - This method actually does the transaction. Sets autocommit to false before starting transations, commits at the end after transaction is successful and sets the auto commit to true at the end. In case of failure, the control goes to catch block in try catch and executes rollback.
  • DB Variables:
    • DB_URL, USER for username, PASS for password.

Set the DB variables according to your own configuration.

Heads-up

If the product, depot and stock tables has no data in your database or if the logs shows empty or no data in the tables, Insert depot data manually into the database before performing the transaction. With out depot, your transaction fails because to insert stock data depot is mandatory.

cs623-project's People

Contributors

ravitejagrt avatar preethambonthula avatar

Watchers

James Cloos avatar  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.