Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have a database of a courier moving company. the mySql code for it is CREATE TABLE Customer ( customer _ id INT PRIMARY KEY,
I have a database of a courier moving company. the mySql code for it is
CREATE TABLE Customer
customerid INT PRIMARY KEY,
firstname VARCHAR
lastname VARCHAR
contact VARCHAR
address VARCHAR
email VARCHAR
;
CREATE TABLE Driver
driverid INT PRIMARY KEY,
firstname VARCHAR
lastname VARCHAR
contact VARCHAR
address VARCHAR
rating FLOAT
;
CREATE TABLE Job
jobid INT PRIMARY KEY,
customerid INT,
pickup VARCHAR
dropoff VARCHAR
vehiclepreference VARCHAR
FOREIGN KEY customerid REFERENCES Customercustomerid
;
CREATE TABLE Bidding
bidid INT PRIMARY KEY,
jobid INT,
driverid INT,
fare DECIMAL
status VARCHAR
FOREIGN KEY jobid REFERENCES Jobjobid
FOREIGN KEY driverid REFERENCES Driverdriverid
;
CREATE TABLE ActiveJob
jobid INT PRIMARY KEY,
FOREIGN KEY jobid REFERENCES Jobjobid
;
CREATE TABLE AssignedJob
jobid INT PRIMARY KEY,
driverid INT,
FOREIGN KEY jobid REFERENCES ActiveJobjobid
FOREIGN KEY driverid REFERENCES Driverdriverid
;
CREATE TABLE PastTrip
jobid INT PRIMARY KEY,
status VARCHAR
timeappointed DATETIME,
timecompleted DATETIME,
FOREIGN KEY jobid REFERENCES ActiveJobjobid
;
according to the code, what would be the ERD of the database and GRD of the database. please give graphical representation of ERD and GRD
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started