Task 2 (2.0 marks) Implement the following data manipulations on a collection of documents transport. (1)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Task 2 (2.0 marks) Implement the following data manipulations on a collection of documents transport. (1) Remove a mechanic John Fox. (2) Remove information about a date of birth (dob) from a description of employee number 11. (3) Remove information about a trip number 7 performed by an employee number 11. (4) Add information about a new trip performed by an employee number 11. At the moment we only know a trip number 999 and registration of truck used PKR786. (5) Change a date of a trip number 15 performed by an employee number 11 to 28- SEP-18. Implementation of each data manipulation is worth 0.4 mark. When ready create MongoDB script file solution2.js with the implementations of your data manipulations. Very important Implementation of each data manipulation must consist of the invocations of two methods: print(' (n) db.transport.data-manipulation-method ( data manipulation)'); db.transport.data-manipulation-method ( data manipulation ); where n is a number of a data manipulation as above, i.e. 1 or 2 or ... or 5. A method print () prints a text of a data manipulation into a report. A method data- manipulation-method processes a data manipulation and it includes the results into a report from the processing of a script solution2.js. Before generation of a report it is strongly recommended to "refresh" a collection of the documents transport with the methods db.transport.drop() and load ('transport.js'). Finally, to create a report open a Terminal window and at $ prompt process a script file solution2.js in the following way. mongo <solution2.js >solution2.1st Deliverables A file solution2.1st with a report from processing of MongoDB script solution2.js with the implementation of the data manipulations listed above. A report without a listing of the processed data manipulations in a way explained above scores no marks. e# name dob address hireDate EMPLOYEE ID position [Driver, Mechanic] license status [Available, On-leave] DRIVER MECHANIC TRIP tripNumber ID registrationNum tripDate leg [1..*] ID make trip experience (Expert, Standard] TRUCK registrationNum ID capacity weight status maintain MAINTENACE registrationNum ID maintenancetime maintenanceDate Task 2 (2.0 marks) Implement the following data manipulations on a collection of documents transport. (1) Remove a mechanic John Fox. (2) Remove information about a date of birth (dob) from a description of employee number 11. (3) Remove information about a trip number 7 performed by an employee number 11. (4) Add information about a new trip performed by an employee number 11. At the moment we only know a trip number 999 and registration of truck used PKR786. (5) Change a date of a trip number 15 performed by an employee number 11 to 28- SEP-18. Implementation of each data manipulation is worth 0.4 mark. When ready create MongoDB script file solution2.js with the implementations of your data manipulations. Very important Implementation of each data manipulation must consist of the invocations of two methods: print(' (n) db.transport.data-manipulation-method ( data manipulation)'); db.transport.data-manipulation-method ( data manipulation ); where n is a number of a data manipulation as above, i.e. 1 or 2 or ... or 5. A method print () prints a text of a data manipulation into a report. A method data- manipulation-method processes a data manipulation and it includes the results into a report from the processing of a script solution2.js. Before generation of a report it is strongly recommended to "refresh" a collection of the documents transport with the methods db.transport.drop() and load ('transport.js'). Finally, to create a report open a Terminal window and at $ prompt process a script file solution2.js in the following way. mongo <solution2.js >solution2.1st Deliverables A file solution2.1st with a report from processing of MongoDB script solution2.js with the implementation of the data manipulations listed above. A report without a listing of the processed data manipulations in a way explained above scores no marks. e# name dob address hireDate EMPLOYEE ID position [Driver, Mechanic] license status [Available, On-leave] DRIVER MECHANIC TRIP tripNumber ID registrationNum tripDate leg [1..*] ID make trip experience (Expert, Standard] TRUCK registrationNum ID capacity weight status maintain MAINTENACE registrationNum ID maintenancetime maintenanceDate
Expert Answer:
Answer rating: 100% (QA)
Here is the solution2js MongoDB script file with the implementations of the data manipulations print... View the full answer
Related Book For
Management information systems
ISBN: 978-0073376813
10th edition
Authors: James A. O Brien, George M. Marakas
Posted Date:
Students also viewed these programming questions
-
To demonstrate the ability to propose, implement, and query the database. Problem: MovinOn Inc. is a moving company that provides moving and storage services in California, Nevada, and Arizona....
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
1) Identify a Major Global Company 2) Provide a brief History of the Company and what it does. 3) Identify their top three (3) Tier 1 Suppliers - Explain what they supply, where they are located and...
-
Refer to the information in E19-7 about Berstler Limited's defined benefit pension plan. In E19-7 Berstler Limited sponsors a defined benefit pension plan, and follows ASPE. The corporation's actuary...
-
Assume that a simple addition of two elements requires a unit time. You are required to compute the execution time needed to perform the addition of a 40 element array using each of the following...
-
Suppose Motor Shack incurred the following costs at its Ann Arbor, Michigan, store: Requirements:- 1. Classify each cost as to which category of the value chain it belongs (R&D, Design, Purchases,...
-
Rather than the linear relationship of Eq. (1.7), you might choose to model the upward force on the parachutist as a second-order relationship, F U = c v 2 where c = second-order drag coefficient...
-
Program for find distance between two Coordinate points of (x1,y1), (x2,y2)?
-
Today is September 16, Year 2. You, CPA, work for Garcia & Garcia LLP, a medium-sized firm located in Montreal. Jules Garcia calls you into his office. "CPA, I have a very special engagement for you....
-
DIRECTIONS: To find the answer to the riddle, write the answer to each question in the space immediately below it. In the solution section, the word in parentheses next to the answer to the first...
-
Lyme Incorporated issues 3,000 shares of no-par-value common stock for $20 per share. What is the correct journal entry for this transaction?
-
Businesses are required to record proof that workplace health and safety information was communicated clearly. What are some ways to achieve this?
-
For this week's assignment, you will identify the key characteristics of consumer behavior. You will also discuss and explain how customer satisfaction influences customer loyalty and analyze product...
-
Suppose your firm is considering investing in a project with the cash flows shown as follows, that the required rate of return on projects of this risk class is 12 percent, and that the maximum...
-
Assume you are a manager for a pension fund that is mostly allocated in equity and bonds. The fund has recently suffered a setback and is now under-funded (PV of liabilities> PV of assets). The head...
-
1. Determine the joint displacements, member axial forces, and support reactions for the Baltimore bridge truss shown in Fig. 3.11. 13 3.5 m 3.5 m 120 kN 120 kN 120 kN 120 kN 120 kN 120 kN 120 kN 8...
-
Explain how two samples can have the same mean but different standard deviations. Draw a bar graph that shows the two samples, their means an standard deviations as error bars. T S
-
Will the increasing use of the Internet by firms with global business operations change their move toward a transnational business strategy? Explain.
-
How could some of the spectacular failures of ERP systems have been avoided?
-
1. What problems occurred when Wolf Peak upgraded from QuickBooks to a new accounting software package? How could these problems have been avoided? 2. Why did SAP's Business One prove to be a better...
-
You are pulling a child in a wagon. The rope handle is inclined upward at a 60 angle. The tension in the handle is 20 N. How much work do you do if you pull the wagon 100 m at a constant speed?
-
A typical muscle fiber is 2.0 cm long and has a cross-section area of 3.1 10-9 m 2 . When the muscle fiber is stimulated, it pulls with a force of 1.2 mN. What is the work done by the muscle fiber...
-
A wind turbine works by slowing the air that passes its blades and converting much of the extracted kinetic energy to electric energy. A large wind turbine has 45-m-radius blades. In typical...
Study smarter with the SolutionInn App