General Flashcards
What is a replica set and what is its purpose?
A replica set is a MongoDB cluster that stores the same data in more than one server and its purpose is to provide redundancy and availability in the event of a server failure
What is a MongoDB cluster?
A MongoDB cluster is a group of MongoDB servers working as a unit
What is MongoDB Atlas and what is its purpose?
MongoDB Atlas is a multi-cloud database platform and its purpose is to simplify deploying and managing databases
How is MongoDB different than MySQL?
- MongoDB is flexible while MySQL is strict
- MongoDB uses collections and BSON documents while MySQL uses tables of rows and columns
What is a document?
A document is a record. It is the basic unit of data in MongoDB
What is a collection?
A collection is a group of documents
What is a database?
A database is a group of collections
What is MongoDB?
MongoDB is a general purpose document database
True or False
Documents in the same collection must have the same field structure and data types
False. Documents in the same collection can have different field structures and data types
What is the difference between BSON and JSON?
BSON is an extension of JSON. BSON supports more data types than JSON
What is BSON?
What is its maximum size?
BSON is a binary-encoded JSON object. It’s maximum size is 16 MB
True or False
MongoDB documents are displayed in JSON and stored as BSON
True
True or False
Documents do not require an _id
field
False. All documents require an _id
field. In fact, if a document is inserted without an _id
field, MongoDB will automatically create an ObjectId
instance for that field
What is the definition of “schema”
Schema is equivalent to “data model”
What feature can be used to put constraints on a flexible schema?
MongoDB schema validation