Database Programming


Database Programming

Task 3

Semester 2, 2020

Assessment and Submission Details

Marks: 50 % of the Total Assessment for the Course

Due Date: Midnight Friday, 16th October Week 12

Assignments are to be submitted as a draft and then as a final submission (both by SafeAssign).


The assignment will be marked out of a total of 60 marks. Once marked, ALL assignments will be checked for plagiarism and/or collusion between individuals.

Refer to your Course Outline or the Course Web Site for a copy of the “Student Misconduct, Plagiarism and Collusion” guidelines Academic Integrity Governing Policy

Note: Each student MUST be able to produce a second copy of their assignment and this copy MUST be produced within 24 hours of it being requested by the Course Co-ordinator. Failure to produce the second copy of the assignment when requested may result in loss of marks or a fail grade for the assignment.

Requests for an extension to an assignment MUST be made prior to the date of submission and requests made on the day of submission or after the submission date will only be considered in exceptional circumstances.

Use of NoSQL database

Hillview is a small business that has started up a farm box delivery business to connect farmers to customers.

The image below shows a screen shot from the Hillview Farmbox website. You can see the sort of data (that customers see) that is stored for each item. You can find out more about the Hillview Farmbox business at this link

The Hillview Farm Box web site currently uses a MySQL database which was set up by one of the owner’s children. The system is functional, but it is starting to slow as the business grows at a rapid pace. The Hillview Farm Box owner knows that customers will not be happy if the web site continues to run slowly and has asked you for your advice on how it could be redesigned using MongoDB to improve speed.

The owners have provided you with the current relational schema so you can see the data that they need to store.

The current relational schema is:

Assignment Requirements:

Part A – MongoDB

1. Write code to insert five product sales on the Hillveiew Farm Box web site – you will have to choose the attributes you want to store for each sale – remember this is a database rewrite. (10 marks)

2. Justify your choices for the data structures you selected for each attribute in the sale. Provide a sentence or two to explain why you chose each of the data structures. (10 marks)

3. Create the following queries (all output should be easily read) HINT use .pretty (20 marks total)
a. List all the sales in the collection (including all fields) (2 marks)
b. List only the product names from each sale (2 marks)
c. List only the product name and farmer’s name for every sale (2 marks)
d. List only the distinct name and details of every customer (2 marks)
e. Count the number of sales in the collection (2 marks)
f. List only the product name and price for products that are greater than $15. (2 marks)
g. Return the average price each product type (eg Meat, Dairy, Veggies & Fruit) (2 marks)
h. Write code that updates the name and price of one of the products in one sale. (2 marks)
i. Add a new field to a sale to record to show who the sale was referred by. (2 marks)
j. Return the sales that do not have any dairy products. (2 marks)

Part B – Neo4j (10 marks)

4. The owner has also asked you to write about how Neo4j could be integrated to improve the product recommendations. At the moment, items are randomly selected from the product list to display to customers.

Write around 300-500 words on the way that you would develop a Neo4j database that could complement the MongoDB database so that real time recommendations could be made based on what other “similar” customers purchased.


• The report is to be prepared as a single Microsoft Word document with electronic submission through SafeAssign by the due date (using the Draft Submission link and then the Final Submission link).
• Harvard style referencing is required (both in-text and reference list).
• The assignment will be assessed according to the marking rubric available on Blackboard.
• Late submission of the assignment will be penalised according to USC policy 7.8.2.
• Assignment grades will be made available on Blackboard with an electronic assignment marking sheet after Final Grades are released.
• Where an assignment is undergoing investigation for alleged plagiarism or collusion the grade for the assignment and the assignment will be withheld until the investigation has concluded.

Buy plagiarism free, original and professional custom paper online now at a cheaper price. Submit your order proudly with us

Essay Hope