CRUD Flashcards

1
Q

Write command to add record {"name": Max} to collection coll

A
db.coll.insertOne({name: "Max"})
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Write command to add ordered bulk of records:
- {"name": Max}
- {"name": Alex}

to collection coll

A
db.coll.insertMany([
   {name: "Max"}, 
   {name:"Alex"}
])

or
~~~
db.coll.insertMany([
{name: “Max”},
{name:”Alex”}
], {ordered: true})
~~~

ordered bulk insert

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