🇮🇳 GATE DA & AI Engineering · subject
GATE DA & AI Engineering Database Management and Warehousing Syllabus
The Database Management and Warehousing syllabus for GATE DA & AI Engineering in full: 7 chapters and 12 topics, every one listed below, plus 53 Database Management and Warehousing flashcards with answers.
Database Management and Warehousing syllabus: all 7 chapters
Expand any chapter to see its topics and sub-topics.
-
ER-model
overviewNo separate topics listed for this chapter.
-
Relational Model
5 topics- Relational Algebra
- Tuple Calculus
- SQL
- Integrity Constraints
- Normal Form
-
File Organization
overviewNo separate topics listed for this chapter.
-
Indexing
overviewNo separate topics listed for this chapter.
-
Data Types
overviewNo separate topics listed for this chapter.
-
Data Transformation
4 topics- Normalization
- Discretization
- Sampling
- Compression
-
Data Warehouse Modelling
3 topics- Schema for Multidimensional Data Models
- Concept Hierarchies
- Measures: Categorization and Computations
GATE DA & AI Engineering Database Management and Warehousing flashcards — 53 questions with answers
In relational algebra, what does the SELECT operation ($\sigma$) do, and what is its general form?
It filters rows (tuples) that satisfy a given predicate. Form: $\sigma_{\text{condition}}(R)$, returning every tuple of relation $R$ for which the condition is true. It is horizontal (row-wise) selection.
In relational algebra, what does the PROJECT operation ($\pi$) do, and what side-effect does it have?
It selects specified columns: $\pi_{A_1, A_2, \dots, A_n}(R)$. It is vertical (column-wise) selection and automatically removes duplicate tuples, since a relation is a set.
Define the relational algebra natural join ($\bowtie$).
$R \bowtie S$ combines tuples of $R$ and $S$ that have equal values on all common attributes, keeping each shared attribute only once. It is equivalent to a theta-join on equality of common attributes followed by a projection removing duplicate columns.
What is the difference between a theta-join and an equi-join in relational algebra?
A theta-join $R \bowtie_{\theta} S$ uses any comparison condition $\theta$ (e.g. $<, >, \leq, \neq$). An equi-join is the special case where $\theta$ uses only equality ($=$) comparisons.
What does the relational algebra division operation ($\div$) compute?
$R \div S$ returns tuples from $R$ that are associated with every tuple in $S$. It answers 'for all' queries, e.g. 'find students who took all required courses.'
What conditions must two relations satisfy to be union-compatible for set operations ($\cup, \cap, -$)?
They must have the same number of attributes (same arity / degree), and corresponding attributes must be drawn from the same (compatible) domains.
List the fundamental (primitive) operations of relational algebra from which all others can be derived.
The six primitives are: select ($\sigma$), project ($\pi$), union ($\cup$), set difference ($-$), Cartesian product ($\times$), and rename ($\rho$). Operations like join, intersection, and division are derived from these.
How is intersection expressed using the primitive relational algebra operators?
$R \cap S = R - (R - S)$. Equivalently $R \cap S = S - (S - R)$.
What is the purpose of the rename operator ($\rho$) in relational algebra?
It renames a relation and/or its attributes, e.g. $\rho_{S(B_1,\dots,B_n)}(R)$. It is essential for self-joins and Cartesian products where attribute names would otherwise clash.
What is tuple relational calculus, and what is the general form of an expression?
A non-procedural (declarative) query language specifying what to retrieve, not how. General form: $\{ t \mid P(t) \}$, the set of all tuples $t$ such that predicate $P(t)$ is true.
Which quantifiers are used in tuple relational calculus, and what do they mean?
The existential quantifier $\exists$ ('there exists') and the universal quantifier $\forall$ ('for all'). Example: $\exists s \in S\,(\dots)$ is true if at least one tuple $s$ satisfies the condition.
What does it mean for a tuple calculus expression to be 'safe'?
A safe expression guarantees a finite result and contains only values from the domains of the database relations (the active domain). Safety prevents infinite results such as $\{ t \mid \neg(t \in R) \}$.
State Codd's theorem regarding the expressive power of relational query languages.
Relational algebra, safe tuple relational calculus, and safe domain relational calculus are equivalent in expressive power (relationally complete). Any query in one can be expressed in the others.
What is the key difference between tuple relational calculus and domain relational calculus?
Tuple calculus variables range over whole tuples ($\{ t \mid P(t) \}$), while domain calculus variables range over individual attribute domain values ($\{ \langle x_1, \dots, x_n \rangle \mid P(x_1, \dots, x_n) \}$).
In SQL, what is the difference between the WHERE clause and the HAVING clause?
WHERE filters individual rows before grouping and cannot use aggregate functions. HAVING filters groups after GROUP BY and can use aggregate functions like $\text{COUNT}$, $\text{SUM}$, etc.
What is the logical order of evaluation of the main SQL SELECT clauses?
FROM $\to$ WHERE $\to$ GROUP BY $\to$ HAVING $\to$ SELECT $\to$ ORDER BY. (SELECT projection logically occurs after grouping/filtering and before final ordering.)
List the five standard aggregate functions in SQL and note how they treat NULLs.
$\text{COUNT}$, $\text{SUM}$, $\text{AVG}$, $\text{MIN}$, $\text{MAX}$. All except $\text{COUNT}(*)$ ignore NULL values. $\text{COUNT}(*)$ counts all rows including those with NULLs.
What is the difference between INNER JOIN and LEFT OUTER JOIN in SQL?
INNER JOIN returns only rows with matching keys in both tables. LEFT OUTER JOIN returns all rows from the left table plus matched right rows, filling unmatched right-side columns with NULL.
In SQL, what does the three-valued logic produce, and how does NULL compare?
SQL uses three truth values: TRUE, FALSE, and UNKNOWN. Any comparison with NULL (e.g. $\text{NULL} = \text{NULL}$) yields UNKNOWN; to test for NULL you must use IS NULL / IS NOT NULL.
What is the difference between UNION and UNION ALL in SQL?
UNION combines result sets and removes duplicate rows (requiring a sort/hash). UNION ALL concatenates all rows including duplicates and is therefore faster.
Show the other 33 Database Management and Warehousing flashcards
What distinguishes a correlated subquery from a non-correlated (nested) subquery?
A non-correlated subquery is evaluated once independently of the outer query. A correlated subquery references columns from the outer query and is re-evaluated for each outer row.
What are the four categories of integrity constraints in the relational model?
Domain constraints (valid attribute values), entity integrity (primary key not NULL), referential integrity (foreign key matches a referenced key or is NULL), and key constraints (uniqueness of candidate keys).
State the entity integrity constraint.
No attribute of a primary key may have a NULL value. This ensures every tuple in a relation can be uniquely identified.
State the referential integrity constraint.
A foreign key value in a referencing relation must either match an existing primary/candidate key value in the referenced relation or be entirely NULL. It prevents 'dangling' references.
Define a superkey, a candidate key, and a primary key.
A superkey is any set of attributes that uniquely identifies a tuple. A candidate key is a minimal superkey (no proper subset is a superkey). A primary key is the candidate key chosen to identify tuples.
Define functional dependency $X \to Y$.
In a relation, $X \to Y$ holds if every two tuples that agree on the attribute set $X$ also agree on $Y$. $X$ functionally determines $Y$; the value of $X$ uniquely determines the value of $Y$.
State Armstrong's three primary axioms (inference rules) for functional dependencies.
Reflexivity: if $Y \subseteq X$ then $X \to Y$. Augmentation: if $X \to Y$ then $XZ \to YZ$. Transitivity: if $X \to Y$ and $Y \to Z$ then $X \to Z$.
What is the attribute closure $X^{+}$ under a set of functional dependencies $F$?
$X^{+}$ is the set of all attributes functionally determined by $X$ using $F$. It is used to test whether $X$ is a superkey (when $X^{+}$ = all attributes) and whether a dependency $X \to Y$ is implied (when $Y \subseteq X^{+}$).
Define a prime and a non-prime attribute.
A prime attribute is a member of at least one candidate key. A non-prime (non-key) attribute belongs to no candidate key. These definitions are central to 2NF and 3NF.
What are the requirements for First Normal Form (1NF)?
Every attribute must contain only atomic (indivisible) values; no repeating groups, multivalued attributes, or nested relations are allowed. Each cell holds a single value.
What condition defines Second Normal Form (2NF)?
The relation is in 1NF and every non-prime attribute is fully functionally dependent on every candidate key, i.e. no partial dependency of a non-prime attribute on part of a composite candidate key.
What condition defines Third Normal Form (3NF)?
The relation is in 2NF and has no transitive dependency of a non-prime attribute on a candidate key. Equivalently, for every FD $X \to Y$, either $X$ is a superkey or $Y$ is a prime attribute.
What is the condition for Boyce-Codd Normal Form (BCNF)?
For every non-trivial functional dependency $X \to Y$, $X$ must be a superkey. BCNF is stricter than 3NF (it drops the 'or $Y$ is prime' allowance).
Give the key difference between 3NF and BCNF and a tradeoff.
3NF allows $X \to Y$ where $Y$ is a prime attribute even if $X$ is not a superkey; BCNF does not. 3NF is always both lossless and dependency-preserving; BCNF is always lossless but may not preserve all dependencies.
What anomaly does Fourth Normal Form (4NF) address, and what is its condition?
4NF removes multivalued dependencies (MVDs). A relation is in 4NF if it is in BCNF and for every non-trivial MVD $X \twoheadrightarrow Y$, $X$ is a superkey.
What is normalization and what are its main goals?
Normalization is the process of decomposing relations to reduce redundancy and eliminate insertion, update, and deletion anomalies, while preserving data through lossless-join and (ideally) dependency-preserving decompositions.
What is the lossless-join (non-additive) property of a decomposition?
A decomposition of $R$ into $R_1$ and $R_2$ is lossless if $R_1 \bowtie R_2 = R$ exactly (no spurious tuples). It holds if $R_1 \cap R_2 \to R_1$ or $R_1 \cap R_2 \to R_2$.
What does it mean for a decomposition to be dependency-preserving?
The union of the functional dependencies enforceable on the individual decomposed relations is equivalent to (has the same closure as) the original set $F$, so all FDs can be checked without performing a join.
List the three data anomalies that normalization eliminates.
Insertion anomaly (cannot add data without unrelated data), deletion anomaly (deleting a row loses unrelated facts), and update anomaly (redundant copies must all be updated consistently).
What is discretization in data preprocessing, and why is it used?
Discretization transforms continuous numeric attributes into a finite set of intervals/labels (bins). It is used to reduce data size, handle noise, and enable algorithms that require categorical input (e.g. some classification methods).
Distinguish supervised from unsupervised discretization.
Supervised discretization uses class label information to choose split points (e.g. entropy/information-gain-based binning). Unsupervised discretization ignores class labels (e.g. equal-width or equal-frequency binning).
Compare equal-width binning and equal-frequency (equal-depth) binning.
Equal-width divides the range into $k$ intervals of identical width $\frac{\max - \min}{k}$, sensitive to outliers and skew. Equal-frequency places approximately the same number of data points in each bin, giving uneven widths but balanced counts.
What is sampling in the context of data warehousing/mining, and why is it used?
Sampling selects a representative subset of the data to reduce the volume processed. It is a data-reduction technique allowing the cost of an algorithm to be sublinear in the size of the full dataset while approximating its behavior.
Differentiate sampling with replacement (SRSWR) from sampling without replacement (SRSWOR).
In sampling without replacement (SRSWOR) each selected tuple is removed and cannot be picked again. In sampling with replacement (SRSWR) a selected tuple is returned to the pool and may be chosen multiple times.
What is stratified sampling and when is it preferred?
The data is partitioned into homogeneous groups (strata) and samples are drawn from each stratum, often proportionally. It is preferred for skewed/imbalanced data to ensure all classes/groups are represented.
What is the difference between lossless and lossy compression?
Lossless compression allows exact reconstruction of the original data (e.g. run-length, Huffman coding). Lossy compression discards information so reconstruction is approximate (e.g. JPEG, wavelet/PCA truncation), trading fidelity for higher compression.
Name two common dimensionality-reduction techniques used for data compression and their basis.
Principal Component Analysis (PCA), which projects data onto orthogonal principal components capturing maximum variance, and the Discrete Wavelet Transform (DWT), which transforms data and retains the largest coefficients.
In data warehousing, what is a star schema?
A multidimensional model with a single central fact table containing measures and foreign keys, linked to a set of denormalized dimension tables. The diagram resembles a star; it favors query simplicity and performance over normalization.
How does a snowflake schema differ from a star schema?
In a snowflake schema the dimension tables are normalized into multiple related tables (hierarchies split out), reducing redundancy and storage but requiring more joins, which can slow queries compared to the denormalized star schema.
What is a fact constellation (galaxy) schema?
A schema in which multiple fact tables share common dimension tables. It models several interrelated subjects/data marts and is also called a galaxy schema.
What is a concept hierarchy in a data warehouse, and give an example?
A concept hierarchy maps low-level concepts to higher-level, more general ones, enabling roll-up and drill-down. Example for location: street $\to$ city $\to$ state $\to$ country.
What are the three categories of measures in a data cube, based on the aggregate function used?
Distributive (e.g. $\text{COUNT}$, $\text{SUM}$, $\text{MIN}$, $\text{MAX}$ — computable from partitions), Algebraic (e.g. $\text{AVG}=\frac{\text{SUM}}{\text{COUNT}}$, computed from a bounded number of distributive functions), and Holistic (e.g. $\text{MEDIAN}$, $\text{MODE}$, $\text{RANK}$ — no constant-size sub-aggregate).
Why is the AVG measure classified as algebraic rather than distributive in OLAP?
Because $\text{AVG}$ cannot be aggregated directly from partial averages, but it can be computed from two distributive measures: $\text{AVG} = \frac{\text{SUM}}{\text{COUNT}}$. An algebraic measure is obtained by an algebraic function over a bounded number of distributive measures.
GATE DA & AI Engineering Database Management and Warehousing FAQ
What is in the GATE DA & AI Engineering Database Management and Warehousing syllabus?
GATE DA & AI Engineering Database Management and Warehousing is split into 7 chapters: ER-model, Relational Model, File Organization, Indexing, Data Types, Data Transformation and Data Warehouse Modelling. Together they contain 12 topics.
How many chapters are in GATE DA & AI Engineering Database Management and Warehousing?
7 chapters, containing 12 topics. The largest chapter is Relational Model, with 5 topics.
Are there flashcards for GATE DA & AI Engineering Database Management and Warehousing?
Yes — a 53-card Database Management and Warehousing deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.