Unit 1: Introduction to NoSQL and MongoDB - Practice Quiz

CSE494 — Intelligent Nosql Databases 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What does the term NoSQL commonly mean?

Introduction to NoSQL Databases Easy
A. Network-only SQL
B. New object SQL
C. No structured queries
D. Not only SQL

2 Which feature is commonly associated with NoSQL databases?

Introduction to NoSQL Databases Easy
A. Mandatory table joins
B. Fixed row structures
C. Flexible data schemas
D. Single-server operation

3 How is data primarily organized in a traditional SQL database?

Comparison: SQL vs. NoSQL Easy
A. Vertices with edges
B. Tables with rows
C. Documents with fields
D. Pairs with values

4 Which scaling approach is commonly associated with NoSQL databases?

Comparison: SQL vs. NoSQL Easy
A. Offline scaling
B. Manual scaling
C. Vertical scaling
D. Horizontal scaling

5 What type of database is MongoDB?

Overview of MongoDB Easy
A. Document database
B. Time-series database
C. Graph database
D. Relational database

6 Which format does MongoDB use internally to store documents?

Overview of MongoDB Easy
A. YAML
B. XML
C. BSON
D. CSV

7 What does the letter C represent in the CAP theorem?

CAP Theorem and its trade-offs Easy
A. Consistency
B. Connectivity
C. Compression
D. Concurrency

8 What does partition tolerance mean in the CAP theorem?

CAP Theorem and its trade-offs Easy
A. Operating despite network failures
B. Preventing all duplicate records
C. Storing data in one location
D. Completing every query instantly

9 How does a key-value database primarily store data?

Key-value databases Easy
A. As columns and formulas
B. As rows and joins
C. As nodes and edges
D. As key-value pairs

10 Which operation is fundamental to retrieving data from a key-value database?

Key-value databases Easy
A. Looking up a key
B. Grouping several columns
C. Traversing an edge
D. Joining two tables

11 How does a column-oriented database primarily organize data?

Column-oriented databases Easy
A. By columns
B. By documents
C. By objects
D. By graphs

12 Which workload commonly benefits from column-oriented storage?

Column-oriented databases Easy
A. Image editing
B. File compression
C. Graph traversal
D. Analytical queries

13 What is the basic data unit in a document database?

Document databases Easy
A. Document
B. Table
C. Cell
D. Edge

14 What is a group of MongoDB documents called?

Document databases Easy
A. Collection
B. Vertex
C. Relation
D. Worksheet

15 Which elements are central to a graph database?

Graph databases Easy
A. Rows and columns
B. Files and folders
C. Keys and values
D. Nodes and edges

16 What is the main purpose of a MongoDB replica set?

MongoDB Architecture Easy
A. Creating relational joins
B. Converting BSON to XML
C. Providing data redundancy
D. Designing user interfaces

17 What is sharding in MongoDB?

MongoDB Architecture Easy
A. Removing indexes from documents
B. Combining collections into tables
C. Encrypting data before storage
D. Distributing data across servers

18 What is MongoDB Community Edition?

Installing MongoDB Community Edition Easy
A. A paid visualization service
B. A relational database extension
C. A cloud-only backup tool
D. A free MongoDB distribution

19 Which MongoDB tool provides a graphical interface for exploring data?

Introduction to MongoDB Shell and Compass Easy
A. MongoDB Compass
B. MongoDB Server
C. MongoDB Shell
D. MongoDB Driver

20 What is MongoDB Atlas?

MongoDB Atlas Cloud Overview Easy
A. A desktop operating system
B. A document conversion format
C. A managed cloud database service
D. A local command-line interface

21 An online platform stores user profiles whose attributes vary significantly between users and change frequently. Why might a NoSQL database be suitable for this workload?

Introduction to NoSQL Databases Medium
A. It guarantees stronger consistency than every SQL database
B. It supports flexible schemas for evolving records
C. It automatically normalizes data into related tables
D. It requires every record to share identical columns

22 A web service must distribute a rapidly growing dataset across several commodity servers. Which NoSQL capability most directly supports this requirement?

Introduction to NoSQL Databases Medium
A. Vertical scaling through faster processors
B. Horizontal scaling through data partitioning
C. Serialization through stored procedures
D. Normalization through foreign-key constraints

23 A banking system processes transfers that must update several related accounts atomically and enforce strict relational constraints. Which database approach is generally the most natural fit?

Comparison: SQL vs. NoSQL Medium
A. A graph database with eventually consistent edges
B. A document database without transaction controls
C. A key-value database with independent item writes
D. A relational SQL database with ACID transactions

24 An application repeatedly reads complete customer profiles, including addresses and preferences, but rarely queries those components independently. Which design is most appropriate?

Comparison: SQL vs. NoSQL Medium
A. Normalize every attribute into a separate table
B. Store each profile as one embedded document
C. Represent every attribute as a graph vertex
D. Store each field on an unrelated database server

25 A MongoDB collection contains product documents with different optional specifications. What happens when a new document includes a field that earlier documents do not have?

Overview of MongoDB Medium
A. MongoDB can store it without altering every document
B. MongoDB moves the document into another collection
C. MongoDB adds the field with null to every document
D. MongoDB rejects it until the collection is recreated

26 In a MongoDB document, which field serves as the required unique identifier within a collection?

Overview of MongoDB Medium
A. The _key field
B. The _index field
C. The _pk field
D. The _id field

27 During a network partition, a distributed database rejects some requests rather than return potentially inconsistent data. Which CAP properties is it prioritizing?

CAP Theorem and its trade-offs Medium
A. Availability and partition tolerance
B. Consistency and unrestricted availability
C. Availability and single-node durability
D. Consistency and partition tolerance

28 A distributed shopping-cart service continues accepting updates on both sides of a network partition and reconciles conflicts later. Which CAP trade-off does this behavior represent?

CAP Theorem and its trade-offs Medium
A. Availability and partition tolerance over immediate consistency
B. Consistency and partition tolerance over request availability
C. Consistency and availability without partition tolerance
D. Durability and isolation over horizontal scalability

29 A gaming service must retrieve a player's session using a unique session token, with no need to query fields inside the session value. Which database model best matches this access pattern?

Key-value databases Medium
A. A graph database
B. A column-oriented database
C. A relational database
D. A key-value database

30 Why is a key-value database usually inefficient for finding all stored values whose internal city field equals Pune?

Key-value databases Medium
A. Values must always be numeric scalar values
B. Records must be joined before fields are searched
C. Keys cannot contain letters or special characters
D. Values are primarily accessed through their keys

31 An analytics query calculates the average salary from a table containing hundreds of columns but millions of rows. Why can column-oriented storage improve this query?

Column-oriented databases Medium
A. It follows graph edges between salary values
B. It stores every employee as one binary document
C. It duplicates every row across all available nodes
D. It reads mainly the salary column from storage

32 Which workload is generally the best match for a column-oriented database?

Column-oriented databases Medium
A. Updating one shopping cart by a known token
B. Traversing several levels of social relationships
C. Aggregating selected metrics across billions of events
D. Loading complete records for individual user sessions

33 An order and its line items are normally created, retrieved, and deleted together. In a document database, which model is typically most appropriate?

Document databases Medium
A. Create a graph vertex for every item property
B. Embed the line items inside the order document
C. Place each item attribute in a separate collection
D. Store each line item under an unrelated random key

34 A publisher document refers to thousands of books, and each book is frequently queried and updated independently. Which document-modeling choice is most suitable?

Document databases Medium
A. Represent book fields as fixed relational columns
B. Store all books as one serialized string value
C. Embed every book inside the publisher document
D. Store books separately and reference the publisher

35 A fraud-detection system must identify accounts connected through up to four layers of shared devices and transactions. Why is a graph database appropriate?

Graph databases Medium
A. It retrieves every entity using only one fixed key
B. It guarantees that all entities use an identical schema
C. It efficiently traverses relationships between connected entities
D. It stores each property in a separate compressed column

36 In a MongoDB replica set, the current primary becomes unavailable. What is the expected response when a majority of voting members can still communicate?

MongoDB Architecture Medium
A. The config server becomes the permanent primary
B. Every secondary immediately accepts conflicting writes
C. The application must rebuild all indexes manually
D. An eligible secondary can be elected as primary

37 In a sharded MongoDB deployment, which component routes a client query to the appropriate shard or shards?

MongoDB Architecture Medium
A. The mongos query router
B. The MongoDB Compass client
C. The mongod storage journal
D. The replica-set arbiter

38 After installing MongoDB Community Edition, a developer can launch mongosh, but the connection to mongodb://localhost:27017 fails. Which check is most appropriate first?

Installing MongoDB Community Edition Medium
A. Enable sharding on the local database instance
B. Verify that the MongoDB server service is running
C. Recreate every database collection in Compass
D. Create an Atlas organization for the installation

39 A developer wants a repeatable command-line operation that returns active users from the users collection. Which mongosh command is appropriate?

Introduction to MongoDB Shell and Compass Medium
A. db.users.find({ active: true })
B. db.users.updateMany({ active: true })
C. db.users.deleteMany({ active: true })
D. db.users.insertOne({ active: true })

40 An Atlas cluster is running, but a developer's local application cannot connect even though the username and password are correct. Which Atlas configuration should be checked first?

MongoDB Atlas Cloud Overview Medium
A. The Compass color theme setting
B. The aggregation pipeline history
C. The network access IP allowlist
D. The collection document validator

41 A rapidly growing application stores user activity events with fields that vary by event type. The application must ingest events from many regions and continue accepting writes during temporary network partitions. Which design most directly reflects a NoSQL motivation?

Introduction to NoSQL Databases Hard
A. Keep all events on one vertically scaled server
B. Normalize every event into fixed relational tables
C. Use a flexible schema with horizontally scalable writes
D. Require distributed transactions for every event

42 An order-processing system requires multi-row constraints, complex joins, and strict serializable transactions across inventory, payment, and shipment records. Which conclusion is most defensible?

Comparison: SQL vs. NoSQL Hard
A. A relational database is a strong default because integrity is central
B. A key-value database is ideal because transactions are unnecessary
C. A graph database is mandatory because orders form relationships
D. A document database is always superior because joins are avoided

43 A MongoDB collection contains customer documents whose optional fields differ by customer type. Which statement best describes the practical implication of this model?

Overview of MongoDB Hard
A. MongoDB prevents indexes on fields absent from some documents
B. Documents may vary, but application-level validation may still be added
C. MongoDB automatically converts every field into a relational column
D. Every document must contain the same fields and data types

44 During a network partition, a distributed database continues returning responses from both sides, but some responses may not reflect the latest write. Which CAP trade-off is being chosen?

CAP Theorem and its trade-offs Hard
A. Consistency and availability without partition tolerance
B. Availability over consistency
C. Consistency over availability
D. Partition tolerance over availability

45 A team claims that a database is both highly available and strongly consistent because it is deployed on a cluster. What is the most accurate critique?

CAP Theorem and its trade-offs Hard
A. Strong consistency and availability cannot both be guaranteed during a partition
B. Clustering automatically eliminates the CAP trade-off
C. Availability guarantees require abandoning consistency at all times
D. Partition tolerance is irrelevant when replicas are used

46 A session service retrieves values only by exact session identifier and requires extremely low-latency reads at massive scale. Which data model is the most natural fit?

Key-value databases Hard
A. Column storage grouped by analytical dimensions
B. Document storage requiring predicates on nested fields
C. Key-value storage with session identifiers as keys
D. Graph storage with users as vertices

47 A key-value database is performing poorly because clients frequently need all products matching category, price range, and availability. What is the primary modeling issue?

Key-value databases Hard
A. The access pattern needs secondary query capabilities
B. The values should be split into graph edges
C. The keys contain too few random characters
D. The workload requires relational normalization

48 An analytics workload scans several billion records but usually reads only three of hundreds of attributes and aggregates them by time range. Why is a column-oriented design advantageous?

Column-oriented databases Hard
A. It stores related attributes together for row reconstruction
B. It removes the need for partitioning and query planning
C. It can read only required columns and compress similar values
D. It guarantees serializable transactions across all aggregates

49 Which workload is least appropriate for a column-oriented database optimized for analytical scans?

Column-oriented databases Hard
A. Scanning selected attributes across billions of events
B. Computing daily aggregates over historical measurements
C. Compressing repetitive categorical dimensions for reports
D. Updating individual customer profiles on every request

50 A blog application always displays an article together with its author summary and recent comments. The embedded data remains bounded and is updated with the article. Which modeling choice is most appropriate?

Document databases Hard
A. Use one global document containing all articles and comments
B. Represent each comment as a graph edge without document storage
C. Embed the bounded related data in the article document
D. Store every field in separate documents and join at read time

51 A MongoDB document would contain an ever-growing array of millions of sensor readings, while users query readings independently by sensor and time. What is the strongest design correction?

Document databases Hard
A. Continue embedding because fewer documents are always better
B. Reference or bucket readings to control document growth
C. Duplicate the entire sensor history in each device document
D. Store all readings in one array and index every element

52 A fraud system must repeatedly discover short paths among accounts, devices, cards, and transactions, where relationship types and traversal depth matter. Which model is most suitable?

Graph databases Hard
A. Column storage partitioned only by transaction date
B. Key-value storage with one record per account
C. Document storage with all entities embedded in one record
D. Graph storage with typed vertices and relationships

53 A graph database is not automatically the best choice merely because an application contains relationships. Which factor most strongly supports choosing a graph model?

Graph databases Hard
A. The data can be retrieved only by one immutable identifier
B. Queries repeatedly traverse variable-length relationship paths
C. Records have independent fields with no relationship-based queries
D. The workload consists mainly of columnar historical aggregation

54 In a MongoDB deployment, which component is primarily responsible for routing client operations to the appropriate shards in a sharded cluster?

MongoDB Architecture Hard
A. The config server replica set
B. The mongos query router
C. The primary member of each shard
D. The MongoDB Compass client

55 A replica set has one primary and two secondaries. The primary becomes unreachable, and the secondaries can communicate with each other. What condition is most important for automatic election of a new primary?

MongoDB Architecture Hard
A. Every secondary must have identical application connection strings
B. A majority of voting members must be able to form a quorum
C. The disconnected primary must approve its replacement
D. All clients must first reconnect through Compass

56 After installing MongoDB Community Edition, the server process exits immediately when started manually. Which diagnostic action is most appropriate first?

Installing MongoDB Community Edition Hard
A. Check the configured data path, permissions, and startup logs
B. Delete the database files and reinstall the shell
C. Change every collection to use a unique index
D. Create a Compass connection before starting the server

57 A developer can run the MongoDB shell but receives a connection-refused error when connecting to localhost. Which explanation is most likely?

Installing MongoDB Community Edition Hard
A. The shell requires Compass to create a server process
B. The database must first be deployed to MongoDB Atlas
C. MongoDB collections cannot be accessed from localhost
D. The shell is a client and does not start mongod automatically

58 A developer wants to reproduce a complex Compass filter in an automated deployment script. Which approach best preserves repeatability?

Introduction to MongoDB Shell and Compass Hard
A. Translate the filter and update into mongosh commands
B. Rely on Compass history without exporting any commands
C. Copy the collection into a spreadsheet before deployment
D. Record only the visible documents returned by Compass

59 A query works in Compass but fails in mongosh because a field contains a date. What is the most likely issue?

Introduction to MongoDB Shell and Compass Hard
A. Compass stores dates as strings while mongosh rejects all dates
B. MongoDB supports dates only through graphical clients
C. The shell command used a string instead of a BSON Date value
D. mongosh cannot query fields nested inside documents

60 An Atlas cluster is reachable from a developer laptop but not from an application server in the cloud. Which Atlas configuration should be investigated first?

MongoDB Atlas Cloud Overview Hard
A. The number of fields in each MongoDB document
B. The application server's IP access list and network path
C. The local shell's command history
D. The Compass theme selected by the developer