$30
CS230 - Web Information Processing
Assignment 5
This Assignment is worth 15% of the Web Informa7on Processing CA Component.
This is an open-book, graded assignment. You may use online resources for reference purposes only
to help with the assignment. Please cite all references as comments in your submissions. You cannot
directly reuse HTML/CSS/JS solu2on code from online sources. You must not engage with another
student, in person or electronically (phone, social media, etc.) to secure assistance with this assignment. If you do so you will receive an automa2c fail (0%). We will perform similarity checks on
submiGed assignments to check for collaboraHve efforts. A reasonable aGempt at this assignment
will gain you 15%of your conHnual assignment marks.
Assignment 05 - Working with Online (NoSQL) Databases
You are required to develop a soluHon for an online mobile phone store maintaining a database of:
1. Personal details for customers of a hypotheHcal online mobile-phone store. The database should
contain enHHes that record customer personal informaHon [Title, First Name(s)*, Surname*,
Mobile*, Email Address*], and both home and shipping addresses [Address Line 1*, Address Line
2, Town*, County/City*, EIRCODE]. The fields marked * are required fields, i.e. they must contain
values.
2. Item details for mobile phones sold by the online store (from a random selecHon of phone items;
10 maximum) which contain the following phone details: [Manufacturer*, Model*, Price*]. The
fields marked * are required fields, i.e. they must contain values.
3. Order details for customer purchases. Orders contain a list of items (phones) that have been purchased by customers. Customers may purchase more than one item in a single order. Customers
may make mulHple orders containing mulHple items. The system should record item purchasers;
or it should be possible to establish this informaHon using queries.
Your online database should provide CRUD funcHonality for CreaHng, Searching (Retrieving), Updating, and DeleHng customer, item, and order informaHon from a MongoDB database.
There are no requirements to develop a HTML/CSS/JS “front-end” for this assignment. You only need
to develop the ”back end” funcHonality that demonstrates the CRUD acHvity described above using
randomly created, or hard-coded, data in your back end soluHon.
Assignment Release Date: 12-04-2021
Submission Due Date: 23-04-2021
Feedback Due Date (esHmated): 30-04-2021 (for assignments that make Due Date)
Support Laboratories Online Labs 09 and 10 (Two Weeks)
Total Mark: 15%
Assignment 05 - Requirements
You should include methods for the each of CRUD acHviHes for the different enHtles. For example,
for the C (create) acHvity you should demonstrate how to create the customer document (personal
and address), and add it to the database using a method insertCustomer(<details>). For the R
(retrieve/search) acHvity, you should randomly select a customer and output (not raw object) the
details (log to console) using findCustomer(<details>). For the U (Update) you should randomly select a customer and update three elements of their personal (phone, email, Title) and all or any
of their address data using updateCustomer(<details>). For the D (delete) acHvity, please
delete all records for a customer matching a specified email, phone and name using deleteCustomer(<details>). Similarly, you need to perform similar CRUD acHviHes for Items and Orders
enHtles.
You are required to develop either a NodeJS (JS) or PHP applicaHon that implements the funcHonality
outlined above with the following addiHonal constraints:
1. For this assignment, you should use a MongoDB database to store the informaHon for the user
informaHon using either a local installaHon (or an online MongoDB Cloud Atlas database available here hGps://account.mongodb.com/account/login). Please use NodeJS that has been installed locally or CLI (Command Line Interface) PHP that comes with the XAMPP installaHon. If
you do not have PHP/XAMPP/NodeJS installed please do so for this assignment. You will also
need to install the drivers for accessing MongoDB. If you cannot install these as you do not have
a computer that facilitates installaHon please contact John KeaHng (john.keaHng@mu.ie). A
video will be posted to Moodle demonstraHng how to use online resources for this assignment if
you do not have installaHon privileges.
2. Please note that you should implement best pracHce when it comes to NoSQL (document) database design for this assignment, i.e., you may choose to have normalised or de-normalised models, or a combinaHon approach.
3. You may write funcHons to randomly create personal and address data and you may use the
name generator funcHons provide for the Assignment 03 if you wish.
4. Titles should include Mx, Ms, Mr, Mrs, Miss, Dr or Other (specify).
5. You may reuse the created (or auto-generated) address as the shipping address or add a different
address.
6. Your code should include a brief descripHon for the database design (your data modeling approach) and the impact on your code development. This should be included as a comment at the
boGom of your code submission.
7. For this assignment you do not need to validate data (Please note that ordinarily I would have
this as a requirement but given the current situaHon it is not required).
8. For this assignment you do not need to generate online forms to collect and validate data sent to
the database (Please note that ordinarily I would have this as a requirement but given the current situaHon it is not required).
Assignment 05 - Development Notes
Please adhere to the following development requirements:
1. You may not use RESTful frameworks (for example, ExpressJS, etc.) for this assignment. This assignment requires you to use core fundamental code for manipulaHng databases. You may refer to
online resources such as MongoDB, W3schools, of course.
2. You must comment your code, clearly indicaHng, how your code implements the soluHon described above in the “Assignment 05 - Requirements” secHon.
Please note that there are many sample (JS/PHP) soluHons for implemenHng similar soluHons (database) funcHonality available online. While it is fine to consult these, and accompanying arHcles, for
references, you may not re-use code from these projects. Please cite your reference sources in your
codebase. We will search and idenHfy online coding soluHons to similar problems for the purposes of
checking against submiGed soluHons in instances where we have concerns about code originality.
Please “hard-code” your authenHcaHon details into the database. If you are using MongoDB please
allow access from anywhere (whitelist 0.0.0.0). We will need access to your database in order to correct your assignment. Please note that a MongoDB Atlas database is preferable for this assignment,
you must create an account unless you do not have internet access.
Assignment 05 - Extra Credit (5%)
For an extra 5% credit you are required to develop a fully funcHonal HTML/CSS/JS User Interface (UI)
that supports the full CRUD acHvity. You may use any JS (or other) framework to implement the UI
(Bootstrap, jQuery, jQuery UI, etc.).
IMPORTANT SUBMISSION DETAILS
Before submiWng your assignment students should check that their solu2on works in Chrome
and/or Firefox. Please indicate the Browser, Opera2ng System (Linux/Windows/MacOS) and
Browser version used for tes2ng (as a comment in your submiZed code). If you use an online IDE
please clearly specify the IDE and provide a link where possible.
All work must be submiGed via Moodle (see "Assignments" secHon for submission). Work submiGed
via other means will not be accepted unless you have prior arrangements with the Head Demonstrator (Behnam Faghih). All work MUST be submiGed by the due-date deadline. Late submissions will
not be accepted.
The assignment submission is a zip file named “assignment-05-xxxxxxxxx.zip” (where “xxxxxxxxx” is
your student id) containing solu7on files, e.g. named “assignment-05.js”, “assignment-05.php”, etc.
together with any other resources used in the assignment solu7on. Please include a dump of the data
from your database (as a text file) names “assignment-05.txt”. Please ensure that all external files
use rela7ve directory referencing, rather than hard-coding the files’ loca7on.