0% found this document useful (0 votes)
7 views19 pages

Manage Data Persistence Using noSQL Data Stores

The document outlines a series of quizzes and assignments related to NoSQL systems, including defining client requirements, comparing NoSQL with RDBMS, and creating document schemas. It also involves practical tasks such as importing data into MongoDB, configuring indexes, and developing a PHP website to interact with a MongoDB database. The document emphasizes the importance of original work and prohibits the use of AI-generated content.

Uploaded by

billpretor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views19 pages

Manage Data Persistence Using noSQL Data Stores

The document outlines a series of quizzes and assignments related to NoSQL systems, including defining client requirements, comparing NoSQL with RDBMS, and creating document schemas. It also involves practical tasks such as importing data into MongoDB, configuring indexes, and developing a PHP website to interact with a MongoDB database. The document emphasizes the importance of original work and prohibits the use of AI-generated content.

Uploaded by

billpretor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

1.

Review and select noSQL options Quiz


The answer should be written by yourself (AI-generated answers will not accepted)!

Question 1

Define the requirements that a client would need to meet that ensure that they would require a
NoSQL system.

Provide 2 examples of current applications using NoSQL.

Submission:
<Client requirements for NoSQL>
<Example 1>
<Example 2>

Answer:

Question 2

Review the following Case scenario:


Company X is an online platform that allows people to rent short term accommodation.
This ranges from regular people with a spare bedroom, to property management firms who
lease multiple rentals.
Elements of Note:
● The company expects to expand quickly
● The company is geographically global

Research and describe in your own words the benefits and relevance of horizontal scaling
compared against the case study.
Be detailed in how you believe scaling will be implemented.
Submission:
<Benefits of horizontal scaling vs vertical scaling>
<How the company would implement NoSQL>

Answer:
Question 3

Research and compare RDBMS against NoSQL. Provide and describe 4 differnces.
Submission:
<Name>
<Description>
<Example>
Answer:

Question 4

Select and describe 4 different NoSQL vendors.


Submission:
<Name>
<Website>
<Data Storage options>
<Pros and cons>
<Your opinion of the system.>

Question 5

I have not used any artificial intelligence tool or service to generate or assist me in writing any
part of my assignments. If you use AI as a research tool, such as a book or website, you may
select true. Ensure you are not copy/pasting any AI response.

Answer:
True
False
2. Determine and create storage of data
types Quiz
The answer should be written by yourself (AI-generated answers will not accepted)!

Question 6

Create a document schema for the following situation:


A school is looking to implement a NoSQL system and have come to you to design it, they
require the following information to be stored:
● Staff members
○ Name, email, phone, classes teaching
● Students
○ Name, email, attending which classes, grades
● Classes – classes run over a 5-month period, the year is split into 2 semesters, i.e.,
○ Semester 1: English, Maths, Social Science, Art
○ Semester 2: Science, Physical Education, Computer Science
● Grades – 4 assessments per class per semester

Insert your document schema into a MongoDB, show the database you create, show the
collections being used and some data within each collection.
Show your work through Command line (Terminal)
Submission: – a word document named <your name>-3.1.docx
Containing:
● A professional templated word document with
○ Cover Page
○ Executive Summary
○ Schema
○ Schema shown working in MongoDB (Include screenshots)

Answer:
Question 7

Describe in your own words the types of NoSQL data stores and provide two core
components that make NoSQL databases viable in today’s data gathering world.
Submission:
<Types of NoSQL name>
<Components of NoSQL>

Answer:

Question 8

Review the following schema:


{
"_id": {"$oid": "5553a998e4b02cf7151190b9"},"st": "x+45200-066500","ts": {"$date":
"1984-03-05T14:00:00Z"},"position": {"type": "Point","coordinates": [-66.5,45.2]},"elevation":
9999, "callLetters": "VC81","qualityControlProcess": "V020","dataSource": "4", "type": "FM-13",
"airTemperature": {"value": -4.7,"quality": "1"},
"dewPoint": {"value": 999.9,"quality": "9"},
"pressure": {"value": 1025.9,"quality": "1"},
"wind": {"direction": {"angle": 999,"quality": "9"},
"type": "9",
"speed": {"rate": 999.9,"quality": "9"}},
"visibility": {"distance": {"value": 999999,"quality": "9"},
"variability": {"value": "N","quality": "9"}},
"skyCondition": {"ceilingHeight": {"value": 99999,"quality": "9","determination": "9"},
"cavok": "N"},
"sections": ["AG1"],
"precipitationEstimatedObservation": {"discrepancy": "2","estimatedWaterDepth": 999}
}
Aside from _id, select and define a key value pair within the document that could be used for
a partition key, then describe the key type.
Submission:
<New ID field>
<Key type>
<Reasons as to why this was selected>

Answer:

Question 9

Describe in your own words the challenges a mobile developer must face when dealing with
roaming data.
Using the NoSQL system of MongoDB, what is the default partition key.
Submission:
<Summary of Mobile environment>
<Challenges of Mobile Environment>
<What is the default partition key in MongoDB>

Answer:

Question 10

I have not used any artificial intelligence tool or service to generate or assist me in writing any
part of my assignments. If you use AI as a research tool, such as a book or website, you may
select true. Ensure you are not copy/pasting any AI response.

Answer:
True
False
Question 11

Create and screen record your presenting TTL working in MongoDB.

A business has contacted you and wishes to see an example of a database that can clear
itself of specific data. You are to do the following:
● Create a new database called transactions.
● Create a collection called items with 10 items of your choice
● Apply an TTL to an index within your items collection of 10 seconds.

Create a video recording of this.


In your video you must
● Describe the following verbally
● Use the command line for all interactions
● Create the database
● Create the collection
● Add the items
● Show the items
● Configure the TTL
● Show that the items get removed.

Submission: an MP4 named <name>4.6.mp4


Your screen recording. – The presentation is created, on the screen.
Use handbrake (handbrake.fr) to optimise your video 720p very fast preset videos should be
under 50Mb, and no longer than 10 minutes. Use OBS (https://obsproject.com/) to record
your screen.
Ensure you check your video for picture quality and audio quality before submission

Answer:
Question 12

I have not used any artificial intelligence tool or service to generate or assist me in writing any
part of my assignments. If you use AI as a research tool, such as a book or website, you may
select true. Ensure you are not copy/pasting any AI response.

Answer:
True
False

3. Build and configure indexes Quiz


The answer should be written by yourself (AI-generated answers will not accepted)!

Question 13

Import the spells_2.json file into a mongo server - Located in the data.zip
From the terminal
.\mongoimport --jsonArray --port 27017 --db dnd --collection spells --file
c:\data\spells_2.json

A company is reviewing Dungeons and Dragons as a method for online revenue, one of the
primary requirements is player creation. As part of player creation there are spell characters.
The client has asked you to test and examine the spells_2.json file to determine valid sort
keys.
Review the schema and determine a sort key.
Include screenshots
Submission: – a word document named <your name>-4.1.docx
Containing:
● A professional templated word document with
○ Cover Page
○ Executive summary
○ Schema
○ Relevant Key(s) and why

Answer:
Question 14

Using the dnd/spells collection created in Q13.


Calculate the IOPS for the following scenario:
● 2 indexes on the collection spells
● Determine IOPS for a single transaction of each CRUD function
● Current usage – 10,000 end users, 50 admin
○ Users (Read and create their own link to a spell)
■ R ~550ps C~400ps U~100ps D~4ps
○ Admin (Create, Read, Update and Delete spells)
■ R~200ps C~3ps U~2ps D~1ps

Determine the Following:


● Second, minute and hourly IOPS of the system
● HDD requirements IOPS and type

Show the stats of the database.


Submission:
<Calculation for IOPS>
<Final result>

Answer:

Question 15

Using the dnd/spells collection created in Q13.


The client has noticed that the end users are always searching the database by spell school.
They want you to improve the return results for the end users.
You are to document with images per step:
● Current indexes
● Addition of index
● Updated indexes
● A search off the index
● Proof that the search used the newly created index.
Submission: – a word document named <your name>-4.3.docx
Containing:
● A professional templated word document with
○ Cover Page
○ Current indexex
○ Addition of indexes
○ Searches showing new indexes were used

Answer:

Question 16

Using the dnd/spells collection created in Q13.


The client has noticed that the changes performed by the creation of the index has
improved user retention, as such they have asked you to create additional indexes in the
following areas:
● Level
● Ritual
● Name

You are to document with screenshots:


● Current indexes
● Addition of indexes
● Updated indexes
● A search off the new indexes
● Proof that the search used the newly created index.

Submission: – a word document named <your name>-4.4.docx


Containing:
● A professional templated word document with
○ Cover Page
○ Current indexes
○ New indexes
○ Searches off new indexes

Answer:
Question 17
Using the dnd/spells collection created in Q13.
The client has noticed that the changes performed by the creation of the index has
improved user retention, but they request that you optimise some of the queries, they have
mention that level and school are frequently searched.
Remove the current the current level and schools indexes and create an index that
combines level and school in ascending order, perform a search and confirm that the
content is returned using the correct index.
Once you have done this you are to modify the search result using projections to reduce the
returned result to the following fields:
● Name
● Level
● School
● Classes

You are to document with screenshots:


● Current indexes
● Removal of indexes
● Updated indexes
● Addition of indexes
● Updated indexes
● A search off the new indexes
● Proof that the search used the newly created index.
● Modified search showing only relevant information

Submission: – a word document named <your name>-4.5.docx


Containing:
● A professional templated word document with
○ Cover Page
○ Current indexes
○ Removal of indexes
○ Updated indexes
○ Addition of indexes
○ Updated indexes
○ A search off the new indexes
○ Proof that the search used the newly created index.
○ Modified search showing only relevant information

Answer:
Question 18
Create a screen record video of you presenting TTL working in MongoDB.
A business has contacted you and wishes to see an example of a database that can clear
itself of specific data. You are to do the following:
● Create a new database called transactions.
● Create a collection called items with 10 items of your choice
● Apply an TTL to an index within your items collection of 10 seconds.

Create a video recording of this.


In your video, you must
● Describe the following verbally
● Use the command line for all interactions
● Create the database
● Create the collection
● Add the items
● Show the items
● Configure the TTL
● Show that the items get removed.

Submission: an MP4 named <your-name>4.6.mp4


Your video recording. – Your face must be shown as well as the presentation created, both
on the screen at the same time.
Use handbrake (handbrake.fr) to optimize your video 720p very fast preset videos should be
under 50Mb, and no longer than 10 minutes. Use OBS (https://obsproject.com/) to record
your screen and web camera
Ensure you check your video for picture quality and audio quality before submission
Answer:

Question 19

I have not used any artificial intelligence tool or service to generate or assist me in writing any
part of my assignments. If you use AI as a research tool, such as a book or website, you may
select true. Ensure you are not copy/pasting any AI response.

Answer:
True
False
4. Use queries and retrieve objects Quiz
The answer should be written by yourself (AI-generated answers will not accepted)!

Question 20
Define in your own words the four different types of APIs that can be used for connecting
technology with NoSQL systems.
Submission:
<Name>
<Description>
Answer:

Question 21
Create a php website that will connect to the mongo server containing the dnd database
and spells collection.
It is to have two pages for viewing, linked through a basic navigation
● An index page with the connection established
● A phpinfo page, showing the php info of your system and that mongo is installed.

Create– a word document named <your name>-5.2.docx


Containing:
● A professional templated word document with
○ Cover Page
○ Your php.ini extensions area
○ Your php/ext folder showing the mongo dll
○ Screenshots of connection

Submission: – a zip file named <your name>-5.2.zip


Containing:
● Your documentation
● Your website

Answer:
Question 22
In this quiz you will modify the website that you have previously created to enable the
addition of users to the system.
To start with go into mongosh of the dnd database, create a collection called users, create
the first document as Name:Gandalf The Grey.
Create php web pages to insert names into that collection.
Add the following names:
● Merlin
● Harry Potter

Confirm that the information has been entered into the database by showing the list of
names from the mongo terminal.
Create – a word document named <your name>-5.3.docx
Containing:
● A professional templated word document with
○ Cover Page
○ Description and screenshots of the website per action
○ Description and screenshots of the database per action

Submission: – a zip file named <your name>-5.3.zip


Containing:
● Your documentation
● Your website

Answer:
Question 23
Modify the website that you have started. To enable the addition of users to the system.
Create php web pages to insert the following data into the users collection.
Add the following names:
● Dr Strange, marvel universe, first appearance 1963
● Willow Rosenburg, buffy universe, first appearance 1997
Confirm that the information has been entered into the database by showing the list of
names from the mongo terminal.
Create – a word document named <your name>-5.4.docx
Containing:
● A professional templated word document with
○ Cover Page
○ Description and screenshots of the website per action
○ Description and screenshots of the database per action

Submission: – a zip file named <your name>-5.4.zip


Containing:
● Your documentation
● Your website

Answer:

Question 24
Modify the website that you have started. (Question 13)
Create php web pages to allow the end user to view spell names from the dnd spell
collection.
● Make the list viewable.
● Hint – make the object an array to be able to read information.
Create – a word document named <your name>-5.5.docx
Containing:
● A professional templated word document with
○ Cover Page
○ Description and screenshots of the website per action
○ Description and screenshots of the database per action
Submission: – a zip file named <your name>-5.5.zip
Containing:
● Your documentation
● Your website

Answer:
5. Confirm interaction of objects Quiz
The answer should be written by yourself (AI-generated answers will not accepted)!

Question 25

Modify the PHP-MongoDB website that you worked on in Assessment 4


Create php web pages to allow the end user to delete an entire document from the system.
From here, apply the changes to the dnd.users collection..
● Supply a list of elements that can be deleted
● Delete upon end user request

Create – a word document named <your name>-6.1.docx


Containing:
● A professional templated word document with
○ Cover Page
○ Description and screenshots of the website per action
○ Description and screenshots of the database per action

Submission: – a zip file named <your name>-6.1.zip


Containing:
● Your documentation
● Your website

Answer:

Question 26

Modify the PHP-MongoDB website that you have started in previous assessments.
From here, create php web pages to allow the end user to update an entire document from
the system. From here, apply the changes to the dnd.users collection..
● Supply a list of elements that can be updated
● Allow for each document to have every object updated.

Create – a word document named <your name>-6.2.docx


Containing:
● A professional templated word document with
○ Cover Page
○ Description and screenshots of the website per action
○ Description and screenshots of the database per action

Submission: – a zip file named <your name>-6.2.zip


Containing:
● Your documentation
● Your website

Answer:

Question 27

Describe in your own words the importance of persistent data.


Describe how this can be implemented in a MongoDB system.
Submission:
<Definition of persistent data>
<Importance of persistent data>
<Implementation of persistent data in MongoDB>

Answer:

Question 28

Create a 3-server replication set. Name each server:


● Yourname_64_1
● Yourname_64_2
● Yourname_64_3

On the primary server add a database called:


● Music

Add a collection called songs, with the following data:


● Europe, It’s the final countdown
● Poison, Unskinny bop
● Warrant, Cherry Pie
● Van Halen, Dreams
● Stray kids, Manic
● The Hu, Wolf Totem
Confirm that once the collection has been created on the primary, an event has been
triggered and the data replicated on both secondary servers. Confirm aerver status with
rs.isMaster()
Submission: – a word document named <your name>-6.4.docx
Containing:
● A professional templated word document with
○ Cover Page
○ Server configs - Description and screenshots
○ Creation of data - Description and screenshots
○ Confirmation of Primary server - Description and screenshots
○ Confirmation of Secondary servers - Description and screenshots
○ Confirmation of replication to secondarys - Description and screenshots

Answer:

Question 29

Using the previously created replication set from 6.4 we will need to break the replication
and fix it.
Assuming Yourname_64_1 is your primary, go into each other secondary and shut down the
servers. From here you should see your primary server demote itself to a secondary until we
can add another server into the replica set.
From here create a new server:
● Yourname_65_1
Add this server to the replica set, determine which is primary and view is there was an event
trigger to synchronise the collection on the database servers. Once done, bring back your
original secondaries, confirm the collection is still on all machines and with the primary able
to do a document search.
Use the rs.isMaster() command to show the status of each server and the replication set.
Submission: – a word document named <your name>-6.5.docx
Containing:
● A professional templated word document with
○ Cover Page
○ Step by step documentation of actions - description and screenshot
■ Servers running
■ Secondaries removed
■ Primary self-demotion
■ Addition of new server
■ New primary exists
■ Replication of data
■ Return of original secondaries.

Answer:
Question 30

Preliminary Setup:
Create a new mongo server: Yourname_66
Add a database called marvel
Add a collection users with the following raw data:
● Name: Steve, Password password

Create a set of web pages that link to site and can show the content of the users collection.
Create a screen record video of you presenting
Apply authentication to the database, show that the authentication is working.
● A non-authenticated user will not be able to use show dbs or show collections

Once you have shown both non-authenticated and authenticated through the mongo shell,
check your website. The website will now need to be modified to include authentication.
Once done, create a web page to show the insertion of a new user with encrypted
passwords.
You can show the encryption either on the web page or through the mongosh.
In summary:
● A short video of you showing and verbally describing
○ the website working and encrypting content.
○ Showing authenticated and non-authenticated access to the data from the
website and mongosh
○ Show your servers configuration file

Submission an MP4 named <your-name>6.6.mp4


Your video recording. – Your presentation created by your screen
Use handbrake (handbrake.fr) to optimise your video 720p very fast preset videos should be
under 50Mb, and no longer than 10 minutes. Use OBS (https://obsproject.com/) to record
your screen and web camera
Ensure you check your video for picture quality and audio quality before submission

Answer:
Question 31
Describe in your own words, The following:
● The process of creating a replication set and its ability to promote data persistence.
● The process of confirming data persistence and the steps needed to fix a broken
replication set, assume 3 nodes with the primary node going down.

Submission: – a word document named <your name>-6.7.docx


Containing:
● A professional templated word document with
○ Cover Page
○ Creating a replication
○ Confirming data persistence
○ Steps needed to fix a broken replication

Note: use images as required to assist with the required information.


Answer:

Question 32

I have not used any artificial intelligence tool or service to generate or assist me in writing any
part of my assignments. If you use AI as a research tool, such as a book or website, you may
select true. Ensure you are not copy/pasting any AI response.

Answer:
True
False

You might also like