Skip to content

Java example showing a many-to-many sql database relationship

Notifications You must be signed in to change notification settings

danwulff/band-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Band Tracker

Daniel Wulff's Band Tracker, May 13th, 2016

By Daniel Wulff

Description

This is an example of java use, specifically SQL database use with many-to-many relationships. This is a website that gives a user an interface for a band tracker, to create bands and keep track of the venues they have played at. The website also allows bands to be deleted and updated as needed.

Setup/Installation Requirements

  • Be sure to place all provided files/folders as seen in the repository into a single directory
  • Make sure the version 2.12 or new of gradle is installed on your system (entering "gradle -v" into the command line should give you the version of the installed gradle system)
  • Use postgreSQL to create an sql database using the following commands:
    • Run posgres in a terminal: $ postgres
    • In another terminal open a postgreSQL front-end: $ psql
    • CREATE DATABASE band_tracker;
    • CREATE TABLE bands(id serial PRIMARY KEY, name varchar);
    • CREATE TABLE venues(id serial PRIMARY KEY, name varchar);
    • CREATE TABLE bands_venues(id serial PRIMARY KEY, band_id int, venue_id int);
    • (if running gradle tests) CREATE DATABASE band_tracker_test FROM TEMPLATE band_tracker;
  • To view the webpage, change the command line directory to be the root of the project folder.
  • type "gradle run" into the command line.
  • Open a browser and browse to http://localhost:4567/

Known Bugs

No known issues at this time.

Support and contact details

If you find any errors or have trouble viewing the website feel free to contact Daniel: [email protected]

Technologies Used

The website is written in java, by using spark as the web framework. Template files were created in html using bootstrap. Additionally unit testing was done using jUnit, and interface testing was done using FluentLenium. In this way, the website was tested thoroughly during development using behavior driven development patterns (with the help of Gradle to keep track of our dependencies).

License

Copyright (c) 2016 Daniel Wulff

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Java example showing a many-to-many sql database relationship

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages