Skip to content

tsundarren/3160-Database-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database-Project

Introduction

The team working on this project consists of Darrenmond Chao.

Description

The project is an extension of an existing data base that lacks rating system. Using mysql, the rating system will exist outside of said database but will allow users to rate both restaurants and delivery drivers.

Use Case for Rating System

Use Case

Business Rules

  • There are three account types in the database of which all account types will hold their id, name, email, and cellphone number.
  • Persons that are faculty must include their title, highest earned degree, and college degree.
  • Persons that are staff must include their position and admin status.
  • Persons that are students must include their graduating year, major plus type (undergraduate, graduate)
  • Locations that food can be delivered are specified via address where an food delivery drop-off point will be indicated.
  • Persons can also be drivers (delivery personnel) and all drivers are students.
  • Individual food deliveries are tied to only one person, and one restaurant.
  • Food delivery's track the total price, deilivery charge, driver, delivery time, and a unique id that ties the order to an order at a specific restaurant.
  • Food providers must be approved to exist in the database.
  • A rating system will allow users to view and rate both restaurants and specific delivery drivers.

EERD

EERD

Data Dictionary

Data Dictionary

Data Dictionary

MySQL Queries

Driver

Restaurant

Stored Procedure

Update Driver Ratings

Update Driver Ratings This stored procedure is frequently used to update the ratings of each individual food delivery driver to the average of their total ratings.


Update Restaurant Ratings

Update Restaurant Ratings This stored procedure is frequently used to update the ratings of each restaurant to the average of their total ratings.

Use Case Queries

Nested Query

Nested Query This nested query shows the data for food delivery drivers whose ratings are less than the average ratings of all drivers. This can be used by the administrators to show which drivers are slacking, or unfit for the job.


Sorted Query

Sorted Query This sorted query uses the WHERE and ORDER BY statements to conditionally show only restaurants whose ratings are higher than 5 and sort them ascendingly by their rating.

Query Optimization

Explain

MySQL dump

MySQL Dump

PPT Video

PPT Video

About

This repository hosts the data of a food delivery service database; "Campus Eats". Note that this repository hosts merely a project for the UNCC Database Design and Implementation course. Cut short, this database holds tables that allows users to view the information and more specifically, the ratings of delivery drivers and restaurants.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages