Chocobunnies Database

The purpose of this project is to practice database concepts by designing and implementing a database using MySQL. The project was split into two phases. The first phase of the project focused on exploring the database design process, where my team and I had to brainstorm a concept to create Entity Relationship(ER) models, and relational schemas for. These ER models and relational schemas had to be clear, and easily be understood in order to be later translated to MySQL. After brainstorming the type of database we wanted to design, we had to implement the database using MySQL for phase 2.

For phase 1, my teammates and I envisioned a database for an imaginary online chocolate shop called, Chocobunnies. This online chocolate shop sells an assortment of chocolates that customers can choose from. This shop allows users to sign up as a seller or a customer. If a user is a seller, then they are given the permission to post chocolate products, each with a corresponding price and picture. If the user is a customer, then the customers are able to add products to their cart, edit the quantities of each product they want, make transactions, and leave reviews for each product. A glimpse of the database's ER diagram and relational schemas can be seen below.

For phase 2, we had to implement our database design using MySQL. We had to create the tables, an index, and a view. Additionally, we had to come up with select queries to showcase our database's functionality. Screenshots of the tables, queries, indexes, and view can be found below.

Tables

Index

View

Queries

Most expensive product from each seller

Finding users' ids and usernames, that sell more than two products

Users that sell products that cost $5

Finding the most expensive product on the site