Mongo DB 6 Flashcards

1
Q

Which command is used to create a new MongoDB database?
A. new db
B. create db
C. use mydb
D. db.create()

A

C. use mydb

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

How do you insert a single document into MongoDB?
A. insertOne()
B. put()
C. insert()
D. addDocument()

A

A. insertOne()

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

Which MongoDB command removes all documents from a collection?
A. db.removeAll()
B. db.clear()
C. db.q.deleteMany({})
D. db.dropAll()

A

C. db.q.deleteMany({})

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

What is the equivalent of a SQL table in MongoDB?
A. Database
B. Row
C. Collection
D. Schema

A

C. Collection

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

Which command in MongoDB selects all documents?
A. db.q.findAll()
B. db.q.selectAll()
C. db.q.find()
D. db.q.get()

A

C. db.q.find()

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

In MongoDB, what does $regex operator do?
A. Sort
B. Count
C. Pattern match
D. Group

A

C. Pattern match

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

Which field is automatically used as a primary key in MongoDB?
A. id
B. key
C. _id
D. pk

A

C. _id

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

Which operation in MongoDB is equivalent to SQL GROUP BY?
A. $group
B. $sum
C. $match
D. $join

A

A. $group

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

What does the MongoDB $lookup operator perform?
A. Sorting
B. Indexing
C. Joins
D. Projection

A

C. Joins

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

How do you replace a document in MongoDB?
A. updateMany()
B. replaceOne()
C. insert()
D. deleteOne()

A

B. replaceOne()

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

What is Big Data?
A. Small structured data
B. Data stored in RAM
C. Voluminous and complex data
D. Tabular data

A

C. Voluminous and complex data

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

Which of the following is NOT one of the 4 V’s of Big Data?
A. Volume
B. Variety
C. Value
D. Variance

A

D. Variance

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

Which NoSQL database type uses JSON-like structure?
A. Key-Value
B. Graph
C. Document
D. Column

A

C. Document

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

Which storage type is optimized for analytics?
A. Row-oriented
B. Columnar
C. Relational
D. Object

A

B. Columnar

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

What does ACID stand for in databases?
A. Atomicity, Consistency, Isolation, Durability
B. Analytics, Control, Isolation, Durability
C. Aggregation, Configuration, Integrity, Data
D. Access, Consistency, Info, Duration

A

A. Atomicity, Consistency, Isolation, Durability

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

Which NoSQL type models data using edges and nodes?
A. Document
B. Graph
C. Column
D. Key-Value

A

B. Graph

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

Which system is an example of a NewSQL database?
A. MongoDB
B. SAP HANA
C. Redis
D. Cassandra

A

B. SAP HANA

18
Q

What is the main advantage of in-memory databases?
A. Low disk usage
B. Speed
C. Better storage
D. Backup capability

19
Q

What is the CAP theorem?
A. Theory of relational DB
B. Storage optimization
C. Trade-off between Consistency, Availability, and Partition Tolerance
D. NoSQL versioning rule

A

C. Trade-off between Consistency, Availability, and Partition Tolerance

20
Q

Which of the following describes BASE in NoSQL?
A. Basic Atomic Schema Extension
B. Basically Available, Soft state, Eventual consistency
C. Binary Abstract Storage Engine
D. Best Approximate Structural Efficiency

A

B. Basically Available, Soft state, Eventual consistency

21
Q

Which command is used to create a new MongoDB database (variant)?
A. new db
B. create db
C. use mydb
D. db.create()

A

C. use mydb

22
Q

How do you insert a single document into MongoDB (variant)?
A. insertOne()
B. put()
C. insert()
D. addDocument()

A

A. insertOne()

23
Q

Which MongoDB command removes all documents from a collection (variant)?
A. db.removeAll()
B. db.clear()
C. db.q.deleteMany({})
D. db.dropAll()

A

C. db.q.deleteMany({})

24
Q

What is the equivalent of a SQL table in MongoDB (variant)?
A. Database
B. Row
C. Collection
D. Schema

A

C. Collection

25
Q

Which command in MongoDB selects all documents (variant)?
A. db.q.findAll()
B. db.q.selectAll()
C. db.q.find()
D. db.q.get()

A

C. db.q.find()

26
Q

In MongoDB, what does $regex operator do (variant)?
A. Sort
B. Count
C. Pattern match
D. Group

A

C. Pattern match

27
Q

Which field is automatically used as a primary key in MongoDB (variant)?
A. id
B. key
C. _id
D. pk

28
Q

Which operation in MongoDB is equivalent to SQL GROUP BY (variant)?
A. $group
B. $sum
C. $match
D. $join

29
Q

What does the MongoDB $lookup operator perform (variant)?
A. Sorting
B. Indexing
C. Joins
D. Projection

30
Q

How do you replace a document in MongoDB (variant)?
A. updateMany()
B. replaceOne()
C. insert()
D. deleteOne()

A

B. replaceOne()

31
Q

What is Big Data (variant)?
A. Small structured data
B. Data stored in RAM
C. Voluminous and complex data
D. Tabular data

A

C. Voluminous and complex data

32
Q

Which of the following is NOT one of the 4 V’s of Big Data (variant)?
A. Volume
B. Variety
C. Value
D. Variance

A

D. Variance

33
Q

Which NoSQL database type uses JSON-like structure (variant)?
A. Key-Value
B. Graph
C. Document
D. Column

A

C. Document

34
Q

Which storage type is optimized for analytics (variant)?
A. Row-oriented
B. Columnar
C. Relational
D. Object

A

B. Columnar

35
Q

What does ACID stand for in databases (variant)?
A. Atomicity, Consistency, Isolation, Durability
B. Analytics, Control, Isolation, Durability
C. Aggregation, Configuration, Integrity, Data
D. Access, Consistency, Info, Duration

A

A. Atomicity, Consistency, Isolation, Durability

36
Q

Which NoSQL type models data using edges and nodes (variant)?
A. Document
B. Graph
C. Column
D. Key-Value

37
Q

Which system is an example of a NewSQL database (variant)?
A. MongoDB
B. SAP HANA
C. Redis
D. Cassandra

A

B. SAP HANA

38
Q

What is the main advantage of in-memory databases (variant)?
A. Low disk usage
B. Speed
C. Better storage
D. Backup capability

39
Q

What is the CAP theorem (variant)?
A. Theory of relational DB
B. Storage optimization
C. Trade-off between Consistency, Availability, and Partition Tolerance
D. NoSQL versioning rule

A

C. Trade-off between Consistency, Availability, and Partition Tolerance

40
Q

Which of the following describes BASE in NoSQL (variant)?
A. Basic Atomic Schema Extension
B. Basically Available, Soft state, Eventual consistency
C. Binary Abstract Storage Engine
D. Best Approximate Structural Efficiency

A

B. Basically Available, Soft state, Eventual consistency