1. Introduction (Team, Project Description)
The goal of this project is to produce a datamodel that with allow campus personel to effectively order food from outside source and maintain a record of the best restaurants that are contacted.
2. Use Case for Rating System
The person on campus must be able to place an order.
A person can place many orders.
A single order can relate only to one person.
A single order can only relate to one driver.
A single order can only relate to one restaurant.
The person (who placed the order) must be able to complete a rating for bothe the driver and the restaurant.
The ratings for driver and restaurant are independent.
<title>Schema Report for database: campus_eats_fall2020</title>
<style>
td,th {
text-align:left;
vertical-align:middle;
}
table {
border-collapse: collapse;
border: 1px solid;
}
caption, th, td {
padding: .2em .8em;
border: 1px solid #000000;
}
caption {
background: #D3D3D3;
font-weight: bold;
font-size: 1.1em;
}
th {
font-weight: bold;
background: #000000;
color: white;
}
td {
background: #FFFFFF;
}
</style>
Schema Report for database: campus_eats_fall2020
Table List
Table: delivery
Table Comments
Columns
Name
Data Type
Nullable
PK
FK
Default
Comment
delivery_id INT Yes Yes No
driver_id INT Yes No Yes
vehicle_id INT Yes No Yes
delivery_time DATETIME No No No NULL
Table List
Table: driver
Table Comments
Columns
Name
Data Type
Nullable
PK
FK
Default
Comment
driver_id INT Yes Yes No
student_id INT Yes No Yes
license_number VARCHAR(75) No No No NULL
date_hired DATE No No No NULL
rating FLOAT No No No NULL
Table List
Table: faculty
Table Comments
Columns
Name
Data Type
Nullable
PK
FK
Default
Comment
faculty_id INT Yes Yes No
person_id INT Yes No Yes
title VARCHAR(75) No No No NULL
degree_college VARCHAR(75) No No No NULL
highest_degree VARCHAR(75) No No No NULL
Table List
Table: location
Table Comments
Columns
Name
Data Type
Nullable
PK
FK
Default
Comment
location_id INT Yes Yes No
location_name VARCHAR(75) No No No NULL
location_address VARCHAR(75) No No No NULL
latitude VARCHAR(75) No No No NULL
longitude VARCHAR(75) No No No NULL
drop_off_point VARCHAR(75) No No No NULL
Table List
Table: order
Table Comments
Columns
Name
Data Type
Nullable
PK
FK
Default
Comment
order_id INT Yes Yes No
person_id INT Yes No Yes
delivery_id INT Yes No Yes
location_id INT Yes No Yes
driver_id INT Yes No Yes
restaurant_id INT Yes No Yes
total_price FLOAT Yes No No
delivery_charge FLOAT No No No NULL
Table List
Table: person
Table Comments
Columns
Name
Data Type
Nullable
PK
FK
Default
Comment
person_id INT Yes Yes No
person_name VARCHAR(300) No No No NULL
person_email VARCHAR(150) No No No NULL
cell BIGINT No No No NULL
Table List
Table: restaurant
Table Comments
Columns
Name
Data Type
Nullable
PK
FK
Default
Comment
restaurant_id INT Yes Yes No
location VARCHAR(75) No No No NULL
restaurant_name VARCHAR(75) No No No NULL
schedule VARCHAR(75) No No No NULL
website VARCHAR(75) No No No NULL
Table List
Table: staff
Table Comments
Columns
Name
Data Type
Nullable
PK
FK
Default
Comment
staff_id INT Yes Yes No
person_id INT No No Yes NULL
position VARCHAR(75) No No No NULL
is_admin VARCHAR(1) No No No 'N'
Table List
Table: student
Table Comments
Columns
Name
Data Type
Nullable
PK
FK
Default
Comment
student_id INT Yes Yes No
person_id INT Yes No Yes
graduation_year INT No No No NULL
major VARCHAR(75) No No No NULL
type VARCHAR(75) No No No NULL
Table List
Table: vehicle
Table Comments
Columns
Name
Data Type
Nullable
PK
FK
Default
Comment
vehicle_id INT Yes Yes No
vehicle_plate VARCHAR(75) No No No NULL
model VARCHAR(75) No No No NULL
make VARCHAR(75) No No No NULL
Table List
7. Web/App Implementation (Optional) or Description of Future Work