Java Advanced Database Code Review
Author name - Yvonne Peng
Program name - Shoe Stores
Epicodus Java 2015 Summer Class week 4 CodeReview
Write a program to list out local shoe stores and the brands of shoes they carry.
Make a Store class and a Brand class.
- In PSQL:
- CREATE DATABASE shoes;
- CREATE TABLE stores (id serial PRIMARY KEY, name varchar);
- CREATE TABLE brands (id serial PRIMARY KEY, name varchar);
- CREATE TABLE brands_stores (id serial PRIMARY KEY, brand_id int, store_id int);
- CREATE DATABASE shoes_test WITH TEMPLATE shoes;
![alt tag](https://raw.githubusercontent.com/YHoP/shoe-stores/master/src/main/resources/public/img/sql-table-design.png)
- Download this repository files to your computer.
- Navigate to the folder directory.
- Open command prompt in Windows or terminal in Mac.
- If you don't have PostgreSQL installed in your computer, check out this link and follow the instruction.
- Create a database: "shoes" in your computer.
- Run the following command "psql shoes < shoes.sql"
- Run the following command "Gradle run". (If you have not installed Gradle, check out the Gradle website )
- Open your internet browser and navigate to http://localhost:4567/
- The webpage would load automatically. You can manage your own local shoes store!!
Copyright: YHoP
License information: Open source licensing