CS Atlas GATE 2027
DBMS course
0 / 119 complete

DBMS/Phase 2 · Relational Model & Constraints

Chapter review LI-2.1 · Item 24 of 119

Chapter 2.1 Lock-in

Read at your own pace. Try the questions before opening the answers.

On this page

A · Compressed recap

A relation is a set of tuples over named attributes with domains; degree = number of attributes (fixed by the schema), cardinality = number of tuples (changes with the state). A relation has no duplicate tuples, no tuple order and atomic values (1NF). The relation schema R(A₁..Aₙ) differs from the relation state r(R) ⊆ dom(A₁) × … × dom(Aₙ); max cardinality = product of domain sizes.

NULL marks a missing value (unknown or not applicable); it is not 0 or ''. Arithmetic with NULL gives NULL; any comparison with NULL, even NULL = NULL, gives UNKNOWN; a query keeps a row only when its condition is TRUE; "is null" tests for NULL.

B · Merged rule card

2.1.1 Relation, tuple, attribute, domain, degree, cardinality, schema; properties of relations

  • Relation = table = set of tuples; attribute = named column; domain = allowed values.
  • Degree (arity) = number of attributes (fixed); cardinality = number of tuples (changes).
  • Relation schema R(A₁..Aₙ) vs relation state r(R) ⊆ dom(A₁) × … × dom(Aₙ).
  • Properties: no duplicate tuples, unordered tuples, named (unordered) attributes, atomic values (1NF).
  • Max cardinality = product of domain sizes; t[A] = value of A in t.

2.1.2 NULL: meaning and basic behaviour

  • NULL = missing value (unknown, not applicable, or unknown whether it exists); not 0, not ''.
  • Arithmetic with NULL → NULL. Comparison with NULL (even NULL = NULL) → UNKNOWN.
  • Queries keep rows whose condition is TRUE; FALSE and UNKNOWN rows are dropped.
  • Test with "is null", which is never UNKNOWN.
  • Identifying attributes (primary key) must not be NULL.

C · Interleaved GATE-style questions

Q1 · NAT · 1 mark(s) — Degree

A relation has 6 attributes and 1,000 tuples. What is its degree?

Numerical answer: ________

Q2 · NAT · 2 mark(s) — Cardinality

R(A, B) with |dom(A)| = 5, |dom(B)| = 4 currently holds 7 tuples. How many more tuples can still be inserted at most?

Numerical answer: ________

Q3 · MCQ · 1 mark(s) — Properties

Which display is not a valid relation state?

  1. (A) Rows in random order
  2. (B) A NULL in a non-key column
  3. (C) A row repeated twice
  4. (D) Rows in descending order of roll

Q4 · MCQ · 1 mark(s) — NULL

If a is NULL and b = 3, then a < b is:

  1. (A) NULL
  2. (B) UNKNOWN
  3. (C) TRUE
  4. (D) FALSE

Q5 · NAT · 2 mark(s) — NULL

Column marks: 35, NULL, 50, NULL, 80, 20. How many rows satisfy marks < 40 OR marks >= 40?

Numerical answer: ________

Q6 · MSQ · 2 mark(s) — Schema vs state

Which are fixed by the relation schema (not the state)?

  1. (A) Attribute names
  2. (B) Cardinality
  3. (C) Domains of the attributes
  4. (D) Degree

Q7 · MCQ · 1 mark(s) — NULL

Which condition is TRUE for a row whose x is NULL?

  1. (A) x is null
  2. (B) x <> 0
  3. (C) x = x
  4. (D) x = NULL

Q8 · MCQ · 2 mark(s) — Atomic values

An ER entity STUDENT has a multivalued attribute phone. In the relation STUDENT(roll, name, phone):

  1. (A) phone must be NULL
  2. (B) phone must hold a single value; multiple numbers need another design
  3. (C) phone becomes the key
  4. (D) phone can hold the set of all phone numbers

D · Answer Vault

Reveal answers when you’re ready

Q1 Answer: 6 · 1 mark(s)

Attributes count.

Re-read: Lesson 2.1.1 — Relation, tuple, attribute, domain, degree, cardinality, schema; properties of relations

Q2 Answer: 13 · 2 mark(s)

Max 5 × 4 = 20; 20 − 7 = 13.

Re-read: Lesson 2.1.1 — Relation, tuple, attribute, domain, degree, cardinality, schema; properties of relations

Q3 Answer: (C) · 1 mark(s)

Duplicates are not allowed.

  • (A) is wrong: Allowed.
  • (B) is wrong: Allowed.
  • (D) is wrong: Display order is irrelevant.

Re-read: Lesson 2.1.1 — Relation, tuple, attribute, domain, degree, cardinality, schema; properties of relations

Q4 Answer: (B) · 1 mark(s)

Comparison with NULL.

  • (A) is wrong: The result is a truth value.
  • (C) is wrong: Cannot be decided.
  • (D) is wrong: Cannot be decided.

Re-read: Lesson 2.1.2 — NULL: meaning and basic behaviour

Q5 Answer: 4 · 2 mark(s)

Only the four non-NULL rows.

Re-read: Lesson 2.1.2 — NULL: meaning and basic behaviour

Q6 Answer: (A) (C) (D) · 2 mark(s)

Cardinality depends on the current tuples.

  • (B) is wrong: Changes with the state.

Re-read: Lesson 2.1.1 — Relation, tuple, attribute, domain, degree, cardinality, schema; properties of relations

Q7 Answer: (A) · 1 mark(s)

Only the null test is TRUE.

  • (B) is wrong: UNKNOWN.
  • (C) is wrong: UNKNOWN.
  • (D) is wrong: UNKNOWN.

Re-read: Lesson 2.1.2 — NULL: meaning and basic behaviour

Q8 Answer: (B) · 2 mark(s)

Atomic values only; Lesson 2.4.1 gives the design.

  • (A) is wrong: No.
  • (C) is wrong: No.
  • (D) is wrong: Not atomic.

Re-read: Lesson 2.1.1 — Relation, tuple, attribute, domain, degree, cardinality, schema; properties of relations

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.