1. Homepage
  2. Programming
  3. FIT9132 Introduction Databases - Assignment 2 - Creating, Populating and Manipulating Databases - Paris Arrow Transit (PAT)

FIT9132 Introduction Databases - Assignment 2 - Creating, Populating and Manipulating Databases - Paris Arrow Transit (PAT)

Engage in a Conversation
MonashFIT9132Introduction DatabasesParis Arrow TransitSQLMongoDBNOSQLJavascript

FIT9132 Introduction Databases - Assignment 2 CourseNana.COM

Creating, Populating and Manipulating Databases - Paris Arrow Transit (PAT) CourseNana.COM

INSTRUCTIONS CourseNana.COM

Your task for this assignment is to design a model for Paris Arrow Transit (PAT). Paris Arrow Transit is a private company subcontracted by the Olympic Federation to transport officials during the Olympic competition. The company realises that it needs a completely new computerised system to more efficiently manage and record its services during the Games. You have been asked to develop a database system that can meet PAT's needs, which are detailed below. CourseNana.COM

PAT owns a fleet of vehicles. Each vehicle is identified by its 17-character vehicle identification number (VIN), the company also records the registration plate (7 characters such as AB126FD), the make, such as Peugeot, the current odometer reading and the number of passengers which the vehicle can transport. CourseNana.COM

206 National Olympic Committee's (NOC) will compete at the Paris Games - each represents a particular country or region of the world. For each country/region, an identifying IOC code is recorded as well as the name of the country/region and its number of athletes. Each NOC will enter a team into the competition. The PAT system must track all officials who are part of these teams since they are the ones who will need to book official vehicles. One member of each NOC team is designated as the Chef De Mission (the team manager). PAT will record the official's Olympic ID and name for each official. The system records the manager (Chef De Mission) for each official. The Chef De Missions is listed as an official but has no manager since they are the team manager. CourseNana.COM

An official will book a trip with PAT to transport members of their team between various locations. A trip only involves a single vehicle. An official may use PAT's services multiple times (even during a single day); the only limiting factor is whether a suitable vehicle and driver is available at the date and time they wish to book travel. The vehicle is booked in the name of the official making the booking; the details of the actual passengers do not need to be recorded. The official booking the trip will also indicate the preferred language to be spoken during the trip, so that the travellers can be understood by the driver and vice versa. Only a single preferred language for the trip will be indicated/recorded. The intended pick-up date and time and the projected drop-off date and time are recorded for each booked trip. In addition, PAT records the number of passengers needing transport for each booked trip. CourseNana.COM

PAT vehicles are driven by the company's drivers. Each driver is assigned a unique driver ID. The driver's name (given and family), licence number (12 characters in length), date of birth and the level of security clearance granted to the driver are recorded. Due to issues/problems that may arise, a driver may need to be suspended while a particular matter is investigated; while suspended a driver cannot drive any PAT vehicle - the system must be able to flag this. Driver security clearances are set at either F to represent Full or R to represent Restricted; the default should be R. Only a single driver drives for a particular booked trip. CourseNana.COM

PAT records the languages that a driver speaks – some drivers speak several languages. To record languages, PAT will use ISO639-1 two-character language codes, for example, EN as English and ZH as Chinese – PAT records the ISO639-1 code and the name of the language. CourseNana.COM

Based on these requirements, a data model has been created for PAT: CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Page 3 of 19 CourseNana.COM

The schema/insert file for creating this model (pat_initialSchemaInsert.sql) is available in the archive ass2_student.zip. This file partially creates the Pets First tables and populates several of them (those shown in purple on the supplied model). Please read this schema carefully and be sure you understand the various data requirements. CourseNana.COM

IMPORTANT points for you to observe when completing this assignment are: CourseNana.COM

  1. The ass2-student.zip archive also contains seven script files to code your answers in. You MUST ensure these files are regularly pushed to the GitLab server so that a clear development history is available for the marker to verify your work (a minimum of fourteen pushes are required - 2 pushes per file). In each file, you must fill in the header details with your name and student ID before beginning work. Your SQL script files must not include any SPOOL or ECHO commands. Although you might include such commands when testing your work, they must be removed before submission (a -10 mark grade penalty will be applied if your documents contain spool or echo commands). CourseNana.COM

  2. You are free to make assumptions if needed. However, your assumptions must align with the details here and in the Ed Assignment 2 forum and must be clearly documented (see the required submission files). CourseNana.COM

  3. Views must not be used to arrive at any solutions for the tasks you must complete as part of this assessment. CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Page 4 of 19 CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

  1. When handling dates with SQL, the default date format must not be assumed; you must use the TO_DATE and TO_CHAR functions where appropriate. CourseNana.COM

  2. ANSI joins must be used where the joining of tables is required. CourseNana.COM

  3. In completing the following tasks, you must design your test data so that you always get output for the queries specified below - this may require you to add further data as you move through completing the required tasks. Such extra data MUST be added as part of Task 2 (i.e. as part of your test data load). Queries that are correct but do not produce any output (“no rows selected” message) using your test data will lose 50% of the marks allocated. So, you should carefully check your test data and ensure it thoroughly validates your SQL queries. CourseNana.COM

Steps for working on Assignment 2 CourseNana.COM

  1. Download the Assignment 2 Required Files zip archive (ass2-student.zip) from Moodle. CourseNana.COM

  2. Extract the zip archive and place the contained files in your local repository in the folder: /Assignments/Ass2 CourseNana.COM

    Do not add the zip archive to your local repo. CourseNana.COM

  3. Examine the extracted files, i.e. read carefully through them and ensure you understand their content. CourseNana.COM

  4. In each supplied script, fill in the header details with your name and student ID. Then, add, commit and push them to the FITGitLab server. CourseNana.COM

  5. Run pat_initialSchemaInsert.sql from the supplied zip archive to set up the initial state of the database. CourseNana.COM

  6. Write your answer for each task in its respective file (e.g. write your answer for task 1 in T1-pat-schema.sql and so on). CourseNana.COM

  7. Save, add, commit and push the file/s regularly while working on the assignment. CourseNana.COM

  8. Finally, when you have completed all tasks, separately run each SQL or MongoDB as a script (not as individual statements) and ensure there are no errors. Upload all required files from your local repository to Moodle. Check that the files you have uploaded are the correct files (download them from Moodle into a temporary folder and check they are correct). After you are sure they are correct, submit your assignment. CourseNana.COM

************************************************************************************************************ For all assignment tasks, your final script must run as a script without errors except for SQL errors generated by the DROP TABLE/DROP SEQUENCE statements. Any task's script that runs with an error will receive a maximum grade of half of the task's available marks -1. For example, if your task 1 script runs with an error, regardless of the code contained, your maximum grade will be 15/2 => 7.5 - 1 = 6.5 marks. This will be applied even if the error is simply a forgotten semicolon. Thus, please carefully check that your final scripts for all tasks run without error. CourseNana.COM

Page 5 of 19 CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

In arriving at your solutions for Assignment 2 you are ONLY permitted to use the SQL/NoSQL structures and syntax which have been covered within this unit: CourseNana.COM

  • ●  Topic 6 Workshop and Applied 7 - Creating & Populating the Database CourseNana.COM

  • ●  Topic 7 Workshop and Applied 8 - Insert, Update, Delete (DML) and Transaction Management CourseNana.COM

  • ●  Topic 8 Workshop and Applied 9 - SQL Part I - Basic CourseNana.COM

  • ●  Topic 9 Workshop and Applied 10 - SQL Part II- Intermediate CourseNana.COM

  • ●  Topic 10 Workshop and Applied 11 - SQL Part III - Advanced CourseNana.COM

  • ●  Topic 11 Workshop and Applied 12 - Non-Relational Database CourseNana.COM

    GIT STORAGE
    CourseNana.COM

    Your work for these tasks MUST be saved in your individual local working directory (repo) in the Assignment 2 folder and regularly pushed to the FIT GitLab server to build a clear history of the development of your approach. A minimum of fourteen pushes to the FIT GitLab server is required (2 pushes per solution script). Please note that fourteen pushes are a minimum; we expect significantly more in practice. All commits must include a meaningful commit message that clearly describes what the particular commit is about and must be correctly assigned to your valid GitLab author. CourseNana.COM

    You must regularly check that your pushes have been successful by logging in to the FIT GitLab server's web interface; you must not simply assume they are working. Before submission via Moodle, you must log in to the GitLab server's web interface and ensure your submission files are present and their names are unchanged. CourseNana.COM

    ************************************************************************************************************
    

Page 6 of 19 CourseNana.COM

Assignment Tasks CourseNana.COM

TASK 1: DDL [15 mks] CourseNana.COM

ENSURE your ID and name are shown at the top of any file you submit. CourseNana.COM

For this task, you must add to T1-pat-schema.sql the CREATE TABLE and CONSTRAINT definitions, which are missing from the supplied partial schema script, in the positions indicated by the script's comments. The table below details the attributes' meaning in the missing three tables. You MUST use exactly the same relation and attribute names shown in the data model above to name the tables and attributes you add. The attributes must be in the same order as shown in the model. These new DDL commands must be hand-coded, not generated in any manner (generated code will not be marked). CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Table name CourseNana.COM

Attribute name CourseNana.COM

Meaning CourseNana.COM

OFFICIAL CourseNana.COM

Identifier for an official CourseNana.COM

off_given CourseNana.COM

Given name for the official CourseNana.COM

off_family CourseNana.COM

Family name for the official CourseNana.COM

cr_ioc_code CourseNana.COM

IOC country code for the official CourseNana.COM

off_cdm CourseNana.COM

Identifier for Chef De Mission for the official CourseNana.COM

VEHICLE CourseNana.COM

veh_vin CourseNana.COM

Identifier for vehicle CourseNana.COM

veh_rego CourseNana.COM

Registration plate of vehicle CourseNana.COM

veh_year CourseNana.COM

Year of manufacture of vehicle CourseNana.COM

veh_curr_odo CourseNana.COM

Current odometer reading of vehicle CourseNana.COM

veh_nopassenngers CourseNana.COM

Number of passengers vehicle can seat CourseNana.COM

vm_model_id CourseNana.COM

Identifier for vehicle_model CourseNana.COM

trip_id CourseNana.COM

Identifier for a trip CourseNana.COM

trip_nopassengers CourseNana.COM

Number of passengers for the trip CourseNana.COM

trip_int_pickupdt CourseNana.COM

Intended pickup date and time for the trip CourseNana.COM

trip_act_pickupdt CourseNana.COM

Actual pickup date and time for the trip CourseNana.COM

trip_int_dropoffdt CourseNana.COM

Intended drop-off date and time for the trip CourseNana.COM

trip_act_dropoffdt CourseNana.COM

Actual drop-off date and time for the trip CourseNana.COM

veh_vin CourseNana.COM

Identifier for a vehicle CourseNana.COM

driver_id CourseNana.COM

Identifier for a driver CourseNana.COM

pickup_locn_id CourseNana.COM

Identifier for the pick-up location CourseNana.COM

dropoff_locn_id CourseNana.COM

Identifier for the drop-off location CourseNana.COM

lang_iso_code CourseNana.COM

ISO639-1 two-character language codes CourseNana.COM

Identifier for an official CourseNana.COM

Page 7 of 19 CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

To test your code, you must first run the provided script pat_initialSchemaInsert.sql to create the other required tables. pat_initialSchemaInsert.sql contains the drop commands for all tables in this model at the head of the file. If you have problems with task 1 simply rerun pat_initialSchemaInsert.sql, which will cause all tables to be dropped and correct the issues in your script. DO NOT add drop table statements to T1-pat-schema.sql CourseNana.COM

TASK 2: INSERT [20 mks] CourseNana.COM

Before proceeding with Task 2, you must ensure you have run the file pat_initialSchemaInsert.sql (which must not be edited in any way) followed by the extra definitions that you added in Task 1 above (T1-pat-schema.sql). CourseNana.COM

Load the VEHICLE, OFFICIAL and TRIP tables with your own test data using the supplied T2-pat-insert.sql script file. Write SQL commands that will insert as a minimum (i.e. you may and should insert more) the following sample data: CourseNana.COM

(i) 10 VEHICLE entries
● Include at least three vehicle models
CourseNana.COM

(ii) 10 OFFICIAL entries
● Include at least four IOC Countries/Regions
CourseNana.COM

(iii) 20 TRIP entries CourseNana.COM

  • ●  Include at least five vehicles used in more than one trip CourseNana.COM

  • ●  Include at least five officials booked more than one trip CourseNana.COM

  • ●  Include at least five drivers CourseNana.COM

  • ●  Include at least five languages CourseNana.COM

  • ●  Include at least two parallel trips (i.e. trips that have the same intended CourseNana.COM

    pick-up/drop-off date times and the same pickup/drop-off locations) CourseNana.COM

    In adding this data, you must ensure that the test data thoroughly tests the model as supplied to ensure your schema is correct (you are not required to submit or code fail tests; all insert statements must execute correctly). CourseNana.COM

    Your inserted data must conform to the following rules: CourseNana.COM

  1. Treat all the data you add as a single transaction since you are setting up the initial test state CourseNana.COM

    for the database. CourseNana.COM

  2. The primary key values for this data should be hardcoded values (i.e. NOT make use of CourseNana.COM

    sequences). If the primary key attribute’s datatype is number, it must consist of values below CourseNana.COM

    100. CourseNana.COM

  3. Trip dates used must be chosen between the 20th July 2024 and 15th August 2024. CourseNana.COM

  4. The data added must be sensible (e.g., the drop-off date should be after the pick-up date, the CourseNana.COM

    vehicle must accommodate the requested number of passengers, etc.). CourseNana.COM

For this task ONLY, Task 2, you may manually look up and include values for the loaded tables/data directly where required. However, you can still use SQL to get any non-key values if you wish. In carrying out Task 2, you must not modify any data or add any further data to the tables populated by the pat_initialSchemaInsert.sql script. Design your test data to get output for the SQL scripts/queries specified below - this may require you to add further data as you complete the required tasks. CourseNana.COM

Page 8 of 19 CourseNana.COM

TASK 3: DML [20 mks] CourseNana.COM

Your answers for this task must be placed in the SQL file T3-pat-dml.sql For this and all subsequent Tasks, you are NOT permitted to: CourseNana.COM

  • ●  manuallylookupavalueinthedatabase,obtainitsprimarykey,ormanuallyobtainthe highest/lowest value in a column, CourseNana.COM

  • ●  manuallycalculatevaluesexternaltothedatabase,e.g.onacalculatorandthenusesuch values in your answers. Any necessary calculations must be carried out as part of your SQL code or CourseNana.COM

  • ●  assumeanyparticularcontentsinthedatabase-rowsinatablearepotentiallyinaconstant state of change CourseNana.COM

    Your answers must recognise that you are dealing with only a very small sample snapshot of a multiuser database; as such, you must operate on the basis that there will be more data in all of the database tables than you currently have access to. Thus, data will be in a constant state of change. Your answers must work regardless of the extra quantity of this extra "real" data and the fact that multiple users will operate in the tables simultaneously. You must consider this aspect when writing SQL statements. CourseNana.COM

    For any following SQL tasks, your SQL must correctly manage transactions and use sequences to generate new primary keys for numeric primary key values (a new primary key value cannot be hardcoded as a number or value). CourseNana.COM

    You must ONLY use the data provided in the questions' text.
    For Task 3, you must complete the following sub-tasks in the same order they are listed. Where you have been supplied with a string in italics, such as
    La Beaujoire Stadium, you may search in the database using the string as listed. Where a particular case for a word is provided, you must only use that case (same spacing, case, etc) in your SQL code. When a name is supplied, you may break the name into first name and last name. For example, James SMITH can be split into James and SMITH; again, note that the case must be maintained as it was supplied. Failure to adhere to these requirements, such as changing the case of a provided string, will result in a grade penalty. CourseNana.COM

(a) Oracle sequences will be implemented in the database to insert records for the OFFICIAL and TRIP tables. CourseNana.COM

Provide the CREATE SEQUENCE statements to create sequences that could be used to provide primary key values for the OFFICIAL and TRIP tables. These sequences must start at 100 and increment by 10. Immediately before the create sequence commands, place appropriate DROP SEQUENCE commands so that the sequences will be dropped before being created if they exist. Please note that these are the ONLY sequences that can be introduced and used in Task 3. CourseNana.COM

[1 mark] CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Page 9 of 19 CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Questions 3b, 3c, and 3d are related questions. You can use the information below in any part of Task 3. CourseNana.COM

  1. (b)  An official and a vehicle needed to be stored in the database. CourseNana.COM

    The official’s name is Franklin Gateau from St Vincent and the Grenadines. Franklin is the only official from this country and the Chef De Mission for this country. CourseNana.COM

    The vehicle is an ALPHARD manufactured by TOYOTA. You may assume that TOYOTA only produced one model called ALPHARD. The vehicle identification number (VIN) is 1C4SDHCT9FC614231, which seats up to 6 passengers. CourseNana.COM

    Take the necessary steps in the database to record the required entries for this vehicle and official. When inserting this data, you may make up (invent) any other required information. CourseNana.COM

    [5 marks] CourseNana.COM

  2. (c)  Franklin booked two trips.
    The first trip was booked for 30 July 2024 at 12:30 PM from Olympic and Paralympic Village to CourseNana.COM

    Porte de la Chapelle Arena, and it was scheduled to arrive 1 hour and 30 minutes later.
    The second trip was booked for 30 July 2024 at 8:00 PM from
    Porte de la Chapelle Arena to CourseNana.COM

    Olympic and Paralympic Village, and it was scheduled to arrive 1 hour and 15 minutes later. CourseNana.COM

    For both trips, the vehicle assigned was the Toyota Alphard with VIN 1C4SDHCT9FC614231; the allocated driver was Claire Robert (licence number: 55052a543210), and the preferred language was English. CourseNana.COM

    Take the necessary steps in the database to record the required trip entries. Both trip bookings must be treated as a single transaction. When inserting this data, you may make up (invent) any other required information. CourseNana.COM

    [8 marks] CourseNana.COM

  3. (d)  As scheduled, on 30 July 2024 at 12:30 PM, Claire Robert picked up the St Vincent and the Grenadines team from the Olympic and Paralympic Village and dropped them at the Porte de la Chapelle Arena. The actual trip took 1 hour and 45 minutes. CourseNana.COM

    Then, at 5 PM on the same day, Claire got into an accident. Due to the short notice and the unavailability of other drivers, all booked (incomplete) trips allocated to Claire for the rest of the day must be cancelled (i.e. removed from the system). PAT informed the officials who booked the trips and reimbursed them with taxi vouchers. CourseNana.COM

Make these required changes to the data in the database. CourseNana.COM

[6 marks] CourseNana.COM

Page 10 of 19 CourseNana.COM

TASK 4: DATABASE MODIFICATIONS (13 marks): CourseNana.COM

Your answers for these tasks (Task 4) must be placed in the supplied SQL script T4-pat-mods.sql CourseNana.COM

The required changes must be made to the "live" database (the database after you have completed tasks 1, 2 and 3, in which other users must be assumed to be active). You MUST not edit and execute your schema file again. Before completing the work below, please ensure you have completed tasks 1, 2 and 3 above. If, in answering these questions, you need to create a table, please place a drop table statement immediately before your create table statement. CourseNana.COM

(a) PAT would like to store each official’s role. The list of roles, which includes General, Administrator, Head Coach, Coach, and Physician, will remain unchanged. The default role is General. The Chef de Mission of each country must be assigned an Administrator role. CourseNana.COM

As part of your solution, provide appropriate select and desc statements to show the changes you have made. Select to show any data changes that have occurred, and desc tablename, e.g., desc customer, to show any table structural changes. CourseNana.COM

[5 marks] CourseNana.COM

(b) PAT would like to allow complaints about the driver's behaviour on a particular trip. The official who requested the trip will submit these complaints. Multiple complaints may be lodged for a particular trip. An official cannot make two complaints for a particular trip at the same time. CourseNana.COM

PAT provides some categories for the complaints. The current categories are late arrival, rude behaviour, poor driving, and failing to assist. Each category has a specific demerit point: a late arrival or failure to assist incurs one demerit point, and rude behaviour or poor driving incurs two demerit points. PAT wants to add more categories in the future. CourseNana.COM

The system stores each complaint’s date, time, category, and detailed comment. It also stores the trip for which the complaint was made. CourseNana.COM

The PAT staff member follows up on the complaint and investigates whether it is valid. If it is, it will be flagged in the system as a valid complaint. CourseNana.COM

Change the database structure to support these new business rules. You are not required to add the complaint data (you must add the category data as listed in this task). You only need to provide the structure so PAT can store complaints. CourseNana.COM

As part of your solution provide appropriate select and desc statements to show the changes you have made. Select to show any data changes that have occurred and desc tablename e.g. desc customer to show any table structural changes. CourseNana.COM

[8 marks] CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Page 11 of 19 CourseNana.COM

TASK 5: SQL Queries [15 mks] CourseNana.COM

Your answers for this task (Task 5) must be placed in the supplied SQL script T5-pat-select.sql. CourseNana.COM

If you need to add further data for this task, you must return and add it as part of task 2 and then rerun pat_initialSchemaInsert.sql and all tasks (tasks 1, 2, 3 and 4) before running task 5. CourseNana.COM

You can only code a single select statement for each question below. Note that an SQL select statement begins with the SELECT keyword and ends with a semicolon (;) - within this statement, the SELECT keyword can be used multiple times. CourseNana.COM

Where you have been supplied with a string in italics, you must search the database using the provided string precisely as supplied. Where you need to show a full name, you must not have any extra spaces (e.g., leading space or extra space in the middle of the name). CourseNana.COM

Please remember VIEWS or PL/SQL (including anonymous blocks BEGIN...END) must not be used. Your SQL code used must be restricted to the syntax covered in your unit. CourseNana.COM

Sample partial output showing the form of what you must produce is provided. Note that this is the form of the output ONLY, i.e., the appearance only; the data you return will differ. CourseNana.COM

(a) Paris Arrow Transport wishes to know how often all locations have been used as pick-up or drop-off locations (trips that have not been completed must be excluded from this count). The report should show the location ID, name, address, type of location, and the number of times the location has been used for pick-up or drop-off. If a particular location has been used once for pick-up and twice for drop-off, the pickup/dropoff count will be three. CourseNana.COM

Sample partial output is shown below (your output must have the same format and column headings): CourseNana.COM

The output must be ordered to show the location with the most pick-ups/drop-offs first. If several locations have the same number of pick-ups/drop-offs, then order the output by the location ID. CourseNana.COM

[7 marks] CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Page 12 of 19 CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

(b) Paris Arrow Transport would like a report for its weekly pay run covering the period from August 1st to August 7th, 2024, inclusive. Drivers are paid $45.42 per hour for the time they drive a trip. All trips during this period have been completed, and any cancellations have been removed from the system. CourseNana.COM

If a driver has not completed any trips during this period, show their total payment as 'No Trips'. The total payment must be displayed in the following format: $1234.56. Your output must show the driver ID, the driver's full name, and the total payment. Order the output in ascending order of driver_id. CourseNana.COM

Sample partial output is shown below (your output must have the same format and column headings): CourseNana.COM

[8 marks] CourseNana.COM

Page 13 of 19 CourseNana.COM

TASK 6: MongoDB [12 mks] CourseNana.COM

Your answers for this task (Task 6) must be placed in the supplied sql file T6-pat-json.sql and the supplied MongoDB script file T6-pat-mongo.mongodb.js.
You must not add any further comments to the supplied MongoDB script file nor remove/rename any comments indicated by // CourseNana.COM

(a) Write an SQL statement in T6-pat-json.sql to generate a collection of JSON documents using the following structure/format. Each document in the collection represents a driver, their details, and a summary of their completed trip details. Note that _id in this structure is the driver’s ID, and no_of_trips is the number of trips that the driver has completed. You only need to include drivers who already have at least one completed trip. CourseNana.COM

{
"_id": 2012,
CourseNana.COM

"name": "Mansour", "licence_num": "33022B678901", "no_of_trips": 2, "suspended": "N", "trips_info": [ CourseNana.COM

{
"trip_id": 21,
CourseNana.COM

"veh_vin": "1D4PU4GK7BW972165", "pick-up": { CourseNana.COM

"location_id": 102,
"location_name": "Bercy Arena", "intended_datetime": "09/08/2024 17:35", "actual_datetime": "09/08/2024 17:38"
CourseNana.COM

},
"drop off": {
CourseNana.COM

"location_id": 114,
"location_name": "Champions Park", "intended_datetime": "09/08/2024 18:00", "actual_datetime": "09/08/2024 18:05"
CourseNana.COM

} }, CourseNana.COM

{
"trip_id": 9,
CourseNana.COM

"veh_vin": "1C4SDHCT9FC613386", "pick-up": { CourseNana.COM

"location_id": 112,
"location_name": "Roland Garros Stadium", "intended_datetime": "01/08/2024 14:00", "actual_datetime": "01/08/2024 14:01"
CourseNana.COM

},
"drop off": {
CourseNana.COM

"location_id": 116,
"location_name": "Louvre Museum", "intended_datetime": "01/08/2024 14:25", "actual_datetime": "01/08/2024 14:28"
CourseNana.COM

} } CourseNana.COM

] } CourseNana.COM

[6 marks] CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Page 14 of 19 CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Write the MongoDB commands for the following questions, 6(b) - 6(d), in the supplied MongoDB script file named T6-pat-mongo.mongodb.js. CourseNana.COM

  1. (b)  Create a new collection and insert all documents generated in 6(a) above into MongoDB. Provide a drop collection statement right above the create collection statement. You may pick any collection name. After the documents have been inserted, use an appropriate db.find command to list all the documents you added. CourseNana.COM

    [1 mark] CourseNana.COM

  2. (c)  List the name and licence number of all drivers who have completed trips to Champions Park or Porte de La Chapelle Arena. CourseNana.COM

    [2 marks] CourseNana.COM

  3. (d)  It has been discovered that driver Antoine Lefevre (“_id”:2004) made a trip from Tuileries Garden (location id: 117) to Sainte-Chapelle (location id: 118) on 10/08/2024 and forgot to record it. Because of this mistake, they have now been suspended for failing to follow policy. CourseNana.COM

    Use an appropriate db.find command before making the change so that you illustrate which document/s will be changed. CourseNana.COM

    Write the necessary MongoDB commands to add this trip to Antoine’s record, and change their status to suspended. You may make up other required information when adding the trip. CourseNana.COM

    Use an appropriate db.find command after making the change so that you illustrate/confirm the change which was made. CourseNana.COM

    [3 marks] CourseNana.COM

Page 15 of 19 CourseNana.COM

Submission Requirements CourseNana.COM

Due Date: Wednesday, 30th October 2024, 4:30 PM CourseNana.COM

Please note that if you need to resubmit, you cannot depend on your staff's availability; therefore, please be VERY CAREFUL with your submission. It is strongly recommended that you submit several hours before this time to avoid such issues. CourseNana.COM

For this assignment, there are seven files you are required to submit to Moodle: CourseNana.COM

● T1-pat-schema.sql ● T2-pat-insert.sql
● T3-pat-dml.sql
● T4-pat-mods.sql
CourseNana.COM

● T5-pat-select.sql
● T6-pat-json.sql
● T6-pat-mongo.mongodb.js
CourseNana.COM

If you need to comment to your marker/tutor, please place them at the head of each of your solution scripts/answers in the "Comments for your marker:" section. CourseNana.COM

Do not zip these files into one zip archive; submit seven independent SQL scripts. The individual files must also have been pushed to the FIT GitLab server with an appropriate history as you developed your solutions. CourseNana.COM

Late submission will incur penalties of -5 marks for every 24 hours the submission is late. The seven files must also exist in your FITGitLab server repo and show a clear development history CourseNana.COM

(at least two pushes per file). CourseNana.COM

Please note we cannot mark any work on the GitLab Server; you must ensure that you submit correctly via Moodle since it is only in this process that you complete the required student declaration, without which work cannot be assessed. CourseNana.COM

It is your responsibility to ENSURE that the files you submit are the correct files - we strongly recommend after uploading a submission, and before submitting, that you download the submission and double-check its contents. CourseNana.COM

Your assignment MUST show a "Submitted for grading" status before it will be marked. CourseNana.COM

If your submission shows a status of "Draft (not submitted)" it will not be assessed and will incur late penalties after the due date/time. CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Page 16 of 19 CourseNana.COM

Marking Guide CourseNana.COM

The submitted code will be assessed against an optimal solution for these tasks. In some tasks where SQL is involved, several alternative approaches are often possible. Such alternatives will be graded based on the code successfully meeting the brief's requirements. If it does, the answer will be accepted and graded appropriately. CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Marking Criteria Items Assessed CourseNana.COM

TASK 1 DDL 15 marks CourseNana.COM

DDL Creation of tables CourseNana.COM

Maximum 7 marks - Create table: CourseNana.COM

DDL implementation of non-PK database constraints CourseNana.COM

Maximum 8 marks - Non-PK Constraints: CourseNana.COM

  • ●  Marks awarded for correct implementation of non-PK constraints CourseNana.COM

  • ●  Marks awarded for correct use of column comments CourseNana.COM

TASK 2 Data Insert 20 marks CourseNana.COM

Insert of required items test data CourseNana.COM

Maximum 10 marks- Insert of data: CourseNana.COM

  • ●  Marks awarded for correct insert of required data CourseNana.COM

  • ●  Marks awarded for correct management of transactions CourseNana.COM

Insert of valid test data CourseNana.COM

Maximum 10 marks - Valid data inserted: CourseNana.COM

● Marks awarded for validity of data inserted
○ meets the requirements expressed in the
CourseNana.COM

assignment brief
● Marks awarded for correct management of dates when
CourseNana.COM

inserting CourseNana.COM

Task 3 DML 20 marks CourseNana.COM

Maximum 20 marks - Satisfy brief requirements: CourseNana.COM

  • ●  Marks awarded (a) - (d) for SQL code which meets the expressed requirement CourseNana.COM

  • ●  Mark penalty applied if commit not used appropriately CourseNana.COM

  • ●  Mark penalty applied if date handling and string database CourseNana.COM

lookups not managed correctly CourseNana.COM

Page 17 of 19 CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Task 4 Database Modifications 13 marks CourseNana.COM

Maximum 13 marks - Satisfy brief requirements: CourseNana.COM

  • ●  Marks awarded (a) - (b) for SQL code which meets the expressed requirement (including appropriate use of constraints). In making these modifications there must be no loss of existing data or data integrity within the database. CourseNana.COM

  • ●  Mark penalty applied if commit not used appropriately CourseNana.COM

  • ●  Mark penalty applied if column comments not used where CourseNana.COM

    required CourseNana.COM

Task 5 SQL Queries 15 marks CourseNana.COM

Maximum 15 marks - Satisfy brief requirements: CourseNana.COM

  • ●  Marks awarded, as listed, (a) - (b) for SQL code which meets the expressed requirement CourseNana.COM

  • ●  Mark penalty applied if output does not match the form supplied for each question CourseNana.COM

  • ●  Mark penalty applied if date handling and string database lookups are not managed correctly CourseNana.COM

  • ●  Mark penalty applied if column aliases are not used when arithmetic calculation, concatenation, functions, or other output manipulation is used in a query CourseNana.COM

  • ●  Mark penalty applied if manual lookup/calculation is used for values from the database CourseNana.COM

  • ●  Statements which do not execute correctly in Oracle will be awarded a maximum of 50% of the available marks less 1 mark. For example, if a question is worth 6 marks and runs with an error in SQL the maximum mark awarded will be 2 marks CourseNana.COM

Task 6 Non Relational Database Queries - MongoDB 12 marks CourseNana.COM

Maximum 12 marks - Satisfy brief requirements: CourseNana.COM

  • ●  Maximumof7marksawardedforcreationofaJSON document which matches the supplied document format CourseNana.COM

  • ●  Marksawarded,aslisted,(b)-(d)forMongoDBcodewhich meets the expressed requirement CourseNana.COM

  • ●  Markpenaltyappliediffieldnamesandpredicates(suchas "&eq") are not enclosed in double quotes CourseNana.COM

  • ●  StatementswhichdonotexecutecorrectlyinMongoDBwill be awarded a maximum of 50% of the available marks less 1 mark. For example, if a question is worth 6 marks and runs with an error in MongoDB the maximum mark awarded will be 2 marks CourseNana.COM

Page 18 of 19 CourseNana.COM

CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

Correct use of Git 5 marks CourseNana.COM

  • ●  Marks awarded for a minimum of fourteen pushes (two per file) showing a clear development history of the work for Assignment 2 CourseNana.COM

  • ●  Marks awarded for correct Git author details used in pushes CourseNana.COM

  • ●  Marks awarded for the use of meaningful commit messages CourseNana.COM

    (i.e. not blank or of the form "Push1") CourseNana.COM

Penalties CourseNana.COM

Use of CourseNana.COM

Use of VIEWS, inclusion of SET ECHO/SPOOL, and/or PL/SQL commands will result in a grade deduction of 10 marks being applied. CourseNana.COM

Incorrect file names CourseNana.COM

If file names do not follow the requirement (i.e., they are changed from the supplied filenames), or if a zip file is submitted instead of seven individual files, a grade deduction of 5 marks will be applied. CourseNana.COM

Late submission CourseNana.COM

-5 marks for each 24 hours late or part thereof CourseNana.COM

Final Assignment Mark Calculation CourseNana.COM

Total: 100 marks, recorded as a grade out of 40 CourseNana.COM

Page 19 of 19  CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
Monash代写,FIT9132代写,Introduction Databases代写,Paris Arrow Transit代写,SQL代写,MongoDB代写,NOSQL代写,Javascript代写,Monash代编,FIT9132代编,Introduction Databases代编,Paris Arrow Transit代编,SQL代编,MongoDB代编,NOSQL代编,Javascript代编,Monash代考,FIT9132代考,Introduction Databases代考,Paris Arrow Transit代考,SQL代考,MongoDB代考,NOSQL代考,Javascript代考,Monashhelp,FIT9132help,Introduction Databaseshelp,Paris Arrow Transithelp,SQLhelp,MongoDBhelp,NOSQLhelp,Javascripthelp,Monash作业代写,FIT9132作业代写,Introduction Databases作业代写,Paris Arrow Transit作业代写,SQL作业代写,MongoDB作业代写,NOSQL作业代写,Javascript作业代写,Monash编程代写,FIT9132编程代写,Introduction Databases编程代写,Paris Arrow Transit编程代写,SQL编程代写,MongoDB编程代写,NOSQL编程代写,Javascript编程代写,Monashprogramming help,FIT9132programming help,Introduction Databasesprogramming help,Paris Arrow Transitprogramming help,SQLprogramming help,MongoDBprogramming help,NOSQLprogramming help,Javascriptprogramming help,Monashassignment help,FIT9132assignment help,Introduction Databasesassignment help,Paris Arrow Transitassignment help,SQLassignment help,MongoDBassignment help,NOSQLassignment help,Javascriptassignment help,Monashsolution,FIT9132solution,Introduction Databasessolution,Paris Arrow Transitsolution,SQLsolution,MongoDBsolution,NOSQLsolution,Javascriptsolution,