Assignment 2 (code)
Due 10 Oct by 23:59 Points 12 Submitting a file upload Available 5 Sep at 23:59 – 17 Oct at 23:59 about 1 month
Start Assignment
ISYS1101/ 1102 Database Applications
Important Information
Assessment Type: Group assignment. Submit online via Canvas –> Assignments –> Assignment 2. Marks awarded for meeting requirements as closely as possible.
Clarifications/updates may be made via announcements/relevant discussion forums. Make sure to review the discussion board.
Due date: 23:59, Sunday 10 October
Late submissions of assignments will be penalised as follows. For 1 to 5 days late, a penalty of 10% (i.e. 10% out of total marks, not 10% out of your marks) per day.
For submissions more than 5 days late, 100% penalty applies. If you submit between 00:00 11 October and 23:59 11 October, your penalty is 10%. If you submit
between 00:00 12 October and 23:59 12 October, 20% penalty, and so on.
Weighting: 20 marks
Starter code link: https://classroom.github.com/a/tlQqUD8t (https://classroom.github.com/a/tlQqUD8t)
Overview
The objective of this assignment is to reinforce what you have learned in the lectures and tute/lab sessions. Specifically, it involves how to create a simple web application
that connects to a MongoDB database server. In order to achieve this learning outcome, you will attain skills in a multitude of areas, specifically, MongoDB data model
(document-based data model), creating MongoDB queries using MongoDB Compass, embedding MongoDB queries in Java applications, and hosting a dynamic web
application.
In addition to building the web database application, another important component is a research report comparing the two implementations: (1) Oracle implementation in
assignment 1; and (2) MongoDB implementation in assignment 2. More details of the report requirements are outlined in the assignment specifications section.
Simple web applications can be designed using a two-tier architecture, in which a client communicates directly with a server. In this assignment, a Java (Javelin) web
application communicates directly with a MongoDB database using the Mongodb Java API (https://docs.mongodb.com/drivers/java/sync/current/)
The application you build in this assignment involves the creation of a number of Java web pages. In each of these pages you use HTML and CSS to implement a simple
interface, and use Java (with MongoDB Java API) to perform the logic that directly queries the database and inserts the retrieved data back into web pages.
The main emphasis in this assignment is the database backend. While it is essential to have good Java and web programming skills, they do not primarily contribute to your
assessment outcomes.
Assessment Criteria
This assessment will determine your ability to:
1. analyse the requirements outlined in the problem description;
2. write MongoDB queries required for CRUD (create, read, update and delete) operations on the AirBnB database available on MongoDB Atlas;
3. by embedding above MongoDB statements as appropriate, write the complete web application using html, Java, Javascript and any other required tools;
4. connect to the MongoDB Atlas server hosting the AirBnB database (document collection) and use your Java code to develop web code to interact with the database;
5. write a research report comparing various characteristics on two different implementations of similar applications and make a recommendation based on your findings.
Learning Outcomes
This assessment will assess how you attained the following course learning outcomes:
CLO 1: apply advanced data analysis and modeling concepts, physical design, integrity, security and transaction management.
CLO 2: create triggers, stored procedures and functions to enhance the usability of a database;
CLO 3: apply techniques for efficient storing, accessing, securing, and recovering of data;
CLO 4: build an efficient database application with an emphasis on storage management, indexing, and query optimisation;
CLO 6: develop a simple web-based interface for a database.
Preparation Work
You are required to be able to write code in HTML, JAVA, Javascript and any other programming/scripting languages to build a fully-fledged web database application. More
importantly, you should be able to use MongoDB API within a JAVA program. In order to acquire this pre-requisite knowledge, you must complete Weeks 7, 8, and 9 lab
sessions.
Assessment Details
Let’s assume we want to develop a light version of AirBnB (AirBnB lite). This light version has limited functionalities compared to the full version. Only core functionalities are
to be retained. The MongoDB database backend is already available, configured and loaded with data (taken from the real AirBnB website).
After a careful analysis, the following core functionalities are to be retained in the light version.
Any visitor should be able to search for accommodation, based on various (combinations) of criteria:
location (country + market)
number of people accommodated
number of bedrooms
https://classroom.github.com/a/tlQqUD8t
minimum number of beds
property type
available amenities
maximum price
minimum review score rating
host status (super hosts vs regular hosts)
summary keyword matching – should support partial word match
Note that all provided options are combined (AND), omitted search options are ignored.
Results should show one embedded image of the accommodation, it’s listing name, number of bedrooms, number of beds, and price.
Once a specific accommodation is selected, users should be able to view the following relevant details for the specific accommodation:
(listing) name
summary
full address
review score rating
price
property type
list of amenities
number of bedrooms
number of people accommodated
host status
one (listing) photo – these must be embedded into page (not just links)
reviews
Users should be able log in using just their pre-existing name and id (no need to create accounts).
Once logged in, users can leave written reviews for a searched property (the system must also record the date of the review), view their existing reviews, edit their existing
reviews (which will update the review date), and finally delete existing reviews.
Note that no page should contain more than 10 results. Use pagination to limit 10 results per page.
Summary of Tasks:
1. Use MongoDB Compass tool to come up with the appropriate queries to answer the user data requirements (and CRUD tasks);
2. Write a JAVA application to do the following tasks:
1. Search for accommodation (by various criteria listed above):
2. Once selected, view property details (listed above);
3. Log into your current account (using existing users name and id);
4. Once logged in leave written reviews for searched accommodation (recording date of review), view all their existing reviews, edit existing reviews (update review
date);
5. Display the AirBnB page rendered in a user-friendly and accessible manner.
3. Write a research report comparing the two implementations.
Task Descriptions:
There are three milestones in this assignment.
Milestone 1:
You are required to create a set of mongodb queries to locate the relevant information for the entire site functionality (as well as the CRUD tasks).
By the end of week 9 you are expected to have a large percentage of these queries completed and functioning against the existing database.
While there are no marks allocated to this milestone. Failure to complete this will mean that you will most likely struggle to complete the rest of the
assignment in the available time.
Milestone 2:
In this milestone, you will develop JAVA code required to do all the CRUD (create, read, update and delete) operations associated with various functions of the
application. Most of these scripts will require embedded MongoDB API calls. The JAVA – MongoDB API is detailed on
https://docs.mongodb.com/drivers/java/sync/current/ (https://docs.mongodb.com/drivers/java/sync/current/)
Your application must consist of the following pages.
Application homepage:
The home page will have a small form at the top to enter the various criteria for searching for various accommodation. At the very top left corner of the page there will
also be a login panel containing a form for logging in as an existing user (using the name and id combination). When the form is submitted, the user credentials are
checked and if correct, the user will be taken back to the same page. However once logged in, the login panel will be replaced with the user panel, where they can
click to go to the reviews page (the login form will not be visible any more and instead a logout button will be available).
After searching for accommodation, the results should be presented below in the main section of the page.
Individual accommodation page:
Once a specific accommodation is selected, users will be taken to a new page where they can view more detailed information about the selected accommodation. If
the user is logged in, they can leave a new review, or modify and delete their existing review. There should be an option to return back to the previous search results
page.
Reviews page:
https://docs.mongodb.com/drivers/java/sync/current/
Assignment 2 code
This page will allow the currently logged in user to see a list of all their past reviews, they will be able to delete and also modify the existing reviews (the existing review
content should be modifiable, rather than just replacing with a completely new review from scratch). When a review is modified, the review date should be updated to
reflect the current date.
You are required to complete this milestone by the due date and submit your codebase, by following the submission instructions. You will then be performing a demo
in class.
Milestone 3:
You have implemented the AirBnB-Lite application and the FaceBook-lite application using two very different database backends: (1) Oracle implementation in
assignment 1; and (2) MongoDB implementation in assignment 2. In this Milestone, you are required to write a research report analysing these two implementations.
The current Facebook application have approximately 2.375 billion active users and many billions of status updates and other interaction data. It is expected a steady
growth of 10% increase annually over the next 5 years. Similarly AirBnb has 2.9 million hosts with 14,000 new hosts each month, and 7 million listings worldwide.
Based on the findings from your two implementations, write a report identifying the advantages and disadvantages of both backend approaches and a conclusion
making your recommendations.
Following metrics can be used to compare two database backend implementations:
Query performance
Resource requirements (disk, memory, CPU, network bandwidth, etc)
Security issues, such as SQL injection
ACID properties, transaction and concurrency control
Scalability
Ability to handle massive volumes of data
Ability to execute complex queries
Data integrity
Differences in (for example media) data types
Note that while the current implementation of the MongoDB database does not deal with security, you should consider how this would be handled in the real
application.
Your report may also include case studies (implementations other than your Facebook-Lite and AirBnB applications) for both paradigms and draw conclusions based
on their findings.
The report length should be between 1000 – 1500 words. You must be careful about quoting texts extracted from other sources. You can paraphrase them with proper
referencing. Before you start your report, please refer RMIT Library Referencing Guide, available at: https://www.rmit.edu.au/library/study/referencing
(https://www.rmit.edu.au/library/study/referencing)
You can use Microsoft Word or another word processing application to work on your research report. At the end, convert it into PDF format. Do not submit Word file. if
that option is not available on your system there are free pdf converters online you can utilise. e.g. http://convertonlinefree.com/
Submission Format
Submit your report and assignment code separately using the corresponding Canvas Assignment page. It is your responsibility to make sure the submission is (1) complete;
(2) correctly zipped; (3) retains the directory structure; and (4) executable on in the VSCode environment. Please verify that your submission is correctly submitted by
downloading what you have submitted to see if the files include the correct contents.
Academic integrity and plagiarism
Academic integrity is about the honest presentation of your academic work. It means referencing the work of others while developing your own insights, knowledge, and
ideas.
Breaches of academic integrity include:
plagiarism and failure to correctly acknowledge sources
contract cheating or paying another person to prepare an assignment
submitting work prepared by another person
copying other people’s work
cheating in exams
breaching the Research Code
using unauthorised materials or devices
Penalties
The penalties for breaching academic integrity are severe – they include charges of academic misconduct, cancellation of results and exclusion from your course.
For further information on our policies and procedures, please refer to the University website. (https://www.rmit.edu.au/students/student-essentials/rights-and-
responsibilities/academic-integrity)
Assessment declaration
When you submit work electronically, you agree to the assessment declaration. (https://www.rmit.edu.au/students/student-essentials/assessment-and-
exams/assessment/assessment-declaration)
https://www.rmit.edu.au/library/study/referencing
https://www.rmit.edu.au/students/student-essentials/rights-and-responsibilities/academic-integrity
https://www.rmit.edu.au/students/student-essentials/assessment-and-exams/assessment/assessment-declaration
Criteria Ratings Pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
Search for property (single criteria)
able to search for accommodation using a single criteria
1 Pts
Full marks
Demonstrate correctly searching and
displaying matching accommodation
using a single search criteria
0.5 Pts
Pass
Partially
works
0 Pts
No marks
Unable to
search or
does not
use
MongoDB
Search for property (multiple criteria)
able to search for accommodation using multiple criteria – eg location and
maximum price
1 Pts
Full marks
Demonstrate correctly searching and
displaying matching accommodation
using a multiple search criteria
0.5 Pts
Pass
Partially
works
0 Pts
No marks
Unable to
search or
does not
use
MongoDB
Search for property (multiple criteria including summary with partial match)
able to search for accommodation using multiple criteria – eg minimum number
of bed, minimum review score and summary partial keyword match
1 Pts
Full marks
Demonstrate correctly searching and
displaying matching accommodation
using a multiple search criteria including
partial keyword match
0.5 Pts
Pass
Partially
works
0 Pts
No
marks
Unable to
search or
does not
use
MongoDB
Search result display
Search result shows a list of matching accommodation in a list with an option to
select specific accommodation. Each listing has one embedded image of the
accommodation, it’s listing name, number of bedrooms, number of beds, and
price
1 Pts
Full marks
Demonstrate displaying
matching accommodation
details in a list
0.5 Pts
Pass
Partially
works
0 Pts
No marks
Unable to display
details or does not
use MongoDB
Search result individual display
Selecting a specific listing presents detailed information of the listing:
(listing) name,
summary,
full address,
review score rating,
price,
property type,
list of amenities,
number of bedrooms,
number of people accommodated,
host status,
one (listing) photo – these must be embedded into page (not just links),
reviews
1 Pts
Full marks
Demonstrate displaying all
specific details of selected
accommodation
0.5 Pts
Pass
Partially
works
0 Pts
No marks
Unable to display
details or does not
use MongoDB
Reviewer can log in using existing account information (reviewer name and
reviewer id)
Invalid details should be rejected, Valid details should be accepted
1 Pts
Full marks
Demonstrate ability to log in as an
existing reviewer and rejecting
invalid details
0.5 Pts
Pass
Partially
works
0 Pts
No marks
Unable to log in
correctly or does
not use MongoDB
Validated reviewer can search for accommodation and leave a new review 1 Pts
Full marks
Demonstrate ability for validated
reviewer to search for
accommodation and leave a review
0.5 Pts
Pass
Partially
works
0 Pts
No marks
Unable to leave
review or does
not use
MongoDB
Validated reviewer can see list of all past reviews 1 Pts
Full marks
Demonstrate ability for
existing reviewer to see list of
all past reviews
0.5 Pts
Pass
Partially
works
0 Pts
No marks
Unable to see all past
reviews or does not
use MongoDB
Total points: 12
Criteria Ratings Pts
1 pts
1 pts
1 pts
1 pts
Validated reviewer can update an existing review from list 1 Pts
Full marks
Demonstrate ability for an existing
reviewer to update existing review
from list
0.5 Pts
Pass
Partially
works
0 Pts
No marks
Unable to update
review or does not
use MongoDB
Validated reviewer can delete an existing review from list 1 Pts
Full marks
Demonstrate ability for an
existing reviewer to delete an
existing review from list
0.5 Pts
Pass
Partially
works
0 Pts
No marks
Unable to delete
existing review or
does not use
MongoDB
Pages with more than 10 results, use pagination to split up the results 1 Pts
Full marks
Demonstrate pagination of results (limiting
10 results per page, with navigation to the
various pages of results)
0.5 Pts
Pass
Partially
works
0 Pts
No marks
No
pagination
of results
Explain code and MongoDB
answer tutors question or questions about code and database
1 Pts
Full marks
Satisfactorily answer question(s) about code
and database
0 Pts
No marks
Answers are
unsatisfactory