Quick Revision

GK One-Line Question & Answer

15541+ short questions with short answers, covering every category and sub-category on the site — no long articles to scroll through. Good for a fast recap before an exam, or a few minutes of daily practice.

DBMS → Database Architecture 22

What is the primary advantage of connection pooling?
It reuses established database connections reducing overhead of creating new connections for each request
click to copy
The query processor in a DBMS consists of which components?
DDL interpreter, DML compiler, and query evaluation engine
click to copy
Which architectural pattern does Apache Hadoop use?
Shared-nothing architecture with MapReduce
click to copy
What is data sharding in distributed database architecture?
Horizontally partitioning data across multiple database nodes based on a shard key
click to copy
The CAP theorem states you can only guarantee at most two of:
Consistency, Availability, Partition Tolerance
click to copy
In a Lambda architecture the speed layer is responsible for:
Processing real-time streaming data to provide low-latency approximate results
click to copy
Column-store database architecture is better suited for OLAP because:
Storing values of each column contiguously enables high compression and allows reading only required columns reducing I/O for aggregation queries
click to copy
What is the purpose of Write-Ahead Logging (WAL)?
To ensure all changes are logged to disk before they are applied enabling recovery after failures
click to copy
What is the difference between synchronous and asynchronous replication?
Synchronous waits for replica confirmation before committing; asynchronous commits immediately and replicates later
click to copy
What is MVCC (Multi-Version Concurrency Control)?
A concurrency control mechanism that maintains multiple versions of data to allow reads without blocking writes
click to copy
What is the purpose of a materialized view?
Materialized views physically store precomputed query results improving performance at the cost of storage and refresh overhead
click to copy
In a distributed database the 2PC protocol is used to:
Ensure atomicity of distributed transactions across multiple database nodes
click to copy
What is the database-per-service pattern in microservices?
Each microservice owns its private database preventing direct access by other services
click to copy
What is the primary architectural difference between OLTP and OLAP systems?
OLTP optimizes for many short transactions with point lookups; OLAP optimizes for complex analytical queries over large datasets
click to copy
Which component is responsible for lock management in concurrent transactions?
Lock Manager (part of Concurrency Control Manager)
click to copy
What is the SAGA pattern in microservices database architecture?
It manages long-running distributed transactions without using 2PC using a sequence of local transactions with compensating transactions
click to copy
What is data partitioning and how does horizontal differ from vertical?
Horizontal partitioning splits rows across multiple partitions; vertical partitioning splits columns across multiple tables
click to copy
What is NUMA and how does it affect database architecture?
A memory architecture where processors have different latencies to different memory regions requiring NUMA-aware data placement
click to copy
What does event-sourcing architecture store as the primary record?
An immutable sequence of events/changes from which current state can be derived
click to copy
The Shared Disk architecture (e.g. Oracle RAC) has which characteristic?
Multiple nodes share the same storage but have separate memory using cache coherency protocols
click to copy
What is the role of the catalog manager in DBMS architecture?
Maintains the data dictionary containing metadata about all database objects
click to copy
What is join pushdown in federated query systems?
Sending the join operation to a remote data source rather than fetching both tables to the coordinator allowing the remote DBMS to handle the join natively
click to copy

DBMS → Data Models 18

In the object-oriented data model what is encapsulation?
Bundling data (attributes) and methods that operate on that data within an object hiding internal implementation details
click to copy
The document data model (MongoDB) is best suited for which scenario?
Storing hierarchical semi-structured data where document structure can vary
click to copy
What is the semantic data model and its primary purpose?
A high-level conceptual model capturing the meaning of data to bridge the gap between the real world and DBMS implementation
click to copy
In the relational data model referential integrity is enforced by which constraint?
Foreign key constraint
click to copy
The key-value data model (Redis) has which fundamental characteristic?
It stores data as opaque values indexed by unique keys with very simple query capability
click to copy
What is the primary advantage of the graph data model over relational for highly connected data?
Graph databases natively model and traverse relationships without expensive JOIN operations making relationship-heavy queries much faster
click to copy
In wide-column store data model (Cassandra/HBase) what distinguishes it from relational?
Rows can have different columns grouped into families; optimized for distributed storage and time-series data
click to copy
What is the XML data model and what concept does it use?
It represents data as a hierarchical tree structure using elements, attributes, and text nodes defined by DTD or XML Schema
click to copy
What is a surrogate key and why is it preferred over natural keys?
A surrogate key is a system-generated artificial identifier (like auto-increment ID) with no business meaning preferred because natural keys can change and may be long/complex
click to copy
The star schema data model used in data warehouses consists of:
A central fact table surrounded by denormalized dimension tables
click to copy
What is a snowflake schema and how does it differ from a star schema?
Snowflake schema normalizes dimension tables into multiple related tables reducing redundancy but requiring more JOINs than star schema
click to copy
What does BASE stand for and how does it contrast with ACID?
BASE: Basically Available, Soft state, Eventual consistency - trades strict consistency for availability and partition tolerance
click to copy
What is the fundamental difference between conceptual, logical, and physical data models?
Conceptual: high-level business concepts; logical: entities, attributes, keys, DBMS-agnostic; physical: exact DBMS-specific implementation (tables, indexes, partitions)
click to copy
Which data model best supports multi-valued attributes natively without normalization?
Object-oriented model and document model
click to copy
What is the purpose of a junction table (bridge or associative entity)?
To resolve many-to-many relationships between two entities into two one-to-many relationships in the relational model
click to copy
What is the temporal data model and what problem does it solve?
A model that tracks time-varying data recording history with valid-time (when true in reality) and transaction-time (when recorded in DB) dimensions
click to copy
What is the entity-attribute-value (EAV) data models main disadvantage?
Data retrieval requires complex pivoting, referential integrity is difficult to enforce, and performance is poor for queries accessing multiple attributes
click to copy
In property graph models (Neo4j) what can both nodes and edges have?
Both nodes and edges can have key-value property maps and labels/types
click to copy