Answered step by step
Verified Expert Solution
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},{
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started