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. New object SQL
B. No structured queries
C. Not only SQL
D. Network-only SQL

2 Which feature is commonly associated with NoSQL databases?

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

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

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

4 Which scaling approach is commonly associated with NoSQL databases?

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

5 What type of database is MongoDB?

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

6 Which format does MongoDB use internally to store documents?

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

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

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

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. Completing every query instantly
D. Storing data in one location

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

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

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

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

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

Column-oriented databases Easy
A. By objects
B. By documents
C. By columns
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. Cell
B. Document
C. Table
D. Edge

14 What is a group of MongoDB documents called?

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

15 Which elements are central to a graph database?

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

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

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

17 What is sharding in MongoDB?

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

18 What is MongoDB Community Edition?

Installing MongoDB Community Edition Easy
A. A relational database extension
B. A paid visualization service
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 Driver
B. MongoDB Server
C. MongoDB Compass
D. MongoDB Shell

20 What is MongoDB Atlas?

MongoDB Atlas Cloud Overview Easy
A. A document conversion format
B. A desktop operating system
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 requires every record to share identical columns
B. It guarantees stronger consistency than every SQL database
C. It supports flexible schemas for evolving records
D. It automatically normalizes data into related tables

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. Normalization through foreign-key constraints
B. Horizontal scaling through data partitioning
C. Serialization through stored procedures
D. Vertical scaling through faster processors

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 relational SQL database with ACID transactions
C. A document database without transaction controls
D. A key-value database with independent item writes

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. Represent every attribute as a graph vertex
B. Store each field on an unrelated database server
C. Normalize every attribute into a separate table
D. Store each profile as one embedded document

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 rejects it until the collection is recreated
C. MongoDB adds the field with null to every document
D. MongoDB moves the document into another collection

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

Overview of MongoDB Medium
A. The _id field
B. The _pk field
C. The _key field
D. The _index 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 single-node durability
B. Availability and partition tolerance
C. Consistency and unrestricted availability
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. Consistency and partition tolerance over request availability
B. Availability and partition tolerance over immediate consistency
C. Durability and isolation over horizontal scalability
D. Consistency and availability without partition tolerance

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 relational database
B. A key-value database
C. A graph database
D. A column-oriented 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 are primarily accessed through their keys
B. Keys cannot contain letters or special characters
C. Records must be joined before fields are searched
D. Values must always be numeric scalar values

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 duplicates every row across all available nodes
B. It follows graph edges between salary values
C. It stores every employee as one binary document
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. Aggregating selected metrics across billions of events
B. Updating one shopping cart by a known token
C. Loading complete records for individual user sessions
D. Traversing several levels of social relationships

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. Embed the line items inside the order document
B. Place each item attribute in a separate collection
C. Store each line item under an unrelated random key
D. Create a graph vertex for every item property

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. Store books separately and reference the publisher
B. Represent book fields as fixed relational columns
C. Embed every book inside the publisher document
D. Store all books as one serialized string value

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 stores each property in a separate compressed column
B. It efficiently traverses relationships between connected entities
C. It guarantees that all entities use an identical schema
D. It retrieves every entity using only one fixed key

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. The application must rebuild all indexes manually
C. An eligible secondary can be elected as primary
D. Every secondary immediately accepts conflicting writes

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

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

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.updateMany({ active: true })
B. db.users.insertOne({ active: true })
C. db.users.find({ active: true })
D. db.users.deleteMany({ 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 network access IP allowlist
C. The aggregation pipeline history
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. Require distributed transactions for every event
D. Use a flexible schema with horizontally scalable writes

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 graph database is mandatory because orders form relationships
B. A document database is always superior because joins are avoided
C. A key-value database is ideal because transactions are unnecessary
D. A relational database is a strong default because integrity is central

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 automatically converts every field into a relational column
B. Documents may vary, but application-level validation may still be added
C. Every document must contain the same fields and data types
D. MongoDB prevents indexes on fields absent from some documents

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. Consistency over availability
C. Availability over consistency
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. Clustering automatically eliminates the CAP trade-off
B. Availability guarantees require abandoning consistency at all times
C. Partition tolerance is irrelevant when replicas are used
D. Strong consistency and availability cannot both be guaranteed during a partition

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. Document storage requiring predicates on nested fields
B. Key-value storage with session identifiers as keys
C. Graph storage with users as vertices
D. Column storage grouped by analytical dimensions

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 values should be split into graph edges
B. The keys contain too few random characters
C. The workload requires relational normalization
D. The access pattern needs secondary query capabilities

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 can read only required columns and compress similar values
C. It removes the need for partitioning and query planning
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. Compressing repetitive categorical dimensions for reports
B. Computing daily aggregates over historical measurements
C. Updating individual customer profiles on every request
D. Scanning selected attributes across billions of events

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. Reference or bucket readings to control document growth
B. Continue embedding because fewer documents are always better
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. Document storage with all entities embedded in one record
B. Graph storage with typed vertices and relationships
C. Column storage partitioned only by transaction date
D. Key-value storage with one record per account

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. Records have independent fields with no relationship-based queries
C. The workload consists mainly of columnar historical aggregation
D. Queries repeatedly traverse variable-length relationship paths

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 primary member of each shard
B. The config server replica set
C. The mongos query router
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. A majority of voting members must be able to form a quorum
B. All clients must first reconnect through Compass
C. The disconnected primary must approve its replacement
D. Every secondary must have identical application connection strings

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. Change every collection to use a unique index
B. Create a Compass connection before starting the server
C. Delete the database files and reinstall the shell
D. Check the configured data path, permissions, and startup logs

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. MongoDB collections cannot be accessed from localhost
B. The shell requires Compass to create a server process
C. The shell is a client and does not start mongod automatically
D. The database must first be deployed to MongoDB Atlas

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. Copy the collection into a spreadsheet before deployment
B. Rely on Compass history without exporting any commands
C. Record only the visible documents returned by Compass
D. Translate the filter and update into mongosh commands

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. mongosh cannot query fields nested inside documents
B. MongoDB supports dates only through graphical clients
C. The shell command used a string instead of a BSON Date value
D. Compass stores dates as strings while mongosh rejects all dates

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 Compass theme selected by the developer
B. The local shell's command history
C. The number of fields in each MongoDB document
D. The application server's IP access list and network path