The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 364 Weeks Ago, 2 Days Ago |
| Questions Answered: | 1850 |
| Tutorials Posted: | 1850 |
Graduate in Biology and Nutrition, MBA Finance
Florida State University
Aug-2000 - Jul-2007
Ass. Relationship Manager
Penn-Florida
Mar-2009 - Feb-2016
Â
Write a script to create a new SQL Server database called BusDriver, which contains the three tables with columns and relationships as defined in the above figure. Save this script file as BusDriver.sql and upload it here for grading.
Your script must be able to be executed as a whole to have the database and all tables created at once with no errors. *It's important you include a GO and USE command after the database is created and before any table is created. See p.361 for example of the script that createa the AP database and its tables.
For the purpose of this assignment, all relationships must be implemented such that (1) when a primary key value is updated, its corresponding foreign key value is updated automatically, and (2) if a primary key value is referenced by a foreign key table, the row with this primary key value cannot be deleted, i.e., no action.
Column specifications are given below:
Driver table
DriverID: int
Name: varchar(60), not null
Age: int and must between 25 and 60, not null
BusNo: char(3), null
Bus table
BusNo: char(3)
Mileage: int, must be positive, null
Model: char(2), null
BusModel table
ModelCode: char(2)
ModelName: varchar(15), null
TotalSeats: int, null, must be at least 20 but no more than 50
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I