IAE Academy

GATE Database Management and Warehousing formula sheet

75 formulas in 7 topics, each with when to use it. Each is explained in the topic notes.

Print the whole sheet

UPPER BOUND ON A RELATIONSHIP SET

For an n-ary relationship set over entity sets . It holds because no two instances relate the same combination of entities. The bound is reached only when every combination is related.

BOUND FROM AN AT-MOST-ONE SIDE

In a binary 1:N relationship from A to B (each B related to at most one A), the count is at most . With total participation of B it equals . In a 1:1 relationship both sides are at-most-one, so .

SUPERKEY CONDITION

Every superset of a superkey (within the attributes of ) is a superkey, so under set semantics the set of all attributes is always a superkey. Candidate keys are the minimal superkeys.

COUNTING SUPERKEYS

is the number of attributes of . A superkey is any attribute set that contains at least one candidate key. With two keys, inclusion-exclusion subtracts the sets counted twice: those containing .

LOGICAL EVALUATION ORDER OF A QUERY BLOCK

Rows are filtered by WHERE before grouping; groups are filtered by HAVING after aggregation; ORDER BY runs last and does not change which rows are returned.

BAG COUNTS FOR SET OPERATIONS

Here m and n are the number of copies of one particular tuple in the first and second operand. Without ALL, each of these results has at most one copy of every tuple.

ARMSTRONG'S AXIOMS (SOUND AND COMPLETE)

Sound: they derive only FDs implied by F. Complete: they derive every FD in the closure F^+.

DERIVED RULES

All follow from the three axioms. Decomposition applies to the right side only; does not give .

BLOCKING FACTOR (UNSPANNED)

Records per block. The floor is essential: with unspanned records the leftover bytes in each block are unused.

NUMBER OF DATA BLOCKS

Blocks needed for records; round up because a partly filled last block still occupies a block.

MIN-MAX NORMALISATION TO [NEW_MIN, NEW_MAX]

Linear map of the observed range onto the target range; for [0,1] it reduces to (v - min)/(max - min). Preserves the shape of the distribution and the order of values. Undefined when max = min (all values equal).

Z-SCORE NORMALISATION

Result has mean 0 and standard deviation 1 (under the same convention for sigma). Convention: use the population standard deviation (divide by n) unless the question says sample (divide by n - 1). Not bounded to a fixed range; undefined when sigma = 0. A variant divides by the mean absolute deviation s = (1/n) times the sum of |v - mean| instead of sigma; it is less affected by outliers because deviations are not squared.

CUBOIDS WITH NO HIERARCHIES

n dimensions, each with a single level (apart from 'all'). Each dimension is either present or rolled up to all.

CUBOIDS WITH EXACTLY K DIMENSIONS (NO HIERARCHIES)

Choose which k of the n dimensions stay; summing over k = 0 to n gives 2^n.