CO7401 Assignment 2 - NoSQL Databases Design and Build
CO7401 Assignment 2 - NoSQL Databases Design and Build
Assignment Title
3. Effectively apply advanced concepts in databases, showcasing expertise in query optimisation, performance tuning,
and utilising sophisticated features during the creation and tuning process.
4. Critically evaluate and select appropriate database solutions based on specific data management requirements,
demonstrating an understanding of the strengths and weaknesses of SQL and NoSQL approaches.
Submission Information
The TurnItIn submission box will have multiple parts. You must submit to the appropriate part
• A PDF file with your assignment document, all programming code from your project (in a monospace font), and
a reference list in APA format
• A ZIP file containing the project – code in text file format that can be executed and any data you have used
Both files must be named with your assessment (J number), e.g. J123456.pdf and J123456.zip.
The name for each entry on TurnItIn must also be your assessment number.
Any late work penalties for assignments will be calculated using the latest submission date/time.
Extensions
A 7-day submission window is available on this assessment with the final date for submission as specified above. No
extensions will be granted.
1
Academic Conduct
The material you submit must be your own work. Please avoid colluding with peers on your work. The penalties for
breaching the academic conduct policy are severe. The minimum penalty is usually zero for that piece of work. Further
information is available at Portal > Support Departments > Academic Services > Academic Standards > Academic
Conduct > Information for Students > Academic Conduct
Generative AI
The use of generative AI tools where not permitted will be treated as a breach of the academic integrity policy.
This assignment does not permit the use of any generative AI tools, including but not limited to ChatGPT, Bard, Copilot,
Midjourney, and others.
Referencing code
Code adapted from third parties must be clearly referenced using comments to denote the start and end of the adapted
code. You must also include an APA format reference in the PDF file.
} else {
someCharacter += 1;
}
//end of adapted code
2
Assignment Brief
Scenario:
You are tasked with designing an equivalent NoSQL database system for the organisation you modelled in
assignment 1.
Objective:
This assignment builds upon the work you did in assignment 1 where you designed a SQL database. You will
specifically focus on using a document-oriented database like MongoDB, but the core concepts can be applied to
other NoSQL database types.
As part of the assignment, you will critically compare the two solutions you have built in Assignment 1 (SQL) and
assignment 2 (NoSQL).
Tasks:
1. Data Modelling:
o Identify the main Collections involved in the database
o Define the attributes (data fields) for each Collection, considering the specific needs of the
organisation.
o For example, a "Customer" collection might include attributes like name, contact information, and
order preferences
o Discuss why a document-oriented database is a suitable choice for this scenario.
o Consider how relationships between Collections will be represented within the collections
(e.g., embedded documents, references).
2. Sample Data:
o In your MongoDB environment, create the database and collections.
o Create a sample set of data for each collection, demonstrating the structure and potential variations
within the data.
o Build and populate your database with this sample data using a Python script.
3. Queries & Operations:
o Describe how typical operations in the transactional system would be achieved using queries in
MongoDB
o Provide examples of queries and aggregates that might be used to:
§ Retrieve a specific customer's order history.
§ Find all orders for a specific time period.
§ Identify the most popular products.
§ Summarise sales volumes and value for each day
§ Any other queries you think would be relevant and useful
4. Scalability & Performance:
o Create Indexes to optimise your queries and aggregates. Document the performance gains you have
seen with these indexes.
o Discuss how your proposed NoSQL database schema would cater to the potential growth of the
organisation (e.g., increased orders, expanding products, additional premises).
o Briefly explain how NoSQL databases typically scale to handle larger datasets and higher volumes of
queries.
5. Conclusion:
o Summarize the key aspects of your NoSQL database design.
o Briefly discuss any limitations or considerations for using a NoSQL database in this scenario.
o Identify key differences in your NoSQL solution and critically compare it with the solution you created
in the SQL database assignment.
3
Deliverables:
2. Python code that you have used to create, populate and query your database as a separate *.py file
Notes
• You code must run as a single Python file (*.py) in Python IDLE. You must hand in this *.py file otherwise you
will score 0.
• You are expected to have comments in the code.
• You must use APA referencing for any blocks of code that are from tutorials etc.
• All results from your code must be included in your document
Assessment Criteria
70%+ will be awarded for:
• Demonstrating in-depth knowledge
• Showing excellent knowledge of the topic area
• Excellent command and understanding of areas covered
• A very sophisticated critical analyses and new insights informing situations.
Answers that fall below the criteria for a pass will receive a failure mark.