Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

24. Which of the following is not a valid mongodb statement? a) db.employee find({dno: 8}, {fname:-1,lname:-1,salary:1}).sort({salary:-1}) b) db.employee find({dno: 8},{ _id:0,name:1,salary:1}).sort({salary:1}) c) db.employee find({dno: 8},{

image text in transcribed

24. Which of the following is not a valid mongodb statement? a) db.employee find(\{"dno": 8\}, \{"fname":-1,"lname":-1,"salary":1\}).sort(\{"salary":-1\}) b) db.employee find(\{"dno": 8},{" _id":0,""name":1,"salary":1\}).sort(\{"salary":1\}) c) db.employee find(\{"dno": 8},{" fname":1, "Iname"::1,"dno":1 }).sort( { salary":0 }} d) None of the above 25. Which of the following python mongodb statements is correct? a) db.project list_indexes0 b) db.project listindexes 0 c) db.project. getIndexes 0 d) None of the above 26. Which of the following is not a valid mongodb statement? a) db.employee.createIndex ({"ssn":1}) b) db.department.createIndex(\{"dnumber":1, unique: true }) c) db.project.createIndex ({ pnumber: 1 , Pname: 1}) d) None of the above 27. Which of the following python mongodb statements is correct? a) db.project.delete_many( { "pnumber": null }) b) db.project.delete_many( {" Sor": {" id":\{"\$ne":14, "\$lte":16\}\},\{"price":-2.9\} } ) c) db.project.delete_many ( { "join_date":\{"Sexists":False }}) d) None of the above 28. Which of the following is not a valid mongodb statement? a) db.project.createIndex ( { pnumber: 1, Pname: 1},{ name: "pno_name" }) b) db.project.getIndexes 0 c) db.department.dropManyIndex("dnumber_1","pnumber_1"); d) None of the above 29. Which of the following python mongodb statements is correct? a) db.project.delete_many( [ "plocation": "Stafford", "name":"x"]) b) db.project.delete_many( {" "id":\{"\$ne":13\}\}) c) db.project.delete_many( {" manager": "Mohamed" },{" name":"x" }) d) None of the above 30. Which of the following is not a valid mongodb statement? a) db.project.deleteOne( { "join_date"::\{\$exists:false }}) b) db.sales.deleteMany( { "unique": true }) c) db.project.deleteMany ({" id"::\{Sne:13 }}) d) None of the above 31. Which of the following python mongodb statements is correct? a) db.employee.aggregate( { "\$group" : \{" id" : null, "averageSalary": \{ "\$avg": "\$salary" \} \} \} ]) b) db.employee.aggregate( { "\$group" : \{" id" : None, "averageSalary": \{ "Savg": "Ssalary" \} \} \} ]) 5 c) db.employee. aggregate(I \{ "\$group" : \{"_id" : None, "averageSalary": \{ avg( "\$salary" )\} \} \} ]) d) None of the above

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

Step: 3

blur-text-image

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

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions

Question

Go, do not wait until I come

Answered: 1 week ago

Question

1. Which position would you take?

Answered: 1 week ago