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 → Concurrency Control 1

What is SELECT FOR UPDATE SKIP LOCKED and what use case does it enable?
An extension to SELECT FOR UPDATE that skips (does not return or wait for) rows that are already locked by other transactions; enables non-blocking queue-like processing where multiple workers can each claim and process different rows without contention - perfect for job queues, task processing systems, and any pattern where multiple workers process items from a shared pool
click to copy

DBMS → Deadlock 1

What is deadlock probability as a function of transaction size and why do longer transactions cause more deadlocks?
Deadlock probability increases approximately as O(n^2) where n is the number of locks held per transaction: each transaction holding n locks has n potential conflicts with each other transaction; as transaction size (locks held) grows the probability of circular wait increases because each lock held is a potential blocker and each lock needed is a potential waiter
click to copy

DBMS → PL/SQL 3

What is native compilation (NATIVE) vs interpreted mode for PL/SQL and what are the performance trade-offs?
PL/SQL NATIVE: compiles PL/SQL code to native machine code via an external C compiler; eliminates interpreter overhead; best for CPU-intensive computations and complex algorithms. INTERPRETED: PL/SQL bytecode executed by the PL/SQL VM; faster compilation, simpler deployment; best for I/O-bound code (most DB code waits on SQL, not PL/SQL computation)
click to copy
What is PL/SQL profiling and what tools are available in Oracle for identifying PL/SQL bottlenecks?
PL/SQL profiling measures execution time and call counts for each line/procedure in PL/SQL code; Oracle provides DBMS_PROFILER (line-level timing), DBMS_HPROF (hierarchical profiler showing call trees and cumulative times), and PL/SQL Developer/SQL Developer GUI tools that visualize profiling data; essential for identifying slow procedures and optimization targets
click to copy
What is the PL/SQL function result cache (RESULT_CACHE) and what automatic invalidation mechanism does it use?
The PL/SQL RESULT_CACHE stores function results in the SGA (System Global Area) shared across all sessions; Oracle automatically invalidates cached results when any dependent database table or view is modified (DML commit), ensuring cache consistency without any manual intervention required
click to copy

DBMS → Introduction to DBMS 29

Which best describes the impedance mismatch problem?
Mismatch between data structures of programming languages and the relational model
click to copy
In three-schema architecture which layer provides logical independence?
Conceptual schema
click to copy
Which is NOT a property of ACID transactions?
Concurrency
click to copy
What is the primary difference between a data warehouse and a traditional DBMS?
Data warehouses are optimized for analytical read-heavy workloads; DBMS for transactional write-heavy workloads
click to copy
Which catalog component stores metadata about tables, views, and indexes?
System catalog / Metadata repository
click to copy
Data abstraction in DBMS provides which primary advantage?
Shielding users from physical storage complexity while maintaining logical clarity
click to copy
Which correctly describes the difference between DDL and DML?
DDL defines schema structure; DML retrieves and manipulates data
click to copy
Physical data independence in DBMS means:
Ability to change internal/physical schema without changing the conceptual schema
click to copy
Who is responsible for defining the conceptual schema?
Database Administrator (DBA)
click to copy
A view in DBMS primarily provides which level of abstraction?
View/External level
click to copy
Which is a disadvantage of file-based systems compared to DBMS?
Data redundancy and inconsistency
click to copy
The closed world assumption in DBMS means:
Any data not stored is assumed to be false/non-existent
click to copy
Which best defines data integrity in DBMS?
Ensuring accuracy, consistency, and validity of data throughout its lifecycle
click to copy
In DBMS terminology a schema is:
The overall design or logical structure of the database
click to copy
What is the instance of a database?
The actual data stored in the database at a particular moment in time
click to copy
Which component converts high-level queries into efficient low-level operations?
Query Optimizer
click to copy
What is data independence fundamentally protecting against?
The ripple effect of changes in one schema level propagating to another
click to copy
Which is a characteristic of an active database?
It can automatically trigger actions via triggers in response to database events
click to copy
In DBMS terminology a relation is equivalent to:
A table
click to copy
Which statement about NULL values is most accurate?
NULL represents an unknown, missing, or inapplicable value
click to copy
The ANSI/SPARC three-schema architecture was proposed primarily to achieve:
Data independence between different levels of database abstraction
click to copy
Which DBMS architecture is most suitable for internet-scale applications?
Three-tier architecture
click to copy
What distinguishes a primary key constraint from a unique constraint?
Primary key does not allow NULL values and must be unique; unique allows one NULL
click to copy
What is the primary purpose of a buffer manager in a DBMS?
Manages transfer of data between disk and main memory to minimize I/O
click to copy
Semantic integrity in DBMS refers to:
Ensuring data satisfies real-world constraints and business rules beyond syntactic correctness
click to copy
Which is a correct statement about ORDBMS?
ORDBMS extends the relational model with object-oriented features like user-defined types and methods
click to copy
What is the primary purpose of a transaction log in a DBMS?
To maintain a record of all database changes for recovery and rollback purposes
click to copy
What is a deductive database?
A database that uses rules to deduce new facts from stored facts
click to copy
In DBMS what is the data dictionary and why is it important?
A system repository storing metadata about all database objects used by the DBMS engine for query processing, optimization, and integrity enforcement
click to copy

DBMS → Database Architecture 6

In shared-nothing architecture what do nodes share?
Nothing - each node has its own memory, CPU and storage
click to copy
Which correctly describes shared-memory vs shared-disk architectures?
Shared-memory: all processors access one common memory; shared-disk: separate memories but common disk
click to copy
What is a federated database system?
A collection of autonomous heterogeneous database systems appearing as a single unified system
click to copy
What is the primary role of the storage manager in DBMS architecture?
Providing the interface between the high-level DML and low-level data storage
click to copy
In a two-tier client-server architecture what is a major limitation?
Business logic embedded in the client makes maintenance difficult
click to copy
What is middleware in a three-tier database architecture?
Software layer between the client presentation tier and the database tier handling business logic
click to copy