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 → Data Models 24

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
What is data denormalization and when is it appropriate?
Deliberate introduction of redundancy to improve read query performance appropriate in read-heavy analytical systems where write overhead is acceptable
click to copy
What distinguishes a fact table from a dimension table in a dimensional data model?
Fact tables store quantitative measurable business events with foreign keys; dimension tables store descriptive context attributes (who, what, where, when) about those events
click to copy
The RDF (Resource Description Framework) data model represents data as:
Subject-Predicate-Object triples forming a semantic graph
click to copy
What is a recursive relationship in data modeling?
A relationship where an entity is associated with itself e.g., Employee manages Employee (manager-subordinate hierarchy)
click to copy
What distinguishes a weak entity from a strong entity and what is a discriminator?
A weak entity cannot be uniquely identified by its own attributes alone and depends on a parent entity for identification; the discriminator is the partial key distinguishing weak entities with the same owner
click to copy
What is polyglot persistence in modern application data architecture?
Using different types of databases (relational, document, graph, key-value) for different parts of an application based on data requirements
click to copy
What is the open world assumption and how does it differ from the closed world assumption?
Open world: absence of information means unknown (ontologies/semantic web); closed world: absence means false (RDBMS). Open world allows incomplete information without assuming falsehood
click to copy
What columnar data model characteristic makes it suitable for OLAP?
Storing values of each column contiguously enables high compression ratios and allows reading only required columns dramatically reducing I/O for aggregation queries
click to copy
What is schema evolution in data modeling and why is it challenging?
The process of modifying the database schema over time as requirements change challenging because it requires updating existing data, queries, application code, and possibly complex data migrations
click to copy
What is 6NF (Sixth Normal Form) and when is it applied?
A normal form applied to temporal databases where relations are decomposed so each relation has at most one non-key attribute allowing fine-grained temporal validity tracking
click to copy

DBMS → ER Model 16

In an ER diagram what does a double rectangle represent?
A weak entity that depends on another entity for its existence and identification
click to copy
What is the difference between total and partial participation in an ER diagram?
Total participation (double line): every instance MUST participate; partial participation (single line): some instances may not participate
click to copy
In ER modeling what is a derived attribute and how is it represented?
An attribute whose value can be computed from other stored attributes represented by a dashed/dotted ellipse in ER diagrams
click to copy
What is a composite attribute in ER modeling?
An attribute composed of multiple sub-attributes that together represent a complex value e.g. Address = Street, City, State, Zip
click to copy
How does ISA specialization relate to object-oriented inheritance?
ISA specialization in ER creates a supertype-subtype hierarchy where subtypes inherit attributes from the supertype analogous to class inheritance in OOP
click to copy
What is the difference between disjoint and overlapping constraints in ER specialization?
Disjoint (d): an entity can belong to at most one subtype; Overlapping (o): an entity can belong to multiple subtypes simultaneously
click to copy
In ER modeling what is a ternary relationship and when is it necessary?
A relationship that simultaneously associates three entity types necessary when the relationship cannot be decomposed into binary relationships without losing information
click to copy
What does cardinality ratio specify in an ER relationship?
The maximum number of relationship instances an entity can participate in expressed as 1:1, 1:N, or M:N
click to copy
How is a many-to-many M:N relationship mapped to relational tables?
By creating a separate junction/cross-reference table with foreign keys referencing both entity tables plus any relationship attributes
click to copy
In EER modeling what is the difference between specialization and generalization?
Specialization is top-down (start with supertype, define subtypes); generalization is bottom-up (identify commonalities among existing entity types to create a supertype)
click to copy
What is the Chen notation for a multi-valued attribute in ER diagrams?
Double ellipse (ellipse within an ellipse)
click to copy
How would you record the hours each employee works on each project in M:N employee-project scenario?
Create a M:N relationship Works_On between Employee and Project with hours as a relationship attribute
click to copy
What is aggregation in ER modeling and when is it used?
Treating a relationship and its participating entities as a higher-level abstract entity to participate in another relationship used when a relationship itself needs to have a relationship
click to copy
When converting a 1:1 relationship to relational tables the preferred approach is:
Place the foreign key in the table with total participation or merge the two entities into one table if appropriate
click to copy
What is the purpose of the role name in an ER diagram relationship?
To clarify the role/function each entity plays in a relationship especially important in recursive (self-referential) relationships
click to copy
What is total specialization constraint in EER modeling?
Every supertype instance MUST be a member of at least one subtype contrasted with partial where supertype instances need not belong to any subtype
click to copy