Jump to content

Basic Databse Design 1


yrstruly

Recommended Posts

Does Anybody have a SQL code that does the following ones of or is it done in parts?1. DB Schema Design - Design a basic database to store the following information + A fleet of Vehicles - Include details such as mileage, vin numbers etc + A pool of drivers - Include relevant documentation, e.g. Drivesr license, ID Book + A group of routes - Marking out GPS coords for directions etc. is not necessary, just include a start & end address as well as any other info you believe to be pertinent + A drivers schedule, tying the above 3 tables together

Edited by yrstruly
Link to comment
Share on other sites

Does Anybody have a SQL code that does the following ones of or is it done in parts?

 

Are you saying you have a database assignment but you don't know anything about databases? How does that happen?

Link to comment
Share on other sites

I don't know if it is a repeating schedule or a mix of repeating and non-repeating routes.

 

Tables:Vehicles PK is VIN (int)Drivers PK is DID (int)Routes PK is RouteNo (int)For a mix of repeating and non-repeating...

 

Schedule table:SID int (PK)day-of-week char(3)repeats booleandate date departure timeRouteNo int (FK)DID int (FK)VIN int (FK)

 

For a strictly repeating schedule...

 

Schedule table:day-of-week char(3) (PK)RouteNo int (FK) (PK)

departure time (PK)DID int (FK)VIN int (FK)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...