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 → Introduction to DBMS 31

Database auditing records
ALL database activity (who did what, when, from where)
click to copy
Data masking replaces
Sensitive real data with realistic-looking but fictitious data for non-production use
click to copy
Data warehouse is characterized by
Subject-oriented, integrated, time-variant, non-volatile collection for decision support
click to copy
OLAP is optimized for
Complex analytical queries on large historical datasets
click to copy
Star schema fact table contains
Numeric measures + foreign keys to dimension tables
click to copy
ETL stands for
Extract Transform Load
click to copy
CAP theorem: during network partition choose between
Consistency OR Availability (cannot guarantee both)
click to copy
Sharding distributes
Table rows across multiple database servers based on a shard key
click to copy
NoSQL database best for social graph traversal
Graph database (Neo4j, Neptune)
click to copy
Recursive CTE requires
BASE CASE (anchor member) AND RECURSIVE CASE
click to copy
PERCENT_RANK() of highest-ranked row is
0.0
click to copy
SUM(salary) OVER(ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) computes
Running cumulative total of salary
click to copy
CUME_DIST() computes
Cumulative distribution: fraction of rows ≤ current row value
click to copy
ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING includes
Previous row + current row + next row (3-row window)
click to copy
PAXOS consensus protocol is used in
Distributed systems for fault-tolerant consensus among multiple nodes
click to copy
Base property of NoSQL - Eventually consistent means
Given enough time (no updates) all replicas will converge to same value
click to copy
Vertical fragmentation in distributed DB divides relation by
Columns (attributes) keeping PK in each fragment
click to copy
Horizontal fragmentation in distributed DB divides relation by
Rows (subsets of tuples) based on selection predicates
click to copy
Location transparency in distributed DB means
User can query data without knowing its physical location
click to copy
Impedance mismatch in databases refers to
Mismatch between OO programming model and relational data model
click to copy
ORM (Object-Relational Mapper) bridges
Object-oriented programming model and relational database (impedance mismatch)
click to copy
Laravel's Eloquent uses which ORM pattern?
Active Record pattern
click to copy
Which SQL function returns current date only (no time)?
CURDATE() or CURRENT_DATE
click to copy
FLOOR(4.9) returns
4
click to copy
CEIL(4.1) returns
5
click to copy
ROUND(4.567,2) returns
4.57
click to copy
ABS(-15) returns
15
click to copy
MOD(17,5) returns
2
click to copy
UPPER('dbms') returns
DBMS
click to copy
LOWER('DBMS') returns
dbms
click to copy
LENGTH('RMSSSB') returns
6
click to copy

DBMS → Views 2

Materialized view differs from regular view because
It physically stores query results and can be refreshed periodically
click to copy
WITH CHECK OPTION on updatable view ensures
Updates through view MUST satisfy view's WHERE condition
click to copy

DBMS → PL/SQL 2

INSTEAD OF trigger on a view
Intercepts DML on views and executes custom logic replacing the standard DML
click to copy
Stored procedures improve security by
Allowing users to call procedure without direct table access (execute-only permission)
click to copy

DBMS → SQL Basics 3

ROLLUP in GROUP BY
Generates subtotals and grand total across hierarchy levels
click to copy
CUBE in GROUP BY
Generates subtotals for ALL possible combinations of specified grouping columns
click to copy
NTILE(4) OVER(ORDER BY salary) divides
Ordered rows into 4 approximately equal-sized buckets
click to copy

DBMS → Transactions 1

Two-Phase Commit (2PC) is used for
Distributed database transactions across multiple nodes
click to copy

DBMS → Joins 1

Semi-join optimization in distributed queries sends
Only join-attribute projection to remote site to reduce data transfer
click to copy