Assignment+3+-+Karwa+Taxi

**Assignment #3: Data Modeling**
Due at 4:00pm on Thursday, November 3, 2011. Hand in hard-copy at Professor Monroe's office (CMU-Q 2121) no later than 4:00pm.

Sample solution:
This file contains one possible solution to the assignment. Please note that this is not the only possible solution, but it does effectively capture all of the required entity types, attributes, and relationships.

Grading key used for the assignment:

Overview:
Congratulations, your stakeholder and requirements analysis for Karwa's Taxi service were a success and the company's management team has decided to move forward with the smartphone app recommended to assist customers with ordering taxis, giving directions, and paying for their taxi ride with a credit card that they have previously registered with Karwa. This is the first step in a larger Business Process Improvement project for Karwa. As a reward for your good work in the analysis stage of the project, you have been asked to do some of the project's data modeling. Specifically, you need to create data models for the parts of the system described in the scenarios below.

As with the previous assignment, the description of the company, its processes, and the project requirements are not perfectly and completely defined. This is partly due to the fact that the use of a fictional scenario requires a bit of imagination, and partly to reflect the ambiguity present in many IS projects. When you come to a point where you are unsure exactly how the business process does or should work, or whether the system needs to support a requirement that seems to make sense but is not written down, you should use your experience, business judgement, and common sense to fill in the gaps in the scenarios and come up with reasonable data models. You may also ask for clarification on the Assignment 3 clarifications page, where I will post responses to questions for all students to see. It is ok to make assumptions as you are doing this exercise. If the assumptions are not obvious then it is probably a good idea to state them clearly in the documents you submit.

You may work on the assignment individually, or in teams of 2 or 3 people.

Background:
As we learned in Assignment #2, Karwa is a transportation company based in Doha, Qatar. The company provides many types of public transport, including buses and taxis. For this project we will be helping their taxi business connect more easily, quickly, and accurately with their customers. Karwa's value proposition is to provide efficient, timely, safe, and pleasant transportation to their customers at a reasonable price. This includes providing fast and accurate pickup and delivery service. Karwa taxis are very popular and at peak times there are often more requests for taxis than Karwa has taxis available. Karwa occasionally has a demand mismatch problem in which they have taxis available and empty in one part of town while there is large demand for the taxis elsewhere, but none available. This situation both reduces Karwa's revenue and leaves their customers dissatisfied.

Additional challenges that Karwa must deal with include:
 * Karwa's customers and drivers speak many different languages, which sometimes causes difficulty in communication,
 * Streets, landmarks, and neighborhoods throughout Doha are frequently under construction, closed, rerouted, etc.,
 * There is not a consistently used naming and numbering scheme for streets and locations in the city. Many landmarks, roads, and neighborhoods are known by different names to different people.

Karwa management believes that they can address all of these problems, as well as providing a better overall customer experience, by allowing their customers to book a taxi in advance using their smartphones (iPhone, Android, or Blackberry). Eventually, Karwa would also like to offer booking service through a web browser but for this project they are only focused on building smartphone applications that their customers and drivers can use. A website may follow in a later stage of the project. Smartphone booking will complement (be in addition to) the phone based taxi booking service that Karwa already offers. To deal with language issues, the mobile apps and website will need to support multiple appropriate languages. Initially, they will need to support English, Arabic, Tagalog, and Urdu. To simplify selecting a location for pickup or destination, customers will be able to either point to a location on a map, enter a street address (if known), or select from a list of well-known landmarks in Doha. Details of this system are provided in the next section.

Your group needs to produce an entity-relationship diagram that captures the data needs for the taxi ordering module. If you feel it would be helpful to do so, you may also provide an appendix with a written explanation of any important assumptions you made in completing your models and/or any additional description that helps to clarify your data model. This written appendix is optional but if you provide it, it will be graded as a part of the project.

System description
The system that you create will consist of a smartphone application that runs on iPhones, BlackBerrys, and Android phones. Because an Entity-Relationship model should be independent of the specific device on which it runs, you should be able to use a single ER model for all three types of smartphones. For the purposes of this project you may assume that another team at Karwa (but not in the 70-451 course) will create the software to integrate your smartphone application with Karwa's existing taxi tracking and dispatch system. That team will use the ER diagram you produce to guide their integration project and to identify the exact data that they will have available to integrate the two systems.

Karwa customers can download the smartphone application to an iPhone, a Blackberry, or an Android smartphone. The smartphone app will allow customers to perform the following functions:
 * Order a taxi for pickup at a specific location, date, and time.
 * When a customer orders a taxi they can also specify a specific destination location, or they can leave the destination undefined.
 * A customer can order a taxi up to two weeks in advance


 * The application should allow the customer to select 'order a taxi for my current location, for pickup as soon as possible'.
 * When the customer selects this option, the server will find the nearest available taxi and direct that taxi to pick the customer up.
 * After the customer selects this option, the Karwa server will send an estimated time until a taxi will arrive and ask the customer to confirm that they would like to book this trip.
 * If the customer confirms booking of the trip, this becomes a regular booking in the server system
 * If the customer declines the booking then the taxi is not dispatched and the booking is not added to the smartphone application or the server's database.


 * Receive a booking confirmation from Karwa, with a confirmation number. This booking confirmation will insure that the taxi will be at the requested place at the requested time. Once Karwa has issued a confirmed booking, they have committed to providing the customer with a taxi at the time and location requested.
 * If Karwa is unable to provide a taxi at the time and location requested, the Karwa server will decline the request and the smartphone application will alert the customer that the order can not be fulfilled as requested.
 * The confirmation number should be stored on the smartphone so that the customer does not need to remember the booking confirmation number but only needs to select from a list of upcoming taxi bookings to get details about the booking.


 * When ordering a taxi, the smartphone application will provide the following functionality:
 * The customer may select the pickup and delivery location in the following ways:
 * By requesting a pickup at the customer's current location (determined with GPS)
 * By selecting a location on a map
 * By entering a street address
 * By selecting a landmark from a list of landmarks in the current city
 * By searching for a landmark by that landmark's name


 * A customer may keep a record of their personal information on file with Karwa so that they do not need to re-enter the same information each time they use the system. This personal information can include:
 * Name
 * Mobile phone number(s) -- multiple numbers will be supported
 * Credit card information for payment -- multiple credit cards should be supported with the ability for a customer to indicate which is the preferred credit card
 * Favorite locations - stored by GPS coordinates, landmark name, and/or street address
 * Taxi trip history
 * Payment history


 * Payment. The customer should be able to pay for the taxi ride with cash or by credit card.
 * When paying by cash, payment will be provided to the taxi driver when the customer reaches their destination. There will be no payment record stored in the smartphone system for cash payments.
 * When paying by credit card, a customer may pay directly with credit card in the taxi and no record of that payment will be associated with the smartphone application account.
 * A customer may pay for a taxi ride through their smartphone by selecting a credit card stored on file that will be billed for the trip. If this option is selected, once the taxi has reached the destination, the driver will present the customer with the total fare and the customer can pay the fare using the smartphone application. There will be an option to add a tip for the driver if desired. If this payment method is selected, a record of the payment will be stored in the customer's Karwa record.
 * A customer may arrange to pay by credit card prior to the trip, in which case this step will be completed automatically
 * A customer may choose to pay with a stored credit card once he or she has reached their destination by confirming payment in the taxi through the smartphone application.

Deliverables:
You need to hand in your data models to Professor Monroe no later than 4:00pm on Thursday, November 3, 2011. You may produce the document with a computer or by drawing it by hand on paper. You are likely to find that it is quicker and easier to draw the diagrams by hand on A3 paper than with a computer. Regardless of how you decide to produce the document, please make sure that it is clear, clean, and legible. Documents that are illegible will be graded accordingly.

If you create an electronic document, please submit the document in PDF format, or another format that I will be able to read and grade electronically (such as MS Word) via Blackboard's dropbox. If you are unsure whether I will be able to read the format you would like to use, please ask and I will let you know. If you wish to hand in a hand-drawn paper copy, please submit it directly to me, in my office, or to my assistant, Maha Kanso, whose desk is outside of my office.

Your submitted document should contain the E-R Diagram for your system. The ER diagrams should contain all of the entities and attributes identified in the scenario descriptions, plus any additional entities and/or attributes that you feel need to be included in the model for Karwa to make proper use of the database that will be created based on this data model. All appropriate relationships between the entities should also be included in the diagram.

Grading Criteria:
There are 110 points possible on the assignment. I will use the following criteria when grading your submission:
 * Submitting your document on time and according to the submission and deliverables specification is worth 10 points.
 * The E-R Model is worth 100 points

Statement on Collaboration:
The document you submit may be done individually, or in teams of two or three people. You may not work in teams larger than three people - if you have a group of more than three people who would like to work together you will need to break the group into separate teams.

You are free to discuss the assignment, Karwa's needs, stakeholders, and general ideas about the case and assignment with your classmates on other teams. Each team will, however, need to create, write down, and submit their own data models. The document submitted needs to represent the work of the team submitting it - your team needs to synthesize the discussion and come to their own conclusions regarding what should be in the data model.

You should not discuss specific details about your data model with people on other teams, only general ideas. In general, if you find that after discussing the assignment with your classmates you produce very similar data models then you are probably discussing the assignment in too much detail. If you find that you are just copying the ideas from another group then you have probably stepped over the line that separates a constructive discussion about the assignment from cheating. You would be surprised how much variation there will be in the data models that different teams submit, and how much two data models that have been done together, even with minor variations, will stand out when looked at in the context of all of the assignments submitted.

The names of all team members should be on the single document that you submit. If your team has spent so much time discussing the case with another team that it is likely the instructor will be concerned about copying between the teams then you should list the names of the other people in the class with whom you have discussed the assignment as well. These people should be identified as participants in your discussions rather than team members. Those identified on an assignment only as participants will not be graded or get credit for that team's submission but they will also be much less likely to get in trouble for academic integrity problems if their participation is called out clearly in the submission.