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

2 Which feature is commonly associated with NoSQL databases?

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

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

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

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. Time-series database
B. Relational database
C. Document database
D. Graph database

6 Which format does MongoDB use internally to store documents?

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

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. Storing data in one location
C. Completing every query instantly
D. Preventing all duplicate records

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

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

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 graphs
B. By documents
C. By objects
D. By columns

12 Which workload commonly benefits from column-oriented storage?

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

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

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

14 What is a group of MongoDB documents called?

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

15 Which elements are central to a graph database?

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

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

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

17 What is sharding in MongoDB?

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

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 Server
B. MongoDB Compass
C. MongoDB Driver
D. MongoDB Shell

20 What is MongoDB Atlas?

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

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 automatically normalizes data into related tables
B. It supports flexible schemas for evolving records
C. It requires every record to share identical columns
D. It guarantees stronger consistency than every SQL database

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

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

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. Store each field on an unrelated database server
B. Represent every attribute as a graph vertex
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 moves the document into another collection
B. MongoDB can store it without altering every document
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 _pk field
B. The _key field
C. The _index 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. Consistency and unrestricted availability
B. Availability and partition tolerance
C. Consistency and partition tolerance
D. Availability and single-node durability

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. Durability and isolation over horizontal scalability
B. Consistency and partition tolerance over request availability
C. Availability and partition tolerance over immediate consistency
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 graph database
B. A column-oriented database
C. A key-value database
D. A relational 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. Records must be joined before fields are searched
C. Values must always be numeric scalar values
D. Keys cannot contain letters or special characters

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 reads mainly the salary column from storage
D. It stores every employee as one binary document

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

Column-oriented databases Medium
A. Traversing several levels of social relationships
B. Aggregating selected metrics across billions of events
C. Updating one shopping cart by a known token
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. Store each line item under an unrelated random key
D. Place each item attribute in a separate collection

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. Embed every book inside the publisher document
C. Store books separately and reference the publisher
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 retrieves every entity using only one fixed key
B. It efficiently traverses relationships between connected entities
C. It guarantees that all entities use an identical schema
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. An eligible secondary can be elected as primary
B. The config server becomes the permanent primary
C. The application must rebuild all indexes manually
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 replica-set arbiter
B. The mongos query router
C. The MongoDB Compass client
D. The mongod storage journal

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. Create an Atlas organization for the installation
D. Recreate every database collection in Compass

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.insertOne({ active: true })
B. db.users.updateMany({ 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 aggregation pipeline history
B. The network access IP allowlist
C. The collection document validator
D. The Compass color theme setting

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. Require distributed transactions for every event
B. Normalize every event into fixed relational tables
C. Keep all events on one vertically scaled server
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 key-value database is ideal because transactions are unnecessary
C. A relational database is a strong default because integrity is central
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. Every document must contain the same fields and data types
B. MongoDB prevents indexes on fields absent from some documents
C. MongoDB automatically converts every field into a relational column
D. Documents may vary, but application-level validation may still be added

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. Availability over consistency
B. Partition tolerance over availability
C. Consistency over availability
D. Consistency and availability without partition tolerance

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. Availability guarantees require abandoning consistency at all times
B. Strong consistency and availability cannot both be guaranteed during a partition
C. Clustering automatically eliminates the CAP trade-off
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. Document storage requiring predicates on nested fields
B. Graph storage with users as vertices
C. Key-value storage with session identifiers as keys
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 workload requires relational normalization
C. The keys contain too few random characters
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 can read only required columns and compress similar values
B. It guarantees serializable transactions across all aggregates
C. It stores related attributes together for row reconstruction
D. It removes the need for partitioning and query planning

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. Updating individual customer profiles on every request
C. Compressing repetitive categorical dimensions for reports
D. Computing daily aggregates over historical measurements

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. Represent each comment as a graph edge without document storage
B. Store every field in separate documents and join at read time
C. Embed the bounded related data in the article document
D. Use one global document containing all articles and comments

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. Graph storage with typed vertices and relationships
B. Column storage partitioned only by transaction date
C. Document storage with all entities embedded in one record
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 workload consists mainly of columnar historical aggregation
B. Queries repeatedly traverse variable-length relationship paths
C. The data can be retrieved only by one immutable identifier
D. Records have independent fields with no relationship-based queries

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 mongos query router
B. The config server replica set
C. The MongoDB Compass client
D. The primary member of each shard

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

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

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

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. Record only the visible documents returned by Compass
C. Copy the collection into a spreadsheet before deployment
D. Rely on Compass history without exporting any 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. The shell command used a string instead of a BSON Date value
B. Compass stores dates as strings while mongosh rejects all dates
C. mongosh cannot query fields nested inside documents
D. MongoDB supports dates only through graphical clients

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