Home / Expert Answers / Computer Science / consider-the-following-conceptual-schema-of-a-sample-mongodb-database-start-mongo-client-and-conne-pa409

(Solved): Consider the following conceptual schema of a sample MongoDB database. Start Mongo client and conne ...



Consider the following conceptual schema of a sample MongoDB database.
Start Mongo client and connect to the MongoDB databaseApplying update to complete the following specified tasks.
Use the method update() to write the implementations of the followUse either a method find \( \mathrm{O} \) or a method aggregate \( \mathrm{O} \) available in MongoDB to write the implementa
Consider the following conceptual schema of a sample MongoDB database. Start Mongo client and connect to the MongoDB database server. Next, implement the following actions. (1) Create a new MongoDB database with a name the same your UOW student number. (2) Create a collection with a name the same as the prefix of your UOW email address, e.g., sjapit. (3) Insert into the collection the documents whose contents are consistent with the conceptual schema given above. It is important that your documents represent the hierarchical structures in the best possible way. You do not need to enforce all identification constraints determined in the conceptual schema. Insert at least one document for each class of objects given in the schema with the meaningful values of all properties describing the classes of objects in the schema. (4) List the contents of the collection created in a step (2) and loaded with the documents in a step (3) in a pretty format. Save a report from the processing of actions listed above in a file solution1. Ist. To create a report, you can copy the contents of Terminal window and paste it into a file solution1.Ist. The results of all actions must be included into a file solution1.Ist in the same order as their specifications listed above. Applying update to complete the following specified tasks. Use the method update() to write the implementations of the following data manipulation operations. Implementation of each data manipulation operation is worth 1 mark. 1. Update the closing date (dateClosed) of the cart 'cart001' of the customer 'C12345' to 15 May 2023. (Hint. You can use the function new Date(" 2023-05 to set the date.) 2. Delete from the collection a shoppingcart (cart005) created by the customer C12347. Save the listings of processed queries and the results of processing in a file solution2.Ist. To create a report, you can process the queries one by one and later 'Copy' the contents of Terminal window and 'Paste' it into a file solution2. Ist. The results of query processing must be included into a file solution2. Ist in the same order the as respective queries listed above. Deliverables Generate a file solution2. Ist with a report from processing the queries listed above. The report MUST have no errors. The report must list all methods processed by mongo command line shell. Use either a method find or a method aggregate available in MongoDB to write the implementations of the following queries. Implementation of each query is worth 0.5 mark. 1. List the customer name, address and the created shopping cart who purchased product P1001. 2. List the customer name, address, and the created shopping cart of the customer who created a shopping cart on 06 May 2023 (ISODate('2023-0506T00:00:00Z')). Please do not show the customer's id. 3. Find the total number of shopping cart created by each customer. For each customer, list his/her email address and the total number of shopping cart created. 4. Find the products that have been included in at least 2 or 3 shopping carts. 5. For each price base, list the price base and the total number of each price base. 6. Find the customers who have purchased both the products 'P1002' and 'P1003'. 7. Find the products that have not been included in any of the shopping cart. 8. Find the total number of customers who do not provide his/her telephone number.


We have an Answer from Expert

View Expert Answer

Expert Answer



You can follow these steps on your local machine t...
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe