Overview
To understand and make use of any database system, you must learn various techniques associated with the fundamental operations of create, read, update, and delete (CRUD). For this assignment, you will begin by creating databases of document collections and performing basic reading or querying operations to retrieve specific documents from the database system. You will also gain practice updating documents and subdocuments, and removing documents from a database. You will use the mongo shell and mongoimport commands to complete this assignment. Note: Since this is the only assignment for Module Two, it is longer than a typical assignment. Be sure to begin working on this early in the week.
Prompt
After completing the textbook reading and reviewing the mongoimport tool documentation in the module resources, complete the following tasks using the mongo shell in Apporto.
1. The data set for this assignment, city_inspections.json, has already been loaded into the Apporto environment for you. Using the mongoimport tool, load the database "city" with documents found in the city inspections.json file into the "inspections" collection. Complete this by typing the following commands in the Linux terminal to perform the import in the right directory:
cd /usr/local/datasets/ #change into the Apporto directory with the data sets mongoimport --db city --collection inspections ./city_inspections.json #mongo import utility
TIP: In any Linux systems, commands must be exact and use proper syntax and case sensitivity.
2. Verify your load by switching to the "city" database and issuing the following queries in the mongo shell:
a. db. inspections.find({"id" : "10021-2015-ENFO"})
b. db. inspections.find({"result": "Out of Business"}, {"business_name":1}). limit(10)
Provide screenshots of the results as evidence.
3. Using the appropriate commands in the mongo shell, insert a document to the database named "city" within the collection named "inspections." Use the following key-value pairs as data for your document.
Key Value
id "20032-2020-ACME"
certificate number 9998888
business name ACME Explosives"
date Today's date
result "Business Padlocked"
sector "Explosive Retail Dealer-999"
address number -> 1721
street-> Boom Road
city -> BRONX
zip -> 10463
Be sure the address is inserted as a sub-document, and use the JavaScript function Date() for "Today's date." Verify your database creation and insertion using the findOne() function in the mongo shell. Provide a screenshot as evidence.
4. Answer the following questions using MongoDB queries.
a. What is the distinct list of inspection "sector in the current inspections collection? How many are in the list? Do not count by hand.
b. What is the difference in the date data type for the business named "AUSTIN 2012" versus your business document insertion of "Acme Explosives"?
c. How many businesses have a "Violation Issued"? (See Value column above).
Verify by providing screenshots of the queries and results as evidence.
5. Using the appropriate command in the mongo shell, update the document with the ID "20032-2020-ACME" in the collection "inspections" in the database "city" with the information below.
Key Value
business_name "New ACME Flowers"
result "Business Re-opened"
comments "Flowers after the explosion"
Verify your database update using the appropriate find() function in the mongo shell. Provide a screenshot as evidence.
6. Using the database "City" with documents found in the "inspections" collection, perform the tasks listed below. Verify by providing screenshots of the results as evidence.
a. Update all the documents that contain the key-value pair "city": "ROSEDALE" in the address subdocument by changing the zip code in the address subdocument to "76114".
b. Remove the first document with the key-value pair "result":"Violation Issued."
Guidelines for Submission
Submit a Word document containing all of your screenshots. Use a screenshot tool, such as the Snipping Tool, for your screenshots and be sure to enlarge the images in the Word document before submitting. This will help make sure that your screenshots are an appropriate size for your instructor to be able to read them. Refer to this Use Snipping Tool to Capture Screenshots guide for help with taking screenshots.

Answers

Answer 1

Answer:

Overview To understand and make use of any database system, you must ... system, you must learn various techniques associated with the fundamental ... you will begin by creating databases of document collections and performing ... You will use the mongo shell and mongoimport commands to complete this assignment.

Explanation:


Related Questions

Suppose data is available for an on-line music distributor. This data includes: song title, artist performing the song, date song purchased, amount charged for the song. Using only the information available in the distributor's data (song title, artist performing, date purchased, amount charged), which of the following can be determined using database or spreadsheet software?

a. The number of songs by a particular artist that were purchased on a given date.
b. The amount of money charged on the first day of any given month.
c. Whether the amount charged is the same for each song title.

Answers

Answer:

The answer is "Option a".

Explanation:

In this question, the only choice "a" is correct because in the question it is declared that it includes: your track title, the performance artist, the date their track is bought, the fee for the track. Its number of music purchased by a given artist on a particular date is based only on details available on the distributor's song title, performing, date purchased, the sum paid.

Which of these is a good thing to consider when naming variables?
The name should be readable and make sense
Keep it short, less typing
Use only letters
O Sentences are Tood variable names.

Answers

Answer:

The name should be readable and make sense

Explanation:

Aside the rules involved in naming variables, there are also some good tips which should be considwred when given names to our variables. These means there are some variables which are acceptable by our program but may be avoided in other to make our codes easier to read by us and others and it also makes debugging easier when we run into errors. Using short variables are acceptable on code writing as far as the rules are followed. However, it is more advisable to use names that are descriptive and readable such that it relates to the program or code being worked on. This ensures that we and others can follow through our lines of code at a much later time without making mistakes or forgetting what the variable stands for.

A database designer wants to create three tables: Supplier, Product, and Country. The Supplier table has a Countryld column with values that must appear in the Country table's Countryld column. The Product table has an auto-increment column.
Which table's CREATE TABLE statement(s) must specify a FOREIGN KEY?
a. Supplier
b. Product
c. Country
d. Supplier and Country

Answers

Answer:

(a) Supplier

Explanation:

In database design, two tables are linked together using a FOREIGN KEY. A foreign key is formed from one or more columns of one table that reference or match another key (often called a primary key) in another table. In other words, when a column or a combination of columns on one table points to a primary key of another table, the column(s) will specify the foreign key.

PS: A primary key is used to make each entry of a table unique.

In the given tables - Supplier, Product, Country -  since the Supplier table has a column called CountryId referencing the CountryId column of the Country table, then CountryId is a primary key in Country table but a foreign key in Supplier table.

Therefore, the CREATE TABLE statement(s) of the Supplier table must specify a foreign key.

A database management system often reads and writes data in a database, and makes sure there is consistency and availability. The supplier table's CREATE TABLE statement(s) must specify a FOREIGN KEY.

The database system often guards data when a lot of transactions is taking place.   it often hinders multiple transactions with the same data at the same time.

The Select SQL statement does not alter any database data. A supplier database is made up of different list of service, product or materials providers who can meet orders quickly.

Learn more from

https://brainly.com/question/15281828

A city planner is using simulation software to study crowd flow out of a large arena after an event has ended. The arena is located in an urban city. Which of the following best describes a limitation of using a simulation for this purpose?
a) The model used by the simulation software cannot be modified once the simulation has been used.
b) The model used by the simulation software often omits details so that it is easier to implement.
c) Running a simulation requires more time to generate data from trials than observing the crowd exiting the arena at various events.
d) Running a simulation requires a large number of observations to be collected before it can be used to explore a problem.

Answers

Answer:

d)

Explanation:

The main limitation of simulations is that running a simulation requires a large number of observations to be collected before it can be used to explore a problem. In a real life situation there are thousands of variables to take into consideration which can drastically affect the way that the situation unfolds at any given time. Therefore, in order to replicate/simulate such a scenario all of these variables need to be taken into consideration. This data can take a large amount of time to observe and collect in order to implement into the simulation so that it provides an accurate depiction of the problem.

I bring my _____ computer to work
a. in box
b. ebook
c. attachment
d.blog.
e. delete
f. document
g. download
h. ebook
I. email address
j. file
k. inbox
l. keyboard
m. laptop
n. link
o. online
p. password
q. sign in​

Answers

Answer:

I think it's laptop or sign in

hope this helps

have a good day :)

Explanation:

Pick which one you think is the best choice

How do I find error corrections in an EAN-8 barcode?

Answers

Answer: I am not sure if I remember but I believe if the single digit matches the last digit on the barcode then the barcode is correct or valid.

But, If the digit is different from the one on your computer then their is an error. I recommend In order to check for error is to remove the received check digit and recalculate it based on the 12-digit identification code. (This I use for EAN-13 but since Ean-8 is basically short version of 13 try it)

Which type of query enables a user to move, append, or update matching records in a table?
action query
select query
static query
parameter query

Answers

Answer:

the query that allows these things is called an action query

Answer:

The answer is A-action query just finshed the review on edg 2021

Explanation:

what is the different between information and data

Answers

Answer:

Information is the act of imparting knowledge and data is the recorded observation that are usually presented in a structured format

An argument does not always have to be made in words. A piece of music
can make an argument; however, the argument is usually a(n)
one.
A. unfocused
B. emotional
C. credible
D. logical

Answers

Answer:

B. emotional

Explanation:

An emotional argument. An argument does not always have to be made in words.

The piece of music that can make an argument is usually an emotional argument. Thus option B is correct.

What is an emotional argument?

An emotional argument is an e that is made in words and expresses its deals in terms of feelings and thoughts. The emotional argument is characterized by the manipulation of the recipient's emotions and has an absence of factual evidence.

Find out more information about the argument.

brainly.com/question/3775579

The probability that the price of a commodity is increasing is 0.62 and the probability that the price is decreasing is 0.18 . What is the probability that the price of the commodity remains constant. Solved numerically​

Answers

bahug ka itlog hduxuwlowv heusuowjdd

(Editing)
So I’m editing some videos for an assignment but the teacher is telling me to trim or splice, what’s the difference between those two?

Answers

Answer:

Cut means to another shot. Or cutting off part of a shot. Trim means to shorten the shot (and there are trim tools.)

Trimming usually refers to taking off either part of the beginning or end of a video clip. Sometimes this is referred to as trimming the top or tail (beginning or end)

Explanation:

~Hope this helps

Code in Python

Write a while loop that prints user_num divided by 2 until user_num is less than 1. The value of user_num changes inside of the loop.

Sample output with input: 20
10.0
5.0
2.5
1.25
0.625


Note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds and report "Program end never reached." The system doesn't print the test case that caused the reported message.

My code, it only passes one test with correct outputs
what am I forgetting?

Answers

You're setting the value of user_num to 20. Doing this won't allow the other test cases to run. Simply delete that line and your code should work. This is the code I wrote:

user_num = int(input())

while user_num>=1:

   user_num/=2

   print(user_num)

I wrote my code in python 3.8. I hope this helps.

In the following cell, we've loaded the text of Pride and Prejudice by Jane Austen, split it into individual words, and stored these words in an array p_and_p_words. Using a for loop, assign longer_than_five to the number of words in the novel that are more than 5 letters long. Hint: You can find the number of letters in a word with the len function.

Answers

Answer:

Explanation:

Since the array is not provided, I created a Python function that takes in the array and loops through it counting all of the words that are longer than 5. Then it returns the variable longer_than_five. To test this function I created an array of words based on the synapse of Pride and Prejudice. The output can be seen in the attached picture below.

def countWords(p_and_p_words):

   longer_than_five = 0

   for word in p_and_p_words:

       if len(word) > 5:

           longer_than_five += 1

   return longer_than_five

2. List the differences between personal
computer operating systems and mainframe
operating systems.

Answers

Explanation:

Mainframes typically run on large boxes with many processors and tons of storage, as well as high-bandwidth busses. PCs are desktop or mobile devices with a single multi-core processor and typically less than 32GB of memory and a few TBs of disk space. Second, a mainframe OS usually supports many simultaneous users.

Assume that Student, Employee and Retired are all extended classes of Person, and all four classes have different implementations of the method getMoney. Consider the following code where_______ indicates the required parameters for the constructors:
Person p = new Person(...);
int m1 = p.getMoney(); // assignment 1
p = new Student(...);
int m2 = p.getMoney(); // assignment 2
if (m2 < 100000)
p = new Employee(...);
else if (m1 > 50000)
p = new Retired(...);
int m3 = p.getMoney(); // assignment 3

Refer to above code The reference to getMoney() in assignment 1 is to the class:________
a. Person
b. Student
c. Employee
d. Retired
e. This cannot be determined by examining the code

Answers

Answer:

a. Person

Explanation:

The reference getMoney() is a method that is part of the Person class. This can be proven with the code since subclasses can access methods from the parent class but a parent class cannot access methods from the child classes. Since Student, Employee, and Retired are all child classes that extend to the Person parent class then they can access getMoney(), but unless getMoney() is in the Person class, then a Person object shouldn't be able to access it. Since the first object created is a Person object and it is accessing the getMoney() method, then we can assume that the getMoney() method is within the Person class.

What does the following code print?
public class { public static void main(String[] args) { int x=5 ,y = 10; if (x>5 && y>=2) System.out.println("Class 1"); else if (x<14 || y>5) System.out.println(" Class 2"); else System.out.println(" Class 3"); }// end of main } // end of class.

Answers

Answer:

It throws an error.

the public class needs a name.

like this:

public class G{ public static void main(String[] args) {

   int x=5 , y = 10;

   if (x>5 && y>=2) System.out.println("Class 1");

   else if (x<14 || y>5) System.out.println(" Class 2");

   else System.out.println(" Class 3"); }// end of main

   }

if you give the class a name and format it, you get:

Class 2

Explanation:

to copy and paste the image in MS Word the dash option is used​

Answers

ur answer hope this will helps u

what is the mean of debugging​

Answers

Answer:

the process of identifying and removing errors from computer hardware or software

Explanation:

Essentially just fixing programming errors, mainly in coding or software

lasses give programmers the ability to define their own types.

a. True
b. False

Answers

Answer:

TRUE.

Explanation:

Does anyone have any tips on what to buy and sell to make quick profits?

Answers

Answer:

lemonaid stand

Explanation:

Answer:

Or you can work in a store like a movie theater or smth

Explanation:

Explain why robots are better at some jobs than human workers are.

Answers

Answer:

Because humans have human minds meaning there are chances of errors, and or mistakes. and they do the same thing over and over with precise precision

Explanation:

hope this helps :)

By the 1970s, the acceleration of airplane travel led to fears that an epidemic would leapfrog the globe much faster than the pandemics of the Middle Ages, fears that were confirmed beginning in the 1970s by the worldwide spread of:________
a. the Zika virus.
b. the HIV infection
c. severe acute respiratory syndrome (SARS)
d. the Asian flu virus
e. Ebola

Answers

Answer:

b. the HIV infection.

Explanation:

Around the 1970s, an increase in the use of airplane travel led to fears that an epidemic would leapfrog the globe much faster than the pandemics such as tuberculosis, leprosy, smallpox, trachoma, anthrax, scabies, etc., that were evident during the Middle Ages, fears that were later confirmed by the worldwide spread of the HIV infection, beginning in the 1970s in the United States of America.

STD is an acronym for sexually transmitted disease and it can be defined as diseases that are easily transmissible or contractable from another person through sexual intercourse. Thus, STD spread from an infected person to an uninfected person while engaging in unprotected sexual intercourse. Some examples of STDs are gonorrhea, chlamydia, syphilis, HIV, etc.

HIV is an acronym for human immunodeficiency virus and it refers to a type of disease that destabilizes or destroy the immune system of a person, thus, making it impossible for antigens to effectively fight pathogens.

Generally, contracting STDs has a detrimental effect to a patient because it causes an opening (break) or sore in the body of the carrier (patient) and as such making them vulnerable to diseases that are spread through bodily fluids e.g human immunodeficiency virus (HIV), Hepatitis, staphylococcus, AIDS, etc.

The color in a circle is a _____________ data type.

Answers

Answer:

b

Explanation:

Therese would now like to preview her slide show to make sure everything is working. She should___.
• switch to Normal slide view
•click on the first slide in the slide pane
• switch to Slide Show view
• click on Slide Show layout in the side pane

Answers

Answer:

c

Explanation:

The program below converts US Dollars to Euros, British Pounds, and Japanese Yen # Complete the functions USD2EUR, USD2GBP, USD2JPY so they all return the correct value def USD2EUR(amount): """ Convert amount from US Dollars to Euros. Use 1 USD = 0.831467 EUR args: amount: US dollar amount (float) returns: value: the equivalent of amount in Euros (float) """ #TODO: Your code goes here value = amount * 0.831467 return value

Answers

Answer:

The program in Python is as follows:

def USD2EUR(amount):

   EUR = 0.831467 * amount

   return EUR

def USD2GBP(amount):

   GBP = 0.71 * amount

   return GBP

def USD2JPY(amount):

   JPY = 109.26 * amount

   return JPY

USD = float(input("USD: "))

print("Euro: ",USD2EUR(USD))

print("GBP: ",USD2GBP(USD))

print("JPY: ",USD2JPY(USD))

Explanation:

This defines the USD2EUR function

def USD2EUR(amount):

This converts USD to Euros

   EUR = 0.831467 * amount

This returns the equivalent amount in EUR

   return EUR

This defines the USD2GBP function

def USD2GBP(amount):

This converts USD to GBP

   GBP = 0.71 * amount

This returns the equivalent amount in GBP

   return GBP

This defines the USD2JPY function

def USD2JPY(amount):

This converts USD to JPY

   JPY = 109.26 * amount

This returns the equivalent amount in JPY

   return JPY

The main begins here

This gets input for USD

USD = float(input("USD: "))

The following passes USD to each of the defined functions

print("Euro: ",USD2EUR(USD))

print("GBP: ",USD2GBP(USD))

print("JPY: ",USD2JPY(USD))

Note the program used current exchange rates for GBP and JPY, as the rates were not provided in the question

10 POINTS!!!!
Which is a virtual meeting place for developers?
O an online help site
O a user manual
O a developer conference
O a developer forum

Answers

Answer:

A Developer Conference

Explanation:

Due to it being a meeting place, a conference has a high probability whereas a forum is not really a "live" meet but whereas a conference is live and virtual in many cases. Cannot guarantee tho.

Suppose that you are asked to modify the Stack class to add a new operation max() that returns the current maximum of the stack comparable objects. Assume that pop and push operations are currently implemented using array a as follows, where item is a String and n is the size of the stack. Note: if x andy are objects of the same type, use x.compareTo(y) to compare the objects x and y public void push String item ) { [n++] = iten; } public String pop { return al--n]; } Implement the max operation in two ways, by writing a new method using array a (in 8.1), or updating push and pop methods to track max as the stack is changed (in 8.2). Q8.1 Implement method maxi 5 Points Write a method max() using Out) space and Oin) running time. public String max() {...} Enter your answer here Q8.2 Update push() and popo 5 Points Write a method max() using On) space and 011) run time. You may update the push and pop methods as needed public void push {...} public String pop() {...} public String max() {...}

Answers

Answer:

Following are the code to the given points:

Explanation:

For point 8.1:

public String max()//defining a method max

{

   String maxVal=null;//defining a string variable that holds a value

   for(int x=0;x<n;x++)

   {

       if(maxVal==null || a[i].compareTo(maxVal)>0)//defining if blok to comare the value

       {

           maxVal=a[i];//holding value in maxVal variable

       }

   }

   return maxVal;//return maxVal variable value

}

For point 8.2:

public void push(String item)//defining a method push that accepts item value in a parameter

{

       a[n]=item;//defining an array to hold item value

       if(n==0 || item.compareTo(maxVals[n-1])>0)//use if to comare item value

       {

               maxVals[n]=item;//holding item value in maxVals variable

       }

       else

       {

               maxVals[n]=maxVals[n-1];//decreasing the maxVals value

       }

       n++;//incrementing n value

}

public String pop()//defining a method pop

{

       return a[--n];//use return value

}

public String max()//defining a method max

{

       return maxVals[n-1];//return max value

}

In the first point, the max method is declared that compares the string and returns its max value.In the second point, the push, pop, and max method are declared that works with their respective names like insert, remove and find max and after that, they return its value.

which one of the following can be used in a Document name,when saving?
1.Numbers
2.Semi-colon
3.Forward dash
4.Question mark​

Answers

Answer:

3. forward dash would you like an explanation?

Only number can be used in a Document name.

File names are shown in alphabetical order in the folder structure. It is critical to also include the zero for numbers 0-9. This helps to maintain the numerical order when file names contain numbers.

Most software packages are case sensitive, so use lowercase wherever possible. Instead of using commas and underscores, use a hyphen.

So, Option "1" is the correct answer to the following question.

Learn more:

https://brainly.com/question/17429689?referrer=searchResults

what is a web client ​

Answers

Answer:

Web client:

it is an application(web browser,program etc ) that requests for service from a web server.

stay safe healthy and happy

Let ∑ = {a,b}, and let L be the language over ∑:
L ={ w € ∑+ |w is even, and w contains at least one a in the first half and exactly one b in the second half }
Give a context-free grammar (CFG) for L, and briefly explain how it works to correctly represent the language. There are no additional requirements for your solution other than what is stated here, except the usual guidance to make sure your answer is clear and understandable and avoids too much unnecessary complexity. In particular, there is no credit for the grammar being unambiguous (if possible.)

Answers

Answer:

Explanation:

From the information given, By applying a CFG for L:

Because each state generates two symbols or null, the length will be equal and even.

1st Condition:

throughout the first half, at least one (a)

2nd:

exactly one (b) within the second half

Dear Student, there is a technical error that occurred when submitting this question. This makes us unable to submit the complete solution to the question but curb that effect, we've attached an image below that shows the complete algorithm and a detailed explanation of the question.

Best Regards.

Other Questions
If anyone knows the answer to this question please help!7th grade math need help asap! giving brainliest!! The National Collegiate Athletic Association (NCAA) requires colleges to report the graduation rates of their athletes. At one large university, 91% of all students who started their studies in 2000-2010 graduated within 6 years. A sports reporter contacted 152 athletes randomly sampled from that same university and time period and found that 132 of them had graduated within 6 years. (a) (5 points) Perform the appropriate hypothesis test to determine whether this is significant evidence that the percentage of athletes who graduate is less than for the student population at large, using the significance level a = 0.05. Remember for state the null and alternative hypotheses, the decision rule, and your conclusion. (b) (3 points) Calculate the P-value for this test. Explain how this P-value can be use to test the hypotheses in part (a). Help pls these are so hard i really need points!!!!!!!!!!!!! Answer all of them please Unit 7 CERUsing your knowledge of chemistry and the information below determine if the unknown compound is covalent or ionic.CaCl2*Make sure to write your answer using complete sentences.*Make sure your answer has a claim whether it is ionic or covalent.*Cite at least 1 piece of evidence and your knowledge of chemistry to back up your claim.*The reasoning or conclusion behind your claim. what is the measure of NEED HELP ASAP! Solve this polynomial equation by rearrranging it in the correct order:23 + 3x2 = 10.21. x = 0, x = -2, x = 51 2. 23 + 3x2 10x = 013. x = 0, 3 2=0, x + 5 = 01 4. x(x 2)(x+5) =15. z (x + 3x 10) = 0 Setting appropriate priorities is part of good management. True False a person deposits rs 55000 in bank p for 2 years at the rate of 10% per annum compounded annually .but after one year , bank has changed the policy and decided to pay semi annual compounded interest at the same rate .what is the percentage difference between the compound interests of the first year and second year Name one of the main physical features of Australia and describe where it is located in the continent? Use the drop-down menus to match the alkanes with the correct name.CH3CH2CH2CH2CH2CH2CH2CH3OCTANECH3CH2CH2CH3BUTANECH4 METHANECH3CH2CH2CH2CH2CH2CH2CH2CH2CH3DECANECH3CH3ENTANEyour welcome 5. Que nmeros va en los espacios en blanco de arriba hacia abajo?Escoge la respuesta correcta.a) 73 - 21- 26 - 10 - 5 b) 77 - 26 - 21 - 10 - 6c) 75 - 21- 36 - 10 - 8 d) 73 - 26 - 10 - 21 - 9 PLEASE HELP! URGENT! HELP order to find the percentage of households in a town that own more than one vehicle, a survey asks 1000 randomly selected drivers at aas station how many vehicles are owned in their household. From the results of the survey, it is reported that 67% of households in the townmave more than one vehicle,Why is this report biased?O A. A random sample was used.O B. The sample size was too small.C. A survey should not have been used.D. Households without a vehicle were not surveyed. help me with this math question please I'm giving away brainliests A soup can has a diameter of 4 inches and the height of the can is 7 inches. Desiree needs to design a label for the soup can. Approximately how many square inches does the label take up? TIME SENSITIVE!!!!!Find the area of the regular 24-gon with radius 11 mm. mm2 (Do not round until the final answer. Then round to the nearest tenth as needed.) Red squirrels usually eat hazelnuts, but due to a reduction in their food source, they had to share resources withsquirrels. The number of red squirrels decreased over time, and gray squirrels gradually replaced the red squirrethey are better adapted to the environment. This is an example of (1 point)O natural selection.O survival of the fittest.O competitive exclusion.O resource partitioning. use circle Cclassify arc NO in circle C A 116 watt LED light bulb has a current of 11 amperes running through it. What is thevoltage in the lightbulb?