General Commands Flashcards

1
Q

List commands that can be run when NOT connected to a DB

A

help

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Show databases

A

show dbs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Show current database name

A

db

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Switch to database

A

use dbName

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Show collections within database

A

show collections

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

List commands that can be run on current DB

A

db.help()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

List commands that can be run on collection

A

db.collection.help()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Writing a method with invoking it does what?

A

Returns the actual source code of the function, so you can see how it works.

Example

db.name.find

How well did you know this?
1
Not at all
2
3
4
5
Perfectly