Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Translate the following SQL statement to Mongo DB query statements. use animalshelter Insert into dogs (name, age, breed, catFriendly) values (Charlie, 3, corgi, true) Select

Translate the following SQL statement to Mongo DB query statements.

use animalshelter

Insert into dogs (name, age, breed, catFriendly) values (Charlie, 3, corgi, true)

Select * from dogs

Insert into dogs (name, age, breed, catFriendly) values (Wyatt, 14, Golden, true)

Insert into dogs (name, age, breed, catFriendly) values (Tonya, 17, Chihuahua, true)

In one statement

Insert into cats (name, age, breed, dogFriendly) values (Blue Steele, 6, Scottish, false)

Select * from cats

Select * from dogs

Select * from dogs where breed = corgi

Select * from dogs where catFriendly = true

Select * from dogs where age = 99

Select * from dogs where age > 8

Select * from dogs where breed in ('Mutt', Corgi', Chihuahua'

and age < 10

Select * from dogs where catFriendly = true or age <= 2

Update dogs set age = 4 where name = Charlie

Update dogs set age = 5, breed = Lab where name = Charlie

Delete from dogs where isAvailable = true

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Fundamentals Concepts, Drivers & Techniques

Authors: Thomas Erl, Wajid Khattak, Paul Buhler

1st Edition

0134291204, 9780134291208

More Books

Students also viewed these Databases questions

Question

=+5 How does HRM relate to efforts to increase innovation?

Answered: 1 week ago