InferenceAI

Enter at least two characters to search.

Start free

Databases

ER model, relational algebra, SQL, normalisation, transactions, concurrency and indexing. 8 questions with worked solutions.

Q1MCQ2 marksNormalisation

Relation R(A,B,C)R(A, B, C) has key AA and functional dependencies A→BA \to B and B→CB \to C. What is the highest normal form RR satisfies?

Q2NAT2 marksKeys

Relation R(A,B,C,D)R(A, B, C, D) has functional dependencies A→BA \to B, B→CB \to C, C→DC \to D and D→AD \to A. How many candidate keys does it have?

Q3NAT1 markFunctional dependencies

Relation R(A,B,C,D,E)R(A, B, C, D, E) has A→BA \to B, B→CB \to C and CD→ECD \to E. How many attributes are in the closure {A,D}+\{A, D\}^+?

Q4NAT2 marksIndexing

A B+ tree internal node fits in a 512-byte block. Keys take 8 bytes and child pointers take 8 bytes. What is the maximum number of child pointers per internal node?

Q5MCQ1 markSQL

How does COUNT(column) differ from COUNT(*)?

Q6MCQ1 markConcurrency control

Basic two-phase locking (2PL) guarantees:

Q7MCQ1 markTransactions

A schedule is conflict serialisable if and only if its precedence graph:

Q8MCQ1 markRelational algebra

Which relational algebra operator naturally expresses queries like "students who took all courses"?