NoSQL & Modern Databases MCQs for the NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

NoSQL databases are non-relational stores built to scale out across many servers, and they come in four main data models: document, key-value, column-family (wide-column) and graph. This is topic 16 of the 17 in the Databases area, which carries 10% of the NSCT according to HEC's Areas of Competencies. Candidates averaged 42.3% accuracy in Databases in 2026, per the HEC NSCT report and APP.

Questions test which model fits a scenario, the CAP and BASE ideas, and simple placement counts such as consistent hashing and quorums. They do not test product version details, so learn the models, not the vendors.

The four models at a glance

Model Unit of data You query by Good for Example systems
Key-value Opaque value under a key Key only Sessions, carts, caches Redis, DynamoDB
Document JSON/BSON document Key or any indexed field Catalogues, profiles, content MongoDB, CouchDB
Column-family Sparse row of column families Row key, key ranges Huge write rates, time series Cassandra, HBase
Graph Nodes, edges, properties Traversals Social networks, recommendations Neo4j

Sadalage and Fowler call the first three aggregate-oriented, because each stores a cluster of related data (an order with its lines) as one unit. Graph databases are not aggregate-oriented.

Document stores

A document store keeps self-describing records, usually JSON. The database understands the fields, so you can filter and index on them. Documents in one collection may have different fields; this is called schemaless, but the schema still exists implicitly in the application code.

{ "_id": 7, "name": "Laptop", "ram_gb": 16, "tags": ["work", "student"] }

The key design choice is embed or reference. Embed small, bounded data that is always read with its parent, such as a user's two addresses. Reference large or unbounded data, such as thousands of comments on a post.

Exam angle: products with different attributes per category point to a document store.

Key-value stores

The simplest model: put(key, value), get(key), delete(key). The store treats the value as an opaque blob, so lookups by key are very fast, but you cannot query inside the value. Keys are spread across nodes by hashing, for example node = hash(key) mod 3.

Exam angle: "read or write the whole object by one ID" means key-value.

Column-family stores

A column-family (wide-column) store organises data into rows found by a row key, with columns grouped into column families. Rows are sparse: a row stores only the columns it has. If four users have 2, 3, 1 and 3 attributes, the store holds 9 cells, while a relational table with 4 columns would hold 16 slots, 7 of them NULL.

Do not confuse this with columnar storage in analytical databases, which stores each column's values together to speed up scans. One is a logical NoSQL model; the other is a physical layout.

Exam angle: time series and very high write rates queried by key and time range point here.

Graph stores

A graph database stores nodes (entities), relationships (edges) and properties on both. Queries traverse edges, so "friends of friends" follows stored links instead of running one self-join per hop as SQL would.

Exam angle: multi-hop relationship queries (paths, recommendations, fraud rings) point to a graph database.

CAP, BASE and scaling

ACID (relational) BASE (many NoSQL systems)
Consistency Strong, immediate Eventual
Availability May block or abort Basically available
State Changes only via transactions Soft state while replicas sync

The CAP theorem says that during a network partition a distributed system must choose between consistency (every read sees the latest write) and availability (every request gets a response). Many textbooks, including Elmasri-Navathe, phrase it as "pick two of three"; the more precise reading is that partitions happen, so the real choice is C or A while one lasts. CAP's C is not ACID's C. The Distributed Databases topic covers replication in more depth.

Sharding splits data across nodes; replication copies the same data. With N replicas, a read quorum R and write quorum W guarantee fresh reads when R + W > N.

Consistent hashing places nodes and keys on a ring; each key goes to the first node clockwise. Adding a node moves only the keys in its new arc. Plain key mod N placement moves most keys: going from 4 to 5 servers remaps 80 of keys 0 to 99.

Common traps

Worked examples

1. Understanding. What does "soft state" in BASE mean? Answer: The system's state can change over time even with no new writes, because replicas are still exchanging updates and converging.

2. Application. A ring uses positions 0 to 359. Nodes P, Q and R sit at 90, 200 and 300. Which node owns key 310, and which keys move if node S is added at 250? Answer: Key 310 has no node after it before 359, so it wraps to P at 90. S takes the arc from 201 to 250, so only keys in that range move, from R to S.

3. Analysis. A store runs with N = 4, W = 3 and R = 1. Users sometimes see stale data. Why, and what is the smallest change to R that fixes it? Answer: R + W = 4, which is not greater than 4, so a read can hit the one replica the write skipped. Raising R to 2 gives 5 > 4, so every read overlaps the write set.

Practise

The quiz below has 100 NoSQL & Modern Databases questions you can filter by tier and difficulty.

Practise: 100 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. Which NoSQL data model stores self-describing records such as JSON documents and lets you query on fields inside each record?

    1. Key-value store
    2. Graph database
    3. Document store
    4. Column-family store
    Show answer

    Answer: C. Document store

    A document store keeps each record as a self-describing document (JSON, BSON or XML) and the database understands its internal fields, so you can filter and index on them. A key-value store treats the value as opaque and only looks it up by key.

  2. What best describes a key-value store?

    1. Data is stored as nodes and edges with properties on both
    2. Rows are grouped into column families and each row can have different columns
    3. Records must follow a fixed schema declared with CREATE TABLE
    4. Each value is looked up by a unique key, and the database treats the value as an opaque blob
    Show answer

    Answer: D. Each value is looked up by a unique key, and the database treats the value as an opaque blob

    A key-value store is the simplest NoSQL model: put(key, value), get(key) and delete(key). The store does not interpret the value, which is why lookups by key are very fast but queries on the value's contents are not supported by the store itself.

  3. Which kind of query is a graph database designed to answer efficiently?

    1. Summing sales per region over ten years of history
    2. Fetching a session object when you already know its session ID
    3. Storing large video files in fixed-size blocks
    4. Finding the shortest chain of connections between two people in a social network
    Show answer

    Answer: D. Finding the shortest chain of connections between two people in a social network

    Graph databases store entities as nodes and relationships as edges, so traversing many hops (friends of friends, shortest paths, recommendations) follows edges directly instead of running repeated joins. Large aggregations suit a warehouse and exact-key lookups suit a key-value store.

  4. In NoSQL literature, what does BASE stand for?

    1. Basically Available, Soft state, Eventually consistent
    2. Balanced, Atomic, Serialisable, Encrypted
    3. Basically Atomic, Strongly consistent, Eventually durable
    4. Batch, Availability, Sharding, Elasticity
    Show answer

    Answer: A. Basically Available, Soft state, Eventually consistent

    BASE is the counterpart of ACID used to describe many NoSQL systems: the system stays basically available, its state may change without new input as replicas sync (soft state), and replicas become consistent eventually rather than immediately.

  5. How is data organised in a column-family (wide-column) store?

    1. Every table column is stored in its own file and every row must have a value for every column
    2. Data is stored only as key-value pairs with no grouping of columns
    3. Rows are identified by a row key, columns are grouped into column families, and each row stores only the columns it actually has
    4. Each record is a JSON document inside a collection
    Show answer

    Answer: C. Rows are identified by a row key, columns are grouped into column families, and each row stores only the columns it actually has

    In the column-family model (BigTable, HBase and Cassandra style), a row key identifies a row, related columns are grouped into column families, and rows are sparse: a row stores only the columns that have values. This is different from simply storing a relational table column by column.

  6. Which statement about the CAP theorem is accurate?

    1. A system can provide consistency, availability and partition tolerance together if its replicas are fast enough
    2. When a network partition occurs, a distributed system must choose between consistency and availability
    3. Scaling out horizontally requires giving up partition tolerance
    4. The C in CAP means the same thing as the C in ACID
    Show answer

    Answer: B. When a network partition occurs, a distributed system must choose between consistency and availability

    Brewer's CAP theorem (proved by Gilbert and Lynch) says that during a partition a system cannot be both consistent and available. Many textbooks phrase it as 'pick two of three'; the more precise reading is that partitions cannot be ruled out, so the real choice is C or A while one lasts.

  7. What does Consistency mean in the CAP theorem?

    1. Every transaction preserves the database's integrity constraints
    2. Every request receives a non-error response
    3. Every read returns the most recent write, as if there were a single copy of the data
    4. The system keeps working when messages between nodes are lost
    Show answer

    Answer: C. Every read returns the most recent write, as if there were a single copy of the data

    CAP consistency is about replicas agreeing: a read sees the latest write (linearisability). ACID consistency is a different idea: a transaction moves the database between states that satisfy its integrity constraints. A non-error response is availability, and surviving lost messages is partition tolerance.

  8. What is horizontal scaling (scaling out)?

    1. Moving the database to a single server with more CPU and RAM
    2. Adding more columns to the largest table
    3. Adding more servers and spreading the data and load across them
    4. Splitting one table into two tables to remove redundancy
    Show answer

    Answer: C. Adding more servers and spreading the data and load across them

    Scaling out means adding machines to a cluster, which is the design goal of most NoSQL systems. Scaling up (vertical scaling) means buying a bigger single server. Splitting tables to remove redundancy is normalisation, not scaling.

  9. How does sharding differ from replication?

    1. Sharding puts different subsets of the data on different nodes; replication keeps copies of the same data on several nodes
    2. Sharding copies every record to every node; replication splits the data into subsets
    3. Both terms mean the same thing in NoSQL systems
    4. Sharding is used only by graph databases; replication only by key-value stores
    Show answer

    Answer: A. Sharding puts different subsets of the data on different nodes; replication keeps copies of the same data on several nodes

    Sharding (horizontal partitioning) spreads the data so each node holds part of it, which scales storage and writes. Replication keeps copies of the same data, which improves availability and read throughput. Most real systems combine both.

  10. A document database is often called 'schemaless'. Which statement is most accurate?

    1. The database cannot store any structure, so every value is a plain string
    2. Each document must declare its full schema before it can be inserted
    3. Documents in one collection can have different fields, but the application still relies on an implicit schema when it reads them
    4. Schemaless means the data cannot be indexed
    Show answer

    Answer: C. Documents in one collection can have different fields, but the application still relies on an implicit schema when it reads them

    Schemaless means the database does not enforce a fixed schema at write time (schema-on-read). The structure has not vanished: the code that reads the documents still expects certain fields, so the schema lives in the application. Document stores can still index fields.

FAQs

Is NoSQL better than SQL?

Neither is better in general. NoSQL stores suit huge scale, flexible structure or relationship-heavy data. Relational databases suit multi-row ACID transactions, joins and ad hoc queries. Many systems use both, which is called polyglot persistence.

What is the difference between sharding and replication?

Sharding splits a dataset so each node holds a different part, which spreads storage and write load. Replication keeps copies of the same data on several nodes, which improves availability and read capacity. Real deployments normally combine the two.

Does NoSQL mean "no SQL at all"?

It is usually read as "not only SQL". Many NoSQL systems offer SQL-like query languages, and NewSQL systems keep full SQL and ACID transactions while scaling out across nodes.

Which NoSQL model should I pick for a scenario question?

Look at the access pattern. Whole object by one key: key-value. Varying fields queried by attribute: document. Massive writes read by key and time range: column-family. Multi-hop relationships: graph.

Next step

Continue with Data Warehousing & Data Mining MCQs, go back to the Databases MCQs hub, or try a timed NSCT mock test.