Question

You are in charge of keeping track of Rutgers bus system. You operate a number of different kind of bus, for example, “LX” or “REXL.” For each kind of bus, you want to keep track of the operating hours and days of operations (weekday or weekend). For example, “A” bus operates from 7:00 AM until 9:30 PM during the weekdays and “H” bus operates from 6:00 AM until 2:30 AM during the weekdays. For each bus, you want to store bus ID, date acquired, current mileage, and maximum mileage. Once current mileage reaches the maximum mileage, the bus must be retired. Each kind of bus uses multiple buses, but, for simplicity, assume one bus can be used in exactly one kind of bus. If a bus B12255039 is “LX” bus, then the bus will be “LX” until it reaches the maximum mileage.

Also, you have access to a table of stations. For each station, you want to store station ID, name, and the description of location.

The event of a bus leaving a station by a driver is called a dispatch. Every time a bus dispatches, you want to record which bus was dispatched, who was the driver, the date/time and the station the dispatch started, the date/time the dispatch ended. Each driver has a unique employee ID, along with a first name, last name, middle name, date of birth, cell phone number, and date of last safety training.

In addition, you want to keep track of which kind of bus covers which stations. The following database is the result of the problem description above.BUS DateAcquired Current Mile MadMille Route ROUTE DISPATCH DRIVER Y RouteID Operating Hours Operating Days Dispatchi BeginsDE BUS X Field Name BusID Date Acquired Current Mile MaxMile Routeld Data Type Short Text Date/Time Number Number Short TextDate/Time information is stored in MM/DD/YYYY format. The columns of output in the results of each queries should be in the s

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.

Select FirstName, LastName, CellPhone from Driver;

2.

Select FirstName, LastName , BirthDate from Driver inner join Dispatch on Driver.EmpID = Dispatch.EmpID where Year(BirthDate) = 1960 and FirstName = 'Peter' or FirstName = 'Mary';

3.

Select BusID, CurrentMile from Bus where Year(DateAcquired) = 2014 order by DateAcquired, CurrentMile;

4.

Select Route.RouteID, StationName from Route, Covers, Station where Route.RouteID = Covers.RouteID and Covers.StationID = Station.StationID where Route.RouteID = 'LX';

5.

Select Route.RouteID, Count(Station.StationID) from Route, Covers, Station where Route.RouteID = Covers.RouteID and Covers.StationID = Station.StationID group by Route.RouteID ;

6.

Select Count((MaxMile - CurrentMile)) *100000 as TotalCostFor New Buses  from Bus where (MaxMile - CurrentMile) < 10000;

7.

Select Route.RouteID, Count(Driver.EmpID) as NumDriver from Route, Bus,Dispatch,Driver where Route.RouteID = Bus.RouteID and Bus.BusID = Dispatch.BusID and Driver.EmpID = Dispatch.EmpID and Route.RouteID = 'LX' and Month(Begins) = 2 and Year(Begins) = 2020 order by NumDriver desc;

8.

Select FirstName, LastName , Count(Dispatch.DispatchID) as NumOfDispatches from Driver inner join Dispatch on Driver.EmpID = Dispatch.EmpID where Begins = 'January, 21, 2020' and Ends = 'March ,13 ,2020' order by NumOfDispatches desc, LastName;

Do ask if any doubt. Please up-vote.

Add a comment
Know the answer?
Add Answer to:
You are in charge of keeping track of Rutgers bus system. You operate a number of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • draw a conceptual model for the following information. The system needs to record details of all...

    draw a conceptual model for the following information. The system needs to record details of all registered vehicles driven in the local government area. A vehicle is identified by a Vehicle Identification Number (VIN). Background reading on a VIN is available from several sites such as ​AutoCheck​. The government wishes to record the type of vehicle, such as motorbike, car, truck etc, the year the vehicle was manufactured and the model such as CX3, as vehicle attributes. Vehicles are produced...

  • Create ER model to a taxi company

    The company is composed of many offices: Each office has:o A name, a city and a telephone number.o Each office has a Manager, several taxi owners, drivers and one administrative staff. The Manager is responsible for the day-to-day running of the office:1. Check the number of Jobs2. Check the number of complete jobs3. Check the number of failed jobs and the reason.Each manager has a name, ID, Office number, address, age(Less than 64) and telephone number (can have more than...

  • You were requested to design a database to store the data concerning a large mechanic shop....

    You were requested to design a database to store the data concerning a large mechanic shop. Your database has to store the following: For each car, you want to store the make, model, year, color, engine info, license plate, VIN (vehicle identification number), and a field for general notes. Additionally, for each car, you need to keep information about the owner. For each owner, you need to store the client ID, the name, address information, phone number, and email. An...

  • Project Description In this project, you will design and implement a database for keeping track of...

    Project Description In this project, you will design and implement a database for keeping track of information for an online “SOCIAL NETWORK” system (e.g. a simplified version of Facebook!). You will first design an EER schema diagram for this database application. Then, you will map the EER schema into a relational database schema and implement it on ORACLE or MySQL or some other relational DBMS. Finally, you will load some data into your database (via user Interface) and create some...

  • Final Project: Part I For Part I of your final project, you will design your plan for the scenari...

    Final Project: Part I For Part I of your final project, you will design your plan for the scenario provided below. Your project plan should include the entity relationship diagram (ERD). Scenario Imagine that you just started a new job at ABC Car Sales. You’ve been given the task of adding all the new and used car inventory to a new database management system (DBMS). You would like to manage the new and used car sales in the new DBMS....

  • Create ER model A private taxi company called FastCabs was established in Glasgow in 1992. Since...

    Create ER model A private taxi company called FastCabs was established in Glasgow in 1992. Since then, the company has grown steadily and now has offices in most of the main cities of Scotland. However, the company is now so large that more and more administrative staff are being employed to cope with the ever-increasing amount of paperwork. Furthermore, the communication and sharing of information within the company is poor. The Director of the company, Paddy MacKay feels that too...

  • java Object Oriented Programming The assignment can be done individually or in teams of two. Submit one as...

    java Object Oriented Programming The assignment can be done individually or in teams of two. Submit one assignment per team of two via Omnivox and NOT MIO.Assignments sent via MIO will be deducted marks. Assignments must be done alone or in groups and collaboration between individuals or groups is strictly forbidden. There will be a in class demo on June 1 make sure you are prepared, a doodle will be created to pick your timeslot. If you submit late, there...

  • You will be developing an Advising Scheduling Management System (ASMS) that can be used managing the advising appointments for Salisbury University professors and their advisees (students). ASMS shoul...

    You will be developing an Advising Scheduling Management System (ASMS) that can be used managing the advising appointments for Salisbury University professors and their advisees (students). ASMS should have the following functionalities: - There are three kinds of users: professor, student and admin. When ASMS starts, a login screen asks user which kinds of users and then asks user id and password. If id or password are incorrect, issue a warning and redisplay the login screen. - When an admin...

  • Subject: Java Program You are writing a simple library checkout system to be used by a...

    Subject: Java Program You are writing a simple library checkout system to be used by a librarian. You will need the following classes: Patron - A patron has a first and last name, can borrow a book, return a book, and keeps track of the books they currently have checked out (an array or ArrayList of books). The first and last names can be updated and retrieved. However, a patron can only have up to 3 books checked out at...

  • This is about database system. Thank you. Question B1 Create a Crow's Foot ERD with the...

    This is about database system. Thank you. Question B1 Create a Crow's Foot ERD with the business rules described below. Write all appropriate connectivities and cardinalities in the ERD. A music store would like to develop a database to manage information about the CDs, or vinyl collection, the customers and transactions information. It stores the relationships between artists, albums, tracks, customers and transactions. Here is the list of requirements for the database: The collection consists of albums. An album is...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT