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 10

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 29

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
How would you represent a category (UNION type) in EER modeling?
As a union of supertype entities where a subtype can be associated with instances from different supertype entity sets shown with a U symbol in EER diagrams
click to copy
When converting an ER model to relational schema a weak entity is mapped by:
Creating a table whose primary key is the combination of its partial key (discriminator) and the primary key of its identifying strong entity with a foreign key to the owner table
click to copy
What is the semantic difference between HasA and IsA relationships?
IsA represents inheritance/specialization (a Car IsA Vehicle); HasA represents composition/aggregation (a Car HasA Engine) - fundamentally different entity relationships
click to copy
In ER-to-relational mapping how is a multi-valued attribute converted?
Converted into a separate table with the parent entity PK as FK and the multi-valued attribute as part of the PK
click to copy
For the rule Every Department MUST have exactly one Manager what is the participation constraint?
Total participation of Department in Manages relationship with cardinality 1:1 where Department has total and Manager has partial participation
click to copy
What is schema evolution in ER modeling and why is it challenging?
The process of modifying the ER schema over time as requirements change challenging because it requires updating existing data, queries, application code, and possibly complex data migrations
click to copy
In Crow Foot notation how is zero or one relationship cardinality represented?
A circle (zero) and a vertical line (one) on the same end of the relationship line
click to copy
What problem does fan trap represent in ER modeling and how is it resolved?
A modeling error where a many-to-one and one-to-many relationship from a single entity incorrectly suggests a path between entities leading to incorrect query results - resolved by restructuring the relationships
click to copy
What is a chasm trap in ER modeling?
A gap in a relationship path where a minimum cardinality of zero means some entities have no corresponding connected entities causing data to be missed in queries
click to copy
How should overlapping subtypes be handled in ER-to-relational mapping?
Various strategies: single table with type indicators and nullable columns, separate subtype tables with FK to supertype, or a type membership table allowing multiple type memberships
click to copy
In an ER diagram for Student ENROLLS_IN Course with attribute grade - what does placing grade on the relationship signify?
Grade is a property of the specific enrollment instance (the combination of a particular student in a particular course) not of Student alone or Course alone
click to copy
When is a direct ternary relationship better than decomposed binary relationships?
A relationship simultaneously associating three entity types used when decomposition into binary relationships would lose information about the three-way association
click to copy
What is the entity resolution problem in ER modeling?
The challenge of determining whether two references to entities represent the same real-world entity (deduplication/record linkage) crucial in data integration and federated database design
click to copy

DBMS → Relational Model 1

What is the difference between a superkey, candidate key, and primary key?
Superkey: any set of attributes uniquely identifying tuples; Candidate key: a minimal superkey (no subset is also a superkey); Primary key: one chosen candidate key for the table
click to copy