UGC NET Computer Science Database Management Systems Previous Year Questions (PYQs)
Practise 137 Database Management Systems questions asked in UGC NET Computer Science from 2018–2026. Questions cover Data models, Relational algebra, Integrity constraints, Functional dependencies and normalisation, Transaction processing and Locking protocols. Every question is shown with its options and the correct answer, free to read.
137 PYQs2018–2026Answers includedFree
Practise Database Management Systems as timed sets
Focused 10-question sets with instant scoring, explanations, and weak-area analysis.
A. Wait-for graph B. Precedence graph C. Rigorous 2PL D. Strict 2PL
I. Holds all locks until it commits II. Holds write-locks until it commits III. Used to check deadlocks IV. Used to check serializability
AA-III, B-IV, C-I, D-II
BA-III, B-IV, C-II, D-I
CA-IV, B-I, C-II, D-III
DA-IV, B-III, C-II, D-I
Answer:(B) A-III, B-IV, C-II, D-I
Explanation
A wait-for graph is used to detect deadlocks, and a precedence graph is used to test serializability. Rigorous 2PL retains all locks until commit, whereas strict 2PL retains write locks until commit.
What is the correct sequence of the database-design process?
A. Create conceptual schema
B. Data model mapping
C. Requirements collection and analysis
D. Physical design
AC, A, B, D
BC, B, A, D
CA, B, C, D
DA, C, B, D
Answer:(A) C, A, B, D
Explanation
Database design starts by collecting and analysing requirements. It then develops a conceptual schema, maps that conceptual model to the selected data model, and finally performs physical design. Therefore the order is C, A, B, D.
For relation schema r(M, Y, P, MP, C), the functional dependencies are M → MP, {M, Y} → P, and MP → C. Which is a key?
AM
B{M, Y}
C{M, C}
DMP
Answer:(B) {M, Y}
Explanation
From M, we obtain MP and then C, but not Y or P. Adding Y allows {M, Y} → P, so the closure of {M, Y} contains every attribute. Neither M nor MP supplies Y and P, making {M, Y} the key.
Which relational-algebra expression is equivalent to the SQL query SELECT X FROM B WHERE Y?
Aσᵧ(πₓ(B))
Bπᵧ(σₓ(B))
Cσₓ(πₓ(B))
Dπₓ(σᵧ(B))
Answer:(D) πₓ(σᵧ(B))
Explanation
The WHERE predicate is applied first, so σᵧ selects from relation B. The SELECT list is then applied, so πₓ projects attribute X. Reversing that order can discard the attribute needed by the selection.
A. A database may have only one primary key.
B. Every key is a candidate key.
C. There can be multiple candidate keys.
D. There can be more than one superkey.
E. Every candidate key is a primary key.
AA, C, D only
BA, D, E only
CB, C, D only
DB, D, E only
Answer:(A) A, C, D only
Explanation
A relation design chooses one candidate key as its primary key, but may have several candidate keys and many superkeys. A superkey need not be minimal, so B is false; only the selected candidate key is primary, so E is false.
To define the relationship between two entity sets, which operation can be used?
AConcatenation
BAddition
CCartesian product
DUnion
Answer:(C) Cartesian product
Explanation
A relationship set is formally a subset of the Cartesian product of participating entity sets. Concatenation, addition, and union do not construct tuples across the two sets in this way.
A safe expression in relational calculus is guaranteed to yield:
AA finite number of tuples
BA finite number of attributes
CA finite number of null values
DA finite number of indices
Answer:(A) A finite number of tuples
Explanation
Safety (range restriction) ensures that query variables range over values drawn from the finite database domain. This prevents an expression from describing infinitely many result tuples.
A. The HAVING CLAUSE is an optional clause which tells Oracle to group rows based on distinct values that exist for specified columns.
B. Unions can be used in subqueries.
C. The intersect clause outputs only rows produced by both the queries intersected.
D. The statement containing a subquery is called a parent statement.
E. If a select statement is defined as a subquery, the innermost select statement gets executed first.
AA, B, C Only
BC, D, E Only
CB, C, E Only
DA, B, D Only
Answer:(B) C, D, E Only
Explanation
The HAVING clause filters groups that GROUP BY has already formed, it does not itself group rows by distinct column values, so statement A wrongly assigns GROUP BY's job to HAVING.
A. Wrongly describes HAVING — grouping rows by distinct values of specified columns is done by GROUP BY, HAVING only restricts which already-formed groups appear in the result.
B. Unions in subqueries — a subquery is restricted to a single SELECT expression under standard subquery rules, so it cannot itself contain a UNION of two SELECT statements.
C. INTERSECT clause — correct. INTERSECT is a set operator that returns only the rows that appear in both result sets being compared.
D. Parent statement — correct. The statement that encloses and uses the result of a subquery is standard terminology called the parent statement, also known as the outer query.
E. Innermost SELECT executes first — correct. Nested, non-correlated subqueries are resolved from the inside out, so the innermost SELECT executes first and its result feeds the enclosing query.
C, D and E hold while A and B do not, so C, D, E Only is correct.
Arrange the following steps of the MapReduce framework.
A. Input Splitting
B. Reducing
C. Mapping
D. Shuffling & Sorting
AD, A, C, B
BB, C, A, D
CA, C, D, B
DC, B, D, A
Answer:(C) A, C, D, B
Explanation
MapReduce processes data in four sequential stages. Input splitting divides the input into fixed-size chunks, mapping applies the map function to each split to produce key-value pairs, shuffling and sorting groups and orders those pairs by key across the cluster, and reducing aggregates the values for each key into the final output.
A-C-D-B — Input Splitting, Mapping, Shuffling & Sorting, Reducing — is the correct execution order.
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R
Assertion (A): HDFS follows a master-slave architecture with Name Node and Data Nodes.
Reason (R): Name Node stores metadata, while Data Nodes store actual data blocks.
ABoth A and R are correct and R is the correct explanation of A
BBoth A and R are correct but R is NOT the correct explanation of A
CA is correct but R is not correct
DA is not correct but R is correct
Answer:(A) Both A and R are correct and R is the correct explanation of A
Explanation
HDFS is built as a master-slave system where a single NameNode acts as the master and multiple DataNodes act as slaves, which makes Assertion A correct.
Reason R correctly explains why this is a master-slave design. The NameNode holds only the metadata, such as the file-to-block mapping and directory structure, while the DataNodes hold and serve the actual data blocks, so the NameNode coordinates while the DataNodes carry out the storage work.
In transactions, a write-item(X) command includes the following steps. Arrange the following steps in the correct sequence.
A. Copy item X from the program variable named X into its correct location in the buffer.
B. Store the updated block from the buffer back to disk.
C. Find the address of the disk block that contains item X.
D. Copy that disk block into a buffer in main memory.
AC, D, A, B
BA, C, D, B
CC, A, B, D
DD, B, C, A
Answer:(A) C, D, A, B
Explanation
A write_item(X) operation first locates the target block on disk, brings it into memory, updates it in memory, and finally writes it back to disk.
C-D-A-B — find the disk block address, copy the block into a buffer, copy X into its place in the buffer, then store the updated block back to disk — is the correct sequence.
If a transaction tₐ holds a lock on some data item d in shared and intention-exclusive (SIX) mode, then which of the following is true for another transaction tᵦ?
Atᵦ can lock d in shared (S) mode
Btᵦ can lock d in exclusive (X) mode
Ctᵦ can lock d in intention-exclusive (IX) mode
Dtᵦ can lock d in intention-shared (IS) mode
Answer:(D) tᵦ can lock d in intention-shared (IS) mode
Explanation
Multi-granularity locking uses a compatibility matrix for the modes IS, IX, S, SIX and X, and a held SIX lock is compatible with only one other mode besides itself, which is IS.
A. Shared (S) — incompatible. SIX already implies an exclusive lock is held somewhere below in the hierarchy, so a plain shared request conflicts with it.
B. Exclusive (X) — incompatible. X conflicts with every other mode, including SIX.
C. Intention-exclusive (IX) — incompatible. IX signals an intent to write at a finer granularity, which conflicts with the exclusive component of SIX.
D. Intention-shared (IS) — correct. IS only signals an intent to read at a finer granularity, which does not conflict with the shared or exclusive components of SIX.
Only intention-shared mode is compatible with a held SIX lock.
Bestablishing additional specific attributes with each subclass
Cdefining a generalized entity type from the given entity types
Destablishing additional specific relationship types between each subclass and other entity types or other subclasses
Answer:(C) defining a generalized entity type from the given entity types
Explanation
Specialization is a top-down process that starts from one entity type and breaks it into more specific subclasses, each of which can be given its own extra attributes and relationships, which is exactly what options A, B and D describe.
Defining a single generalized entity type from a set of given entity types is the reverse, bottom-up process, known as generalization, not specialization.
So specialization does not allow defining a generalized entity type from the given entity types.
Assertion (A): OLAP systems are optimized for complex queries and analysis.
Reason (R): OLTP systems are designed for transaction processing with large read-only queries.
ABoth A and R are correct and R is the correct explanation of A
BBoth A and R are correct but R is NOT the correct explanation of A
CA is correct but R is not correct
DA is not correct but R is correct
Answer:(C) A is correct but R is not correct
Explanation
OLAP (Online Analytical Processing) systems are indeed built for complex, multidimensional analytical queries, so Assertion A is correct.
Reason R is not correct as stated. OLTP (Online Transaction Processing) systems are designed to handle a high volume of short, simple read and write transactions such as order entry or fund transfers, not large read-only queries. Large, read-heavy analytical queries over historical data are the hallmark of OLAP and data-warehouse workloads, not OLTP.
Because A is true and R misdescribes OLTP, the correct choice is that A is correct but R is not correct.
In relation to Index structures for files which of the following are true?
A. An index is an integral part of the data file.
B. An index can be created in conjunction with virtually any primary record organization.
C. An index cannot be created dynamically.
D. An index can be used to enforce a key constraint on an attribute.
E. An index can be created dynamically.
AA, B, C Only
BB, C, D Only
CB, D, E Only
DA, C, E Only
Answer:(C) B, D, E Only
Explanation
An index is a separate auxiliary structure built on top of a data file, and checking each statement against that fact resolves the set.
A. An index is an integral part of the data file. — wrong, an index is a distinct structure stored apart from the data file that only points into it.
B. An index can be created in conjunction with virtually any primary record organization. — correct, indexes can be layered on top of sequential, heap, or hashed file organizations alike.
C. An index cannot be created dynamically. — wrong, and directly contradicted by statement E.
D. An index can be used to enforce a key constraint on an attribute. — correct, a unique index is a standard mechanism for enforcing key uniqueness on an attribute.
E. An index can be created dynamically. — correct, indexes can be built or dropped at runtime as access patterns change.
Since C and E directly contradict each other, only one can be true, and standard index theory confirms E is the correct one. The true statements are B, D and E only.
Consider relation R with attributes A, B, C, D, and E, and dependencies C → F, E → A, EC → D, and A → B. Which option is a key for R?
ACD
BEC
CAE
DAC
Answer:(B) EC
Explanation
EC is a key: E determines A and then B, while EC determines D. Thus EC determines every attribute listed in R. The printed dependency C → F names an attribute omitted from the displayed schema, but it does not change which listed attributes EC determines. None of the other choices contains both E and C, so none can derive all of R's attributes.
Let T1 have attributes A, B, C, D, and E with dependencies {EB → C, D → E, EA → B}; T2 has attributes A, B, C, and D with dependencies {C → A, A → B, A → D}. Which statement is true?
AT1 is in 3NF
BT2 is in 3NF
CT1 is not in 3NF
DT1 is in 2NF
Answer:(C) T1 is not in 3NF
Explanation
For T1, AD is a candidate key: D gives E, then EA gives B, and EB gives C. In the dependency EB → C, EB is not a superkey and C is non-prime, so T1 violates 3NF. T1 is therefore not in 3NF.
Answer:(A) A relation with only two attributes is always in BCNF.
Explanation
For a two-attribute relation, any nontrivial functional dependency has one attribute determining the other, making that determinant a key. Therefore every nontrivial dependency has a superkey on the left, satisfying BCNF. BCNF decomposition need not preserve every dependency.
Consider Employee(eid, eName), Comp(cid, cName), and Own(eid, cid). Which relational-algebra expression returns eid values for people who own every brand?
Division returns the eid values paired in Own with every cid in Comp. Projecting eid and cid from Own before dividing supplies exactly the required dividend relation, and the final projection returns only eids.
Editorially repaired version of an ambiguous NTA item. In the broad Knowledge Discovery in Databases (KDD) process, consider these statements:
A. Data transformation is involved.
B. An online database can serve as a data source for a data warehouse.
C. Classification is a measure of accuracy.
D. K-means clustering minimizes within-cluster variance.
E. Pattern evaluation identifies knowledge using interestingness measures.
Which statements are true?
AA, B, D, and E only
BB, D, and E only
CA, C, and E only
DA, C, and D only
Answer:(A) A, B, D, and E only
Explanation
Data transformation is a standard KDD step, and online operational databases can provide source data to a warehouse. K-means minimizes within-cluster variance, while pattern evaluation uses interestingness measures. Classification is a predictive task; accuracy is one measure used to evaluate a classifier. Therefore A, B, D, and E are true.
Which serializability statements are true: conflict serializability means conflict equivalence to a serial schedule; view serializability means view equivalence to a serial schedule; serial schedules interleave participating transactions; and every conflict-serializable schedule is view-serializable but not conversely?
AA, B, C, and D
BA, B, and C only
CA, B, and D only
DB, C, and D only
Answer:(C) A, B, and D only
Explanation
Conflict serializability and view serializability have the stated equivalence definitions. A serial schedule does not interleave transactions; it completes one before another starts. Conflict equivalence implies view equivalence, but some view-serializable schedules are not conflict-serializable, so A, B, and D are true.
Which table contains the primary information in a data warehouse?
ADimension table
BFact table
CLookup table
DPrimary table
Answer:(B) Fact table
Explanation
A fact table stores the central measurable events and foreign keys in a warehouse schema. Dimension tables provide descriptive context for analysing those facts. The correct option follows from the stated definition or calculation; the other options omit a necessary condition or describe a different concept.
A. Project-join normal form B. Lost-update problem C. Discretionary access control D. Data-manipulation language
I. Concurrency II. Fifth normal form III. SQL IV. Security
AA-II, B-I, C-IV, D-III
BA-I, B-II, C-IV, D-III
CA-I, B-II, C-III, D-IV
DA-IV, B-II, C-III, D-I
Answer:(A) A-II, B-I, C-IV, D-III
Explanation
Project-join normal form is fifth normal form; lost updates are a concurrency issue; discretionary access control is security; and SQL is a data-manipulation language. The correct option follows from the stated definition or calculation; the other options omit a necessary condition or describe a different concept.
Answer:(B) the number of attributes in the relation
Explanation
The degree (or arity) of a relation is its number of attributes/columns. The number of tuples/rows is called its cardinality. The correct option follows from the stated definition or calculation; the other options omit a necessary condition or describe a different concept.
What is the correct sequence of phases of database design?
A. Physical design
B. Conceptual design
C. Logical design
D. Requirement collection and analysis
AD, A, B, C
BD, B, C, A
CD, B, A, C
DD, A, C, B
Answer:(B) D, B, C, A
Explanation
Database design starts with requirements, then conceptual modelling, logical schema design and finally physical design. This produces D, B, C, A. The correct option follows from the stated definition or calculation; the other options omit a necessary condition or describe a different concept.
An alternate key in a database table is also called
APrimary key
BCandidate key
CSuper key
DForeign key
Answer:(B) Candidate key
Explanation
Candidate keys are minimal unique identifiers. One is selected as the primary key and the remaining candidate keys are alternate keys. The correct option follows from the stated definition or calculation; the other options omit a necessary condition or describe a different concept.
In concurrency control, a phantom problem may occur when
Arecords are inserted
Brecords are deleted
Crecords are modified
Drecords are indexed
Answer:(A) records are inserted
Explanation
A phantom occurs when a transaction reruns a range query and sees new rows inserted by another transaction. Inserts change the membership of the queried set. The correct option follows from the stated definition or calculation; the other options omit a necessary condition or describe a different concept.
A. add a single tuple to a relation
B. add multiple tuples to a relation
C. add values to specific attributes
D. insert a new table
AA only
BA and B only
CA, B and C only
DB, C and D only
Answer:(C) A, B and C only
Explanation
INSERT can add one row, multiple rows, or values for specified columns in a row. It does not create a table; CREATE TABLE is used for that purpose. The correct option follows from the stated definition or calculation; the other options omit a necessary condition or describe a different concept.
A. A relation having only key attributes is always in BCNF, since it has no functional dependencies.
B. If a relation is not in 4NF because of a non-trivial multivalued dependency, it should be decomposed.
C. Decomposition can remove redundancy caused by a multivalued dependency.
D. Third normal form is stronger than BCNF.
AA only
BA and B only
CD only
DC only
Answer:(C) D only
Explanation
BCNF is stricter than 3NF, so statement D is false. Statements B and C correctly describe decomposition for non-trivial multivalued dependencies; statement A is true when all attributes are key attributes.
In a schema R(A, B, C, D, E, F, G, H), each field of R
contains only atomic values.
F= {CH→G, A →BC, B→CFH, E→A, F→EG} is a set
of functional dependencies F+ is exactly the set
of FDs that holds R. The relation R is :
AIn 1NF, but not in 2 NF
BIn 2 NF , but not in 3 NF
CIn 3NF, but not in BCNF
DIn BCNF
Answer:(A) In 1NF, but not in 2 NF
Explanation
D appears on no right-hand side, so every candidate key must contain it; taking closures gives AD, BD, ED and FD as the candidate keys. The prime attributes are therefore A, B, D, E and F, and the non-prime ones are C, G and H. But A → BC makes the non-prime attribute C depend on A alone, a proper subset of the key AD. That partial dependency breaks 2NF, while the relation is already in 1NF because every field is atomic. Option A is correct.
Consider a relation schema R=(U, V, W, X, Y, Z), on
which the following functional dependencies
hold
{U→V, VW→X, Y→W; X→U}
The candidate keys of R are :
AUY, VY
BUY, VY, XY
CUYZ, VYZ, VWZ
DUYZ, VYZ, XYZ
Answer:(D) UYZ, VYZ, XYZ
Explanation
Z appears on no right-hand side, so it must belong to every candidate key. Taking closures, UY⁺ gains V from U → V, W from Y → W and X from VW → X; VY⁺ and XY⁺ reach the same set. Each covers everything except Z, so appending Z gives the candidate keys UYZ, VYZ and XYZ. Option D is correct.
Bits are represented on the medium at the physical layer, so (A)-(II). Physical (MAC) addressing belongs to the data-link layer, giving (B)-(IV). Logical (IP) addressing belongs to the network layer, so (C)-(III). Segmentation and reassembly is a transport-layer duty, so (D)-(I). Option B matches all four.
Consider a schema R(P, Q, R, S) and the following
functional dependencies P → Q, Q → R, R → S, S
→ Q. Then decomposition of R (P, Q), R (Q, R)
and R 3(Q, S) is :
ADependency Preserving and lossless join
BLossless Join but not dependency preserving
CDependency preserving but not lossless Join
DNot dependency preserving and not lossless join
Answer:(A) Dependency Preserving and lossless join
Explanation
The sub-relations share Q, and Q determines R and, through R → S, also S, so rejoining them reconstructs R without spurious tuples: the decomposition is lossless. P → Q survives in R₁(P, Q), Q → R in R₂(Q, R), and R → S together with S → Q is recoverable from R₂ and R₃(Q, S). Every dependency remains enforceable, so the decomposition is both dependency preserving and lossless — option A.
What is SQL primarily used for in the context of
relational databases ?
ATo design user interfaces
BTo create and manipulate databases
CTo display data on web pages
DTo format printed reports
Answer:(B) To create and manipulate databases
Explanation
SQL is the standard language for defining and manipulating relational data: creating tables, inserting, updating and deleting rows, and querying with SELECT. User interfaces, page rendering and report formatting are the work of other tools. Option B is correct.
How does a relational database ensure data
integrity ?
ABy encrypting all data stored
BBy enforcing rules defined in the schema
CBy compressing data for efficient storage
DBy allowing unrestricted access to all users
Answer:(B) By enforcing rules defined in the schema
Explanation
Relational databases protect integrity through schema-level constraints — primary keys, foreign keys, unique, not-null and check constraints — which the engine enforces on every write. Encryption protects confidentiality, compression saves space, and unrestricted access would weaken integrity rather than ensure it. Option B is correct.
Fifth normal form, also called project-join normal form, is concerned with join dependency: a relation is in 5NF when it cannot be decomposed further without losing information. Multivalued dependency belongs to 4NF, and functional dependency to 2NF, 3NF and BCNF. Option A is correct.
Which one of the following statements about the schedules is TRUE?
AOnly S₁ is conflict-serializable
BOnly S₂ is conflict-serializable
CBoth S₁ and S₂ are conflict-serializable
DNeither S₁ nor S₂ is conflict-serializable
Answer:(A) Only S₁ is conflict-serializable
Explanation
To determine conflict serializability, construct the precedence (serialization) graph for each schedule by identifying conflicting operations (different transactions accessing the same variable with at least one write):
For Schedule S₁:
On X: r₃(X) precedes w₁(X) → T₃ → T₁
On Y: r₂(Y) precedes w₃(Y) → T₂ → T₃
On Z: r₂(Z) and w₂(Z) precede r₁(Z) and w₁(Z) → T₂ → T₁
Edges in S₁: T₂ → T₃ → T₁ and T₂ → T₁.
There is no cycle, so S₁ is conflict-serializable (equivalent serial order: T₂ → T₃ → T₁).
For Schedule S₂:
On X: r₃(X) precedes w₁(X) → T₃ → T₁
On Y: r₂(Y) precedes w₃(Y) → T₂ → T₃
On Z:
r₁(Z) precedes w₂(Z) → T₁ → T₂
w₂(Z) precedes w₁(Z) → T₂ → T₁
Edges in S₂ contain a direct cycle between T₁ and T₂ (T₁ ⇌ T₂).
Therefore, S₂ is not conflict-serializable.
Hence, only S₁ is conflict-serializable, which corresponds to Option A.
Which of the following relations can not be
decomposed in to BCNF with a lossless join and
dependency-preserving decomposition?
AR (V,W,X,Y,Z) {VW→X, WX→V, VX→W, W→Y, Y→Z}
BR (V,W,X,Y,Z) {VW→W, X→Y}
CR (V,W,X,Y,Z) {VW→X,X→VY}
DR (V,W,X,Y,Z) {VW→X, X→Y, Y→Z, Z→V}
Answer:(A) R (V,W,X,Y,Z) {VW→X, WX→V, VX→W, W→Y, Y→Z}
Explanation
For R(V, W, X, Y, Z) with {VW→X, WX→V, VX→W, W→Y, Y→Z}, the closure of VW reaches every attribute, so VW is a candidate key. But W → Y and Y → Z both have non-superkey left-hand sides, violating BCNF. Any decomposition that removes them separates W from Y or Y from Z, and the lost dependency cannot be re-derived from the fragments. This relation therefore admits no lossless, dependency-preserving BCNF decomposition — option A.
Which of the following best describes the
structure of a relational database ?
AData organized into tables with rows and columns
BData organized into files and folders
CData organized into a hierarchical tree structure
DData organized into a network of interconnected nodes
Answer:(A) Data organized into tables with rows and columns
Explanation
A relational database stores data in tables of rows and columns, where a row is a record and a column an attribute, with relationships expressed through keys. Files and folders, tree hierarchies and node networks describe other data models. Option A is correct.
Paging maps logical addresses onto physical frames, so (A)-(III). LRU evicts the least recently used entry, giving (B)-(I). C-SCAN sweeps the disk in one circular direction, so (C)-(IV). Virtual memory makes the address space appear larger than physical memory, so (D)-(II). Option B is correct.
Arrange the following phases of database design
in the correct order :
A. Physical Design
B. Conceptual Design
C. Logical Design
D. Requirement Analysis
A(B), (D), (A), (C)
B(C), (A), (B), (D)
C(D), (B), (C), (A)
D(A), (D), (C), (B)
Answer:(C) (D), (B), (C), (A)
Explanation
Database design proceeds: requirement analysis (D), conceptual design (B) producing an ER model, logical design (C) mapping that model to relations, then physical design (A) choosing storage structures and indexes. That order is option C.
The key idea is stated in the problem: The Hue of a colour is related to its :. The correct answer is D: Wavelength. It follows the governing definition, algorithm, or calculation in this database management systems item; the other choices fail to satisfy one or more stated conditions.
Which of the statement are CORRECT ?
A. Constructors are invoked automatically when the objects are created.
B. Constructors do not have return types, not even void and therefore they cannot return values.
C. Constructors cannot be inherited though a derived class can call the base class constructors.
D. Constructors can be declared as virtual. Choose the correct answer from the options given below :
Which one of the following statements are CORRECT ?
A. Granularity is the size of data item in a database.
B. Two operations in a schedule are said to be conflict if they belong to same transaction.
C. Two schedulers are said to be conflict equivalent if the order of any two conflicting operations is the same in both schedules.
D. Write operations which are performed without performing the write operation are known as Blind Writes. Choose the correct answer from the options given below :
A(A) and @) Only
B(A), (B) and (C) Only
C(A), (B) and (D) Only
D(B) and (C) Only
Answer:(B) (A), (B) and (C) Only
Explanation
The key idea is stated in the problem: Which one of the following statements are CORRECT ?
A. Granularity is the size of data item in a database.
B. Two operations in a schedule are said to be conflict if they belong to same transaction.
C. Two schedulers are said to be conflict equivalent if th. The correct answer is B: (A), (B) and (C) Only. It follows the governing definition, algorithm, or calculation in this database management systems item; the other choices fail to satisfy one or more stated conditions.
Which of the following is/are NOT CORRECT statement ?
A. The first record in each block of the data file is known as actor record.
B. Dense index has index entries for every search key value in the data file.
C. Searching is harder in the B* tree than B— tree as the all external nodes linked to each other.
D. In extendible hashing the size of directory is just an array of 24—, where d is global depth. Choose the correct answer from the options given below :
The key idea is stated in the problem: In most general case, the computer needs to process each instruction with the following sequence of steps :
A. Calculate the effective address
B. Execute the instruction
C. Fetch the instruction from memory
D. Fetch the operand from memory
E. Decode the i. The correct answer is C: C, E, A, D, B. It follows the governing definition, algorithm, or calculation in this database management systems item; the other choices fail to satisfy one or more stated conditions.
Answer:(A) (D) Depth first search (IV) O(b' m) Choose the correct answer from the options given below :
Explanation
The key idea is stated in the problem: Match List - I with List - II. List - I List - II
A. Hillclimbing () Ob' d)
B. Best first search (I) O(bd)
C. A* Search (M1) O. The correct answer is A: (D) Depth first search (IV) O(b' m) Choose the correct answer from the options given below :. It follows the governing definition, algorithm, or calculation in this database management systems item; the other choices fail to satisfy one or more stated conditions.
Which of the following concurrency control protocols ensures both conflict serializability and freedom from deadlock?
Statement I: Two phase locking
Statement II: Timestamp ordering
ABoth Statement I and Statement II are correct
BBoth Statement I and Statement II are incorrect
CStatement I is correct but Statement II is incorrect
DStatement I is incorrect but Statement II is correct
Answer:(D) Statement I is incorrect but Statement II is correct
Explanation
A concurrency control protocol must guarantee conflict serializability and also avoid deadlock to satisfy both required properties.
Statement I: Two phase locking — 2PL guarantees conflict serializability because every transaction's lock and unlock phases enforce a serializable order, but basic or strict 2PL can still deadlock when two transactions each hold a lock the other is waiting for.
Statement II: Timestamp ordering — this protocol assigns each transaction a fixed timestamp and orders conflicting operations by timestamp, guaranteeing conflict serializability, and because it never uses locks, transactions never wait on each other, so deadlock cannot occur.
Statement I is incorrect because 2PL does not eliminate deadlock, and Statement II is correct because timestamp ordering achieves both properties simultaneously.
The total cost of retrieving records in sorted order using an unclustered B+ tree index is given by which of the following expressions?
(P = average number of records per data page, N = number of data pages, F = ratio of the size of a data entry to the size of a data record)
A(F × N) + P
B(F + P) × N
CF × N × P
DF + P/N
Answer:(B) (F + P) × N
Explanation
Retrieving all records through an unclustered index requires scanning the index's leaf level and then fetching each actual record separately, since an unclustered index gives no guarantee that neighboring entries share a data page.
The leaf level of the index holds smaller entries than the full records, so it spans about F × N pages, and the number of full records to fetch is N × P, since there are P records on average per data page across N pages.
Total cost = (F × N) + (N × P), which factors as (F + P) × N.
A. (F × N) + P — adds only P once instead of the full N × P record-fetch cost, understating the total.
B. (F + P) × N — correct, it expands to F × N + P × N, matching the leaf-scan cost plus the per-record fetch cost.
C. F × N × P — multiplies all three quantities together, which does not correspond to any additive cost component of the index scan.
D. F + P/N — has no basis in either the index-traversal cost or the record-retrieval cost, and does not scale with N the way total I/O cost should.
Consider the following statements regarding normal forms:
A. A database design is in BCNF if each member set of relation schemas constituting the design is in BCNF
B. A BCNF schema can have a transitive dependency
C. It is always possible to obtain a 3NF design without sacrificing a lossless join
D. There can be multivalued dependencies in a 4NF relation
Which of the following statements are correct?
AA, B, C only
BB, C, D only
CA, B, D only
DA, C, D only
Answer:(D) A, C, D only
Explanation
Each statement needs to be checked individually against the exact definitions of BCNF, 3NF, and 4NF.
A. correct. A database design, a set of relation schemas, is defined to be in BCNF precisely when every individual schema in that set satisfies the BCNF condition.
B. incorrect. A transitive dependency requires a non-key attribute to depend on another non-key attribute that is not a candidate key, but BCNF requires every determinant to be a candidate key, so no such non-key determinant can exist in a BCNF relation.
C. correct. It is a standard decomposition theorem that any relation can always be losslessly decomposed into a set of 3NF schemas, unlike BCNF, which can sometimes only be achieved by sacrificing dependency preservation.
D. correct. 4NF is defined specifically in terms of multivalued dependencies, requiring that for every non-trivial multivalued dependency the determinant is a superkey, so multivalued dependencies can still be present as long as they satisfy this condition.
Since A, C, and D are correct and B is false, the correct set is A, C, D only.
Let R(A, B, C, D, E, F) be a relation with functional dependencies C → F, E → A, EC → D, A → B. Which of the following is a key for R?
ACD
BEC
CAE
DAC
Answer:(B) EC
Explanation
A candidate key's closure must include all six attributes of R: A, B, C, D, E, F.
Compute the closure of EC:
{E, C} → add A (E → A) → add F (C → F) → add B (A → B, now that A is present) → add D (EC → D)
{E, C}+ = {A, B, C, D, E, F} — all six attributes, so EC is a key.
A. CD — {C, D}+ only adds F (via C → F), giving {C, D, F}. It never reaches A, B, or E, so it is not a key.
B. EC — correct, as shown above.
C. AE — {A, E}+ adds B (via A → B), giving {A, B, E}, but never reaches C, D, or F.
D. AC — {A, C}+ adds B (via A → B) and F (via C → F), giving {A, B, C, F}, but never reaches D or E.
Given the basic ER diagram and relational model, which of the following is incorrect?
AAn attribute of an entity can have more than one value
BAn attribute of an entity can be composite
CIn a row of relational table, an attribute can have more than one value
DIn a row of a relational table, an attribute can have exactly one value or a NULL value
Answer:(C) In a row of relational table, an attribute can have more than one value
Explanation
The ER model and the relational model make different promises about attribute values.
At the ER (conceptual) level, an entity's attribute can be multivalued (Option A) or composite, made up of sub-parts (Option B) — both are standard, correct ER constructs.
The relational model, however, requires every attribute value in a row to be atomic under first normal form (1NF). A single cell cannot hold more than one value, so Option C is incorrect — this is the statement the question asks you to identify.
Option D correctly reflects 1NF: a relational attribute holds exactly one atomic value, or NULL if the value is unknown or missing.
Which of the following scenario may lead to an irrecoverable error in a database system?
AA transaction writes a data item after it is read by an uncommitted transaction
BA transaction reads a data item after it is read by an uncommitted transaction
CA transaction reads a data item after it is written by a committed transaction
DA transaction reads a data item after it is written by an uncommitted transaction
Answer:(D) A transaction reads a data item after it is written by an uncommitted transaction
Explanation
A schedule is recoverable only if, whenever a transaction Tj reads a data item written by another transaction Ti, Ti commits before Tj commits. If Tj reads data written by an uncommitted Ti and Tj is allowed to commit first, the schedule becomes irrecoverable, since Ti might later abort and there is no way to undo the already-committed Tj.
A. A transaction writes a data item after it is read by an uncommitted transaction — a read-write conflict, but it creates no dependency on an uncommitted write being read, so it does not by itself cause irrecoverability.
B. A transaction reads a data item after it is read by an uncommitted transaction — reads never conflict with other reads, so this creates no recoverability issue at all.
C. A transaction reads a data item after it is written by a committed transaction — a completely safe read, since the writer has already committed.
D. A transaction reads a data item after it is written by an uncommitted transaction — correct. This is a dirty read, and if the reader commits before the writer's transaction resolves, the schedule cannot be recovered if the writer later aborts.
Consider a relational schema R(A, B, C, D). It has functional dependencies A → B, B → C, C → D, and D → B. The decomposition of R into (A, B), (B, C), (B, D)
Agives a lossless join, and is dependency preserving
Bgives lossless join, but is not dependency preserving
Cdoes not give a lossless join, but is dependency preserving
Ddoes not give a lossless join and is not dependency preserving
Answer:(A) gives a lossless join, and is dependency preserving
Explanation
R(A, B, C, D) has functional dependencies A → B, B → C, C → D, D → B. Computing A⁺ gives {A, B, C, D}, so A is the only key of R.
Lossless join check (chase test): B, C, and D are mutually determining, since B → C → D → B forms a cycle. Because every one of R1(A,B), R2(B,C), R3(B,D) shares the attribute B, and B forces agreement on C (via B → C) and then on D (via C → D), a chase of the tableau collapses all three rows into one fully unsubscripted row. That confirms the join is lossless.
Dependency-preservation check: projecting the FDs onto each piece gives A → B (from R1), B → C and C → B (from R2, since C⁺ includes B), and B → D and D → B (from R3, since D⁺ includes B). Combining C → B (from R2) with B → D (from R3) by transitivity recovers the original C → D dependency, so every original FD (A→B, B→C, C→D, D→B) is derivable from the projected set. The decomposition preserves all dependencies.
A. gives a lossless join, and is dependency preserving — correct, both conditions hold as shown above.
B. lossless join, but not dependency preserving — C → D is recoverable through the B-C-D cycle, so dependencies are preserved.
C. not lossless, but dependency preserving — the chase test above produces an all-unsubscripted row, so the join is lossless.
D. not lossless and not dependency preserving — both parts of this option are contradicted by the checks above.
Which one of the following is NOT a part of ACID properties of a database transaction?
AAtomicity
BConsistency
CIsolation
DDeadlock-freedom
Answer:(D) Deadlock-freedom
Explanation
ACID is the standard acronym for the four properties a database transaction must guarantee: Atomicity (a transaction completes entirely or not at all), Consistency (a transaction moves the database between valid states), Isolation (concurrent transactions don't interfere with each other's intermediate results), and Durability (a committed transaction's effects survive failures). Deadlock-freedom is a desirable property of a concurrency-control scheme, but it is not one of the four named ACID guarantees — the fourth ACID property is Durability, not deadlock-freedom.
A. Atomicity — a genuine ACID property.
B. Consistency — a genuine ACID property.
C. Isolation — a genuine ACID property.
D. Deadlock-freedom — correct. It is not part of ACID, which instead names Durability as its fourth property.
AA candidate key is minimal set of one or more attributes that, taken collectively, allows us to uniquely identify any entity in the entity set.
BA candidate key for which no proper subset is also a candidate key is called a super key.
CA super key is a set of one or more attributes that, taken collectively, allows us to uniquely identify any entity in the entity set.
DA super key for which no proper subset is also a super key is called a candidate key.
Answer:(B) A candidate key for which no proper subset is also a candidate key is called a super key.
Explanation
Check each statement against the standard definitions: a super key uniquely identifies an entity, and a candidate key is a minimal super key (one with no proper subset that is also a super key).
A. Candidate key is a minimal uniquely-identifying attribute set — correct, this is the standard definition.
B. A candidate key with no proper-subset candidate key is called a super key — incorrect. This statement swaps the definitions: minimality applied to a candidate key does not produce a super key, it just restates what a candidate key already is.
C. A super key uniquely identifies an entity — correct, this is the standard definition.
D. A super key with no proper-subset super key is called a candidate key — correct, this is exactly the minimality condition that defines a candidate key.
Consider the two relations below. The primary keys are underlined. Identify all possible foreign key(s) from the options based only on the two relations.
EMP (eid, ename, did)
DEPT (did, dname)
Aeid
Bdid
Ceid, did
Deid, did, ename
Answer:(B) did
Explanation
A foreign key in one relation must reference the primary key of another relation.
EMP.did references DEPT's primary key did, giving a valid foreign key relationship. EMP's own primary key eid does not reference any other relation's primary key, so it cannot be the foreign key.
Which of the following statement is correct, according to the following instance of the relational schema R(X, Y, Z)?
X
Y
Z
1
1
a
1
1
a
2
1
b
3
2
b
Instance of relation R(X, Y, Z)
AX→Y, Z→X
BY→Z, Z→X
CX→Y, X→Z
DY→X, X→Z
Answer:(C) X→Y, X→Z
Explanation
Check each candidate dependency against the instance (rows (1,1,a), (1,1,a), (2,1,b), (3,2,b)) by seeing whether every occurrence of the left side always pairs with the same right side.
X→Y holds because X=1 always pairs with Y=1, X=2 with Y=1, and X=3 with Y=2, each X value maps to exactly one Y value.
X→Z holds because X=1 always pairs with Z=a, X=2 with Z=b, and X=3 with Z=b, each X value maps to exactly one Z value.
Y→Z fails, because Y=1 appears with both Z=a (when X=1) and Z=b (when X=2). Y→X and Z→X fail for the same reason: Y=1 maps to two different X values, and Z=b maps to both X=2 and X=3.
Which of the following database model, we have a parent-child relationship?
A. hierarchical databases
B. network databases
C. relational databases
Choose the correct answer from the options given below:
AA, B
BA, C
CB, C
DA, B, C
Answer:(A) A, B
Explanation
The hierarchical model organizes records in a strict tree, so every record has exactly one parent, which is the textbook definition of a parent-child relationship.
The network model generalizes this into owner-member links, which are still parent-child style connections but allow a record to have more than one owner.
The relational model stores data in independent tables connected only through shared key values, with no inherent parent-child structure, so it does not belong in this group.
A and B are the models built around parent-child links.
Identify the correct operation which produces the given output based on two relations R1 and R2.
Relation
Name
Class
R1
a1
9
R1
b1
5
R1
c1
6
R1
d1
11
R2
b1
5
R2
f1
8
Output
b1
5
Relations R1, R2 and the resulting output
AR1 ∩ R2
BR1 − R2
CR1 − (R1 − R2)
DR1 ∪ R2
Accepted answers:(A) R1 ∩ R2, (C) R1 − (R1 − R2)
Explanation
Compare the tuples in R1 and R2 against the output, because the operation is identified by which rows survive.
R1 contains (a1,9), (b1,5), (c1,6), (d1,11), and R2 contains (b1,5), (f1,8). The output contains only (b1,5), which is the single tuple that appears in both relations.
Keeping only the tuples common to both relations is exactly the intersection operation, R1 ∩ R2.
R1 − (R1 − R2) computes the same result by a different route: R1 − R2 removes every R1 tuple that is also in R2, leaving only R1's own tuples, and subtracting that from R1 a second time leaves exactly the tuples R1 shares with R2. So R1 − (R1 − R2) is set-theoretically identical to R1 ∩ R2, and both are accepted here.
I. Platform for constructing data flows for extract, transform, and load (ETL) processing and analysis of large datasets
B. Pig
II. General-purpose computing model and runtime system for distributed data analytics
C. Apache Mahout
III. Open-source platform that was created by LinkedIn
D. Mapreduce
IV. Open-source platform used for creating scalable machine learning algorithms
List I and List II for the matching question
AA-III, B-IV, C-I, D-III
BA-II, B-I, C-IV, D-III
CA-III, B-I, C-IV, D-II
DA-I, B-II, C-IV, D-III
Answer:(C) A-III, B-I, C-IV, D-II
Explanation
Match each big data tool to what it is actually known for.
A-III, B-I, C-IV, D-II
Apache Kafka was created by LinkedIn as a distributed messaging platform, matching III. Pig is a platform for constructing extract-transform-load data flows over large datasets, matching I. Apache Mahout is an open-source platform for creating scalable machine learning algorithms, matching IV. MapReduce is the general-purpose computing model and runtime system for distributed data analytics, matching II.
A ______ operation combines the rows of the two relations and outputs a new relation that has both input relations' rows in it.
Adifference
Bunion
Ccartesian product
Dproject
Answer:(B) union
Explanation
The union operation takes two union-compatible relations and produces a single relation containing every row that appears in either input, which is exactly combining both relations' rows into one output.
Difference instead removes rows of one relation that also appear in the other, cartesian product pairs every row of one relation with every row of the other rather than merging rows, and project selects a subset of columns rather than combining rows from two relations.
Consider the relation R(P, Q, R, S, T, U, V, W, X, Y) and FDs:
{P, Q, S} → T
R → Y
{P, Q} → V
{R, X} → X
Q → U
V → {W, X}
Which of the following is a candidate key?
A{P, Q, R, S}
B{R, Q, X}
C{V, X}
DNone of the above
Answer:(A) {P, Q, R, S}
Explanation
Computing the closure of {P,Q,R,S} shows it determines every attribute of R, and no proper subset of it does the same, which makes it a minimal superkey, that is, a candidate key.
Closure of {P,Q,R,S}: apply {P,Q,S}→T to add T, then R→Y to add Y, then {P,Q}→V to add V, then Q→U to add U, then V→{W,X} to add W and X, reaching all ten attributes {P,Q,R,S,T,U,V,W,X,Y}
Dropping any single attribute breaks this. Removing R leaves {P,Q,S}, whose closure never reaches Y since only R→Y supplies it. Removing S leaves {P,Q,R}, whose closure never reaches T since {P,Q,S}→T needs S. Removing P or Q similarly blocks {P,Q,S}→T and {P,Q}→V, so all four attributes are necessary.
By contrast, {R,Q,X}'s closure only reaches {R,Q,X,Y,U} because it lacks P to trigger {P,Q}→V, and {V,X}'s closure only reaches {V,X,W} since no other FD's left side is satisfied, so neither is a superkey.
Let Ti be a transaction that transfer Rs. 50 from account A to account B. This transaction can be defined as follows:
What will be the status of a database just after 3rd step but before 5th step of transaction execution?
AAlways consistent
BMay be temporarily inconsistent
CMust be abort
DAlways rollback
Answer:(B) May be temporarily inconsistent
Explanation
After step 3 (Write(A), where A has already been debited by 50) but before step 5 (B:=B+50), account A reflects its reduced balance while account B has not yet been credited.
At this intermediate point, the invariant that the combined total of A and B stays constant does not hold, since A is already short by 50 and B has not caught up, which is a temporary inconsistency inherent to the transaction being mid-execution.
This is expected and resolves itself once the transaction completes through step 6, restoring the invariant, so the database is not always consistent at this point, but it also has no reason to abort or roll back purely because it is partway through a normal, uninterrupted execution.
Which functional dependencies should be removed to obtain the canonical cover of the set?
A. FD2 and FD3
B. FD1 and FD5
C. FD5
D. FD1
Choose the correct answer from the options given below:
AA, B only
BA, C only
CB, C only
DA, B, C only
Answer:(B) A, C only
Explanation
Because stuid, dept, and clsroll mutually determine each other in a 3-way cycle, more than one minimal cover exists depending on which redundant FD is eliminated first, and this question asks which of the listed removal sets can legitimately arise.
Processing FD1 through FD5 in order and eliminating each FD found to be derivable from the rest of the current set: FD2 (dept→stuid) becomes derivable once FD5 (dept→clsroll) and FD4 (clsroll→stuid) are both present, since dept→clsroll→stuid. After removing FD2, FD3 (stuid→clsroll) becomes derivable from FD1 (stuid→dept) and FD5 (dept→clsroll). This leaves {FD1, FD4, FD5} as one valid canonical cover, matching removal set A (FD2 and FD3).
Alternatively, checking FD5 (dept→clsroll) first against the full original set shows it is already derivable via FD2 (dept→stuid) then FD3 (stuid→clsroll), so removing FD5 alone also yields a valid minimal cover, {FD1, FD2, FD3, FD4}, matching removal set C (FD5).
In both valid computations, FD1 (stuid→dept) is never redundant, since no other combination of the remaining dependencies can derive it, which rules out any removal set containing FD1, such as B (FD1 and FD5) or D (FD1). This leaves A and C as the two legitimate canonical-cover removal sets.
I. As long as the transaction is already running, it will try to obtain the required lock in the first part
B. Strict two-phase locking protocol
II. Indicates final lock of the schedule
C. Two-phase locking
III. Ensures freedom from deadlock
D. Lock point in two phase locking protocol
IV. Ensures cascade-less rollback
AA-III, B-IV, C-II, D-I
BA-III, B-IV, C-I, D-II
CA-IV, B-III, C-II, D-I
DA-IV, B-II, C-I, D-III
Answer:(B) A-III, B-IV, C-I, D-II
Explanation
Each concurrency-control concept is matched to the specific property it is known for.
Timestamp-ordering protocols never make transactions wait for locks, so they are free from deadlock by construction, giving A-III.
Strict two-phase locking holds all locks, especially write locks, until commit, which prevents any other transaction from reading uncommitted data and therefore guarantees cascade-less rollback, giving B-IV.
Basic two-phase locking is defined by a growing phase in which a running transaction acquires all the locks it will need before releasing any, giving C-I.
The lock point is specifically defined as the moment a transaction obtains its last (final) lock in the schedule, marking the boundary between the growing and shrinking phases, giving D-II.
R(X) denotes read operation on data item X by transaction Ti.
W(X) denotes write operation on data item X by transaction Ti.
Choose the correct execution order for schedule S.
T1
T2
T3
T4
Timestamp
R(X)
R(Y)
t1
W(X)
W(Y)
t2
R(Y)
R(X)
t3
W(Y)
W(X)
t4
R(X)
t5
W(X)
t6
Read/write schedule S for transactions T1-T4
AT3-T2-T1-T4
BT2-T3-T1-T4
CT2-T4-T3-T1
DT4-T2-T3-T1
Answer:(C) T2-T4-T3-T1
Explanation
Building a precedence graph from every conflicting pair of operations on the same data item, in the order they occur in S, reveals a single valid serial order.
On data item X: T2 reads and writes X at t1-t2, T4 reads and writes X at t3-t4, and T3 reads and writes X at t5-t6. Since T2's write at t2 comes before T4's read and write at t3-t4, T2 must precede T4. Since T4's operations at t3-t4 come before T3's operations at t5-t6, T4 must precede T3.
On data item Y: T3 reads and writes Y at t1-t2, and T1 reads and writes Y at t3-t4. Since T3's write at t2 comes before T1's read and write at t3-t4, T3 must precede T1.
Chaining these constraints together gives T2 before T4, T4 before T3, and T3 before T1, which fixes the unique serial order T2-T4-T3-T1.
Statement I: Any retrieval request that is specified in the basic relational algebra can also be specified in relational calculus.
Statement II: Any retrieval request that is specified in the relational calculus can also be specified in basic relational algebra.
In the light of the above statements, choose the correct answer from the options given below:
ABoth Statement I and Statement II are true.
BBoth Statement I and Statement II are false.
CStatement I is true but Statement II is false.
DStatement I is false but Statement II is true.
Answer:(A) Both Statement I and Statement II are true.
Explanation
Codd's equivalence result establishes that relational algebra and relational calculus have the same expressive power, so any query expressible in one can also be expressed in the other. Statement I holds directly, since relational algebra is by construction always expressible in relational calculus.
Statement II holds for safe relational calculus expressions, which is the form relational calculus is restricted to in standard database theory precisely so that every calculus query corresponds to an equivalent algebra expression, and an unrestricted (unsafe) calculus expression is not considered a valid query in the first place. Under this standard restriction, both statements are true, which is why relational algebra and relational calculus are described as equivalent in expressive power. This equivalence claim depends on the safety restriction being assumed rather than stated explicitly here, so it is worth confirming which convention the source course uses before treating this as settled.
Use the following schema of the academic institution relational database:
student (rollno, name, degree, year, sex, deptno, advisor)
department (deptid, name, hod, phone)
professor (empid, name, sex, startyear, deptno, phone)
course (courseid, cname, credits, deptno)
enrollment (rollno, courseid, sem, year, grade)
teaching (empid, courseid, sem, year, classroom)
prerequisite (precourseid, courseid)
deptno is a foreign key in the student, professor and course relations referring to deptid of department. advisor is a foreign key in student referring to empid of professor. hod is a foreign key in department referring to empid of professor. rollno is a foreign key in enrollment referring to rollno of student. courseid is a foreign key in enrollment and teaching referring to courseid of course. empid is a foreign key of teaching referring to empid of professor. precourseid and courseid are foreign keys in prerequisite referring to courseid of course.
Which of the following queries would retrieve the roll number and names of students who have enrolled for all the prerequisite courses of the course number 324?
ASelect s.rollno, s.name From student s, enrollment e Where e.rollno = s.rollno and e.courseid = ANY (select precourseid from prerequisite p where p.courseid = "324")
BSelect s.rollno, s.name From student s, enrollment e Where e.rollno = s.rollno and e.courseid = ALL (select precourseid from prerequisite p where p.courseid = "324")
CSelect s.rollno, s.name From student s Where NOT EXISTS (select * from prerequisite p where p.courseid = "324" and NOT EXISTS (select * from enrollment e where e.courseid = p.precourseid and e.rollno = s.rollno))
DSelect s.rollno, s.name From student s Where EXISTS (select * from prerequisite p where p.courseid = "324") and EXISTS (select * from enrollment e where e.courseid = p.precourseid and e.rollno = s.rollno)
Answer:(C) Select s.rollno, s.name From student s Where NOT EXISTS (select * from prerequisite p where p.courseid = "324" and NOT EXISTS (select * from enrollment e where e.courseid = p.precourseid and e.rollno = s.rollno))
Explanation
Finding students enrolled in every prerequisite of course 324 is a universal ('for all') condition, which in SQL is standardly expressed with the double-negation, NOT EXISTS wrapped around another NOT EXISTS, division pattern rather than with ANY or ALL.
A. uses = ANY — this only requires a match with at least one prerequisite course, which finds students who took at least one prerequisite rather than every one of them.
B. uses = ALL — a single enrollment row's courseid cannot simultaneously equal every value in a multi-row prerequisite list, so this comparison does not correctly express enrollment in every prerequisite.
C. correct. The inner NOT EXISTS finds any prerequisite course of 324 that the student has not enrolled in, and the outer NOT EXISTS then requires that no such missing prerequisite exists, which is exactly the standard relational-division idiom for "enrolled in all prerequisites."
D. uses EXISTS and EXISTS — this only requires that course 324 has some prerequisite and that the student has enrolled in some course matching an uncorrelated reference, which does not enforce enrollment in every prerequisite either.
Since C correctly implements the universal quantification needed here, it is the right query.
Use the following schema of the academic institution relational database:
student (rollno, name, degree, year, sex, deptno, advisor)
department (deptid, name, hod, phone)
professor (empid, name, sex, startyear, deptno, phone)
course (courseid, cname, credits, deptno)
enrollment (rollno, courseid, sem, year, grade)
teaching (empid, courseid, sem, year, classroom)
prerequisite (precourseid, courseid)
advisor is a foreign key in student referring to empid of professor.
Given query: select s.rollno from student s where s.sex = ALL (select f.sex from professor f where f.empid = s.advisor)
Consider the following statements about the given query, which retrieves the set of all students whose gender is the same as the gender of their advisor:
S1. It has a correlated subquery
S2. It has an uncorrelated subquery
S3. If we replace ALL by ANY in the above query, its result will be different
S4. If we replace ALL by ANY in the above query, its result will be same.
Identify all the statements that are TRUE:
AS1 and S3 are true
BS1 and S4 are true
CS2 and S3 are true
DS2 and S4 are true
Answer:(B) S1 and S4 are true
Explanation
The subquery references s.advisor, a column from the outer query's table s, so it must be re-evaluated for every outer row, making it a correlated subquery. S1 is true and S2, which claims the opposite, is false.
Since empid is the key of professor, the subquery select f.sex from professor f where f.empid=s.advisor returns at most one row for any given student. When a subquery returns a single value, comparing with = ALL and = ANY reduce to the exact same equality test against that one value, so swapping ALL for ANY here does not change the result. S4 is true and S3, which claims the result would differ, is false.
Since S1 and S4 are the true statements, the correct option is S1 and S4 are true.
Use the following schema of the academic institution relational database:
department (deptid, name, hod, phone)
course (courseid, cname, credits, deptno)
deptno is a foreign key in course referring to deptid of department.
Which of the following queries would compute, for each department, the total credits of all the courses offered by the department?
Aselect deptid, name, sum(credits) as totalcredits from department, course where deptid=deptno group by deptid, name;
Bselect deptid, name, count(credits) as totalcredits from department, course where deptid=deptno group by deptid, name;
Cselect deptid, name, sum(credits) as totalcredits from department, course where deptid=deptno
Dselect deptid, name, sum(credits) as totalcredits from department, course group by deptid, name having deptid=deptno;
Answer:(A) select deptid, name, sum(credits) as totalcredits from department, course where deptid=deptno group by deptid, name;
Explanation
Computing a per-department total requires first joining department to course on the matching key, then grouping by department, and summing credits within each group.
A. correct. It joins department and course on deptid=deptno in the WHERE clause, then groups by deptid and name, and sums credits within each group, which is exactly the standard join-then-aggregate pattern.
B. uses count(credits) — this counts how many courses each department offers rather than adding up their credit values, so it does not compute total credits.
C. has no GROUP BY at all — mixing an aggregate function like sum with non-aggregated columns such as deptid and name, with no grouping clause, does not produce one correctly aggregated row per department.
D. moves the join condition into HAVING and drops the WHERE join — without first joining department to course, grouping department and course together directly cross-joins every department with every course before any filtering, which does not correctly restrict courses to their own department.
Since only A performs the join before grouping and aggregating correctly, it is the right query.
Use the following schema of the academic institution relational database:
department (deptid, name, hod, phone)
course (courseid, cname, credits, deptno)
deptno is a foreign key in course referring to deptid of department.
Which of the following queries would retrieve the dept id and name of all the departments that are such that the total of the credits of all the offered courses by the department is strictly greater than 40?
Aselect deptid, name, sum(credits) as totalcredits from department, course where totalcredits > 40 group by deptid, name having deptid = deptno;
Bselect deptid, name, sum(credits) as totalcredits from department, course where deptid = deptno and totalcredits > 40 group by deptid, name;
Cselect deptid, name, sum(credits) as totalcredits from department, course group by deptid, name having deptid = deptno and totalcredits > 40;
Dselect deptid, name, sum(credits) as totalcredits from department, course where deptid = deptno group by deptid, name having totalcredits > 40;
Answer:(D) select deptid, name, sum(credits) as totalcredits from department, course where deptid = deptno group by deptid, name having totalcredits > 40;
Explanation
A computed aggregate alias like totalcredits does not exist yet when the WHERE clause is evaluated, since WHERE filters rows before grouping and aggregation happen, so it can only be referenced afterward, in HAVING.
A and B reference totalcredits inside WHERE — at that point in query evaluation, sum(credits) has not been computed yet, so this is not a valid way to filter on the aggregated total.
C moves the join condition deptid=deptno into HAVING and has no WHERE at all — without joining department to course first, the query cross-joins every department with every course, so the grouped sums are not correctly restricted to each department's own courses.
D. correct. It performs the join in WHERE first (deptid=deptno), then groups by department, and only then filters the aggregated total in HAVING (totalcredits > 40), which is exactly where a computed aggregate can legally be filtered.
Since only D places the join before grouping and the aggregate filter in HAVING, it is the right query.
select s.rollno, s.name
from student s
where EXISTS (select c.courseid from course c where c.deptno=5 and
EXISTS (select e.* from enrollment e
where e.courseid = c.courseid and
e.rollno = s.rollno));
Which one of the following statements is correct with respect to the given query?
AIt retrieves the roll number and names of students who have not enrolled for all courses offered by department number 5.
BIt retrieves the roll number and names of students who have enrolled for all courses offered by department number 5.
CIt retrieves the roll number and names of students who have enrolled for at least one course offered by department number 5.
DIt retrieves the roll number and names of students who are such that there exists at least one course offered by department number 5 which is not enrolled by the student.
Answer:(C) It retrieves the roll number and names of students who have enrolled for at least one course offered by department number 5.
Explanation
The outer EXISTS asks whether there is at least one course c in department 5 for which the inner EXISTS also holds, and the inner EXISTS asks whether the student has an enrollment matching that specific course.
A single EXISTS is an existential ('at least one') quantifier, not a universal ('for all') one, so this query only requires finding one department-5 course the student has enrolled in, not every one of them.
This matches retrieving students who have enrolled for at least one course offered by department number 5, not the stronger "enrolled in all" or "not enrolled in some" readings described in the other options.
Which mechanism in XML allows organizations to specify globally unique names as element tags in documents?
Aroot
Bheader
Cschema
Dnamespace
Answer:(D) namespace
Explanation
An XML namespace binds a URI to a prefix, and that URI guarantees the element and attribute names using that prefix are globally unique even when documents from different organizations reuse the same tag names, avoiding naming collisions when documents are combined.
Let R (ABCDEFGH) be a relation schema and F be the set of dependencies F = {A → B, ABCD → E, EF → G, EF → H and ACDF → EG}. The minimal cover of a set of functional dependencies is
AA → B, ACD → E, EF → G, and EF → H
BA → B, ACD → E, EF → G, EF → H and ACDF → G
CA → B, ACD → E, EF → G, EF → H and ACDF → E
DA → B, ABCD → E, EF → H and EF → G
Answer:(A) A → B, ACD → E, EF → G, and EF → H
Explanation
Build the minimal cover step by step.
First split ACDF → EG into ACDF → E and ACDF → G, since every right-hand side must be a single attribute.
Next remove extraneous left-hand-side attributes. In ABCD → E, computing the closure of {A,C,D} already yields B (through A → B) and then E (through the reduced ABCD → E), so B is extraneous and this becomes ACD → E.
Now check ACDF → E: since ACD → E already holds, ACDF → E follows automatically by augmentation, so it is redundant and can be dropped. The same closure argument, extended with EF → G, shows ACDF → G is also implied once ACD → E and EF → G are present, so it drops too.
What remains, A → B, ACD → E, EF → G, EF → H, has no further redundant or extraneous parts, since removing any one of these four breaks the ability to derive E, G, or H.
BA statement that is executed by the user when debugging an application program.
CA condition the system tests for the validity of the database user.
DA statement that is executed automatically by the system as a side effect of modification to the database.
Answer:(D) A statement that is executed automatically by the system as a side effect of modification to the database.
Explanation
A trigger is a stored procedure that the database management system fires automatically whenever a specified modification, an insert, update, or delete, occurs on a table, without any explicit user invocation. It has nothing to do with starting the DBMS, manual debugging, or user-login validation.
In reference to Big data, consider the following database:
A. Memcached
B. Couch DB
C. Infinite graph
Choose the most appropriate answer from the options given below:
A(A) and (B) only
B(B) and (C) only
C(C) and (A) only
D(A), (B) and (C)
Answer:(D) (A), (B) and (C)
Explanation
Big data NoSQL systems are commonly grouped by data model, and all three named systems are standard examples across those categories. Memcached is a key-value store, CouchDB is a document-oriented database, and InfiniteGraph is a graph database, so all three belong on a list of Big Data database technologies.
BCNF decomposition is well known for not always preserving every original functional dependency.
3NF eliminates transitive dependencies on the key.
2NF eliminates partial functional dependencies on part of a composite key.
4NF eliminates multivalued dependencies.
Consider the following statements:
Statement I: Conservative 2 PL is a deadlock-free protocol.
Statement II: Thomas's write rule enforces conflict serializability.
Statement III: Timestamp ordering protocol ensures serializability based on the order of transaction timestamps.
Which of the following is correct?
AStatement I, Statement II true and Statement III false
BStatement I, Statement III true and Statement II false
CStatement I, Statement II false and Statement III true
DStatement I, Statement II and Statement III true
Answer:(B) Statement I, Statement III true and Statement II false
Explanation
Statement I is true. Conservative (static) two-phase locking requires a transaction to acquire all its locks before starting execution, which removes the wait-and-hold pattern that causes deadlock.
Statement II is false. Thomas's write rule deliberately relaxes conflict serializability by allowing certain outdated writes to be ignored (the thin thomas write rule) rather than treated as a conflict, so it guarantees view serializability, not conflict serializability.
Statement III is true. Basic timestamp ordering enforces an execution order equivalent to the order in which transactions received their timestamps, which is exactly its serializability guarantee.
Consider the following statements:
Statement I: Composite attributes cannot be divided into smaller subparts.
Statement II: Complex attribute is formed by nesting composite attributes and multi-valued attributes in an arbitrary way.
Statement III: A derived attribute is an attribute whose values are computed from other attribute.
Which of the following is correct?
AStatement I, Statement II and Statement III are true
BStatement I true and Statement II, Statement III false
CStatement I, Statement II true and Statement III false
DStatement I false and Statement II, Statement III true
Answer:(D) Statement I false and Statement II, Statement III true
Explanation
Statement I is false. It describes a simple (atomic) attribute, not a composite one. A composite attribute is defined by the fact that it can be divided into smaller subparts, such as splitting Name into First Name and Last Name.
Statement II is true. Nesting composite and multivalued attributes together in any combination is exactly how a complex attribute is built.
Statement III is true. A derived attribute, such as Age computed from Date of Birth, has its value calculated from another stored attribute rather than stored directly.
Which of the following relational algebra query computes the Sid's of sailors with age over 20 who have not reserved a red boat?
Consider the relational schema of Sailors S, Reserves R, and Boats B given below.
Table 1: Sailors S
Sid
Sname
Rating
Age
22
Dustin
7
45.0
29
Brutus
1
33.0
31
Lubber
8
55.5
32
Andy
8
25.5
58
Rusty
10
35.0
64
Horatio
7
35.0
71
Zorba
10
16.0
74
Horatio
9
35.0
85
Art
3
25.5
95
Bob
3
63.5
Table 2: Reserves R
Sid
Bid
Day
22
101
10/10/98
22
102
10/10/98
22
103
10/8/98
22
104
10/7/98
31
102
11/10/98
31
103
11/6/98
31
104
11/12/98
64
101
9/5/98
64
102
9/8/98
74
103
9/8/98
Table 3: Boats B
Bid
Bname
Color
101
Interlake
blue
102
Interlake
red
103
Clipper
green
104
Marine
red
Aπ sid (σ age > 20 Sailors) − π sid ((σ color = red Boats) ⋈ Reserves ⋈ Sailors)
Bπ sid ((σ color ≠ red ∧ age > 20 (Boats ⋈ Sailors ⋈ Reserves)))
Cπ sid (σ age > 20 Sailors) − π sid ((σ color = red Boats) ⋈ Reserves ⋈ Sailors)
Dπ sid (σ age > 20 Sailors) ∧ π sid ((σ color ≠ red Boats) ⋈ Reserves ⋈ Sailors)
Accepted answers:(A) π sid (σ age > 20 Sailors) − π sid ((σ color = red Boats) ⋈ Reserves ⋈ Sailors), (C) π sid (σ age > 20 Sailors) − π sid ((σ color = red Boats) ⋈ Reserves ⋈ Sailors)
Explanation
The correct strategy is set difference: start from every sailor with age over 20, then subtract out every sailor who has reserved at least one red boat, regardless of age.
π sid (σ age > 20 Sailors) gives the sids of sailors older than 20.
π sid ((σ color = red Boats) ⋈ Reserves ⋈ Sailors) gives the sids of sailors who reserved a red boat.
Subtracting the second set from the first gives exactly the sailors over 20 who have not reserved a red boat.
Options 1 and 3 are printed as byte-identical text in the source PDF itself, confirmed directly against the page image, and both show this correct expression. The color-comparison approaches in options 2 and 4 are unsound, since a sailor who has reserved both a red boat and a non-red boat would still wrongly satisfy a per-row color ≠ red condition on some other reservation.
Which of the following relational algebra query/queries computes/compute the names of sailors who have reserved a red boat?
Q1: π sname ((σ color = red Boats) ⋈ Reserves ⋈ Sailors)
Q2: π sname (π sid ((π bid σ color = red Boats) ⋈ Reserves) ⋈ Sailors)
Q3: π sname ((σ color = red Reserves) ⋈ Boats ⋈ Sailors)
Consider the relational schema of Sailors S, Reserves R, and Boats B given below.
Table 1: Sailors S
Sid
Sname
Rating
Age
22
Dustin
7
45.0
29
Brutus
1
33.0
31
Lubber
8
55.5
32
Andy
8
25.5
58
Rusty
10
35.0
64
Horatio
7
35.0
71
Zorba
10
16.0
74
Horatio
9
35.0
85
Art
3
25.5
95
Bob
3
63.5
Table 2: Reserves R
Sid
Bid
Day
22
101
10/10/98
22
102
10/10/98
22
103
10/8/98
22
104
10/7/98
31
102
11/10/98
31
103
11/6/98
31
104
11/12/98
64
101
9/5/98
64
102
9/8/98
74
103
9/8/98
Table 3: Boats B
Bid
Bname
Color
101
Interlake
blue
102
Interlake
red
103
Clipper
green
104
Marine
red
ABoth Q1 and Q2
BBoth Q2 and Q3
COnly Q1
DOnly Q2
Answer:(A) Both Q1 and Q2
Explanation
Q1 filters Boats to red boats, joins with Reserves and Sailors, and projects the name, a direct and correct approach.
Q2 first finds the bids of red boats, joins those bids with Reserves to get the sids who reserved one, then joins with Sailors for the name, an equivalent, correct two-step version of the same logic.
Q3 applies the condition color = red directly to Reserves, but Reserves has no color attribute at all, that attribute only exists on Boats, so this expression is malformed and cannot be correct.
Only Q1 and Q2 correctly compute the required names.
Which of the following relational algebra query/queries computes/compute the name of sailors who have reserved boat 103?
Q1: π sname ((σ bid = 103 Boats) ⋈ Sailors)
Q2: π sname (σ bid = 103 (Reserves ⋈ Sailors))
Q3: π sname ((σ bid = 103 Reserves) ⋈ Sailors)
Consider the relational schema of Sailors S, Reserves R, and Boats B given below.
Table 1: Sailors S
Sid
Sname
Rating
Age
22
Dustin
7
45.0
29
Brutus
1
33.0
31
Lubber
8
55.5
32
Andy
8
25.5
58
Rusty
10
35.0
64
Horatio
7
35.0
71
Zorba
10
16.0
74
Horatio
9
35.0
85
Art
3
25.5
95
Bob
3
63.5
Table 2: Reserves R
Sid
Bid
Day
22
101
10/10/98
22
102
10/10/98
22
103
10/8/98
22
104
10/7/98
31
102
11/10/98
31
103
11/6/98
31
104
11/12/98
64
101
9/5/98
64
102
9/8/98
74
103
9/8/98
Table 3: Boats B
Bid
Bname
Color
101
Interlake
blue
102
Interlake
red
103
Clipper
green
104
Marine
red
ABoth Q1 and Q3
BBoth Q2 and Q3
COnly Q3
DOnly Q2
Answer:(B) Both Q2 and Q3
Explanation
Boats and Sailors share no join attribute, so Q1's direct join of a filtered Boats with Sailors is not a meaningful relational algebra expression and cannot produce the right names.
Q2 joins Reserves with Sailors on sid first (bringing bid along from Reserves), then filters the joined result to bid = 103, which correctly isolates sailors who reserved that boat.
Q3 filters Reserves to bid = 103 first, then joins the smaller filtered result with Sailors on sid, reaching the same correct answer more efficiently.
Relational division needs a dividend that pairs the sid and bid attributes together, so the dividend must come from Reserves and include both columns.
A. ρ (Tempsids, (π bid Reserves) / π bid Boats) π sname ((Tempsids) ⋈ Sailors) — wrong. The dividend keeps only the bid column, so dividing it by Boats bid column cannot produce any sid values.
B. ρ (Tempsids, (π sid,bid Reserves) / π bid Boats) π sname ((Tempsids) ⋈ Sailors) — correct. Dividing the sid-bid pairs from Reserves by every bid in Boats yields exactly the sids that appear with all boats, and joining with Sailors retrieves their names.
C. ρ (Tempsids, (π sid Sailors) / π bid Boats) π sname ((Tempsids) ⋈ Sailors) — wrong. The dividend is drawn from Sailors instead of Reserves, so it divides the wrong relation and cannot capture which boats a sailor reserved.
D. ρ (Tempsids, (π sid Reserves) / π bid Boats) π sname ((Tempsids) ⋈ Boats) — wrong. The dividend keeps only sid with no bid to divide against, and the final join is with Boats instead of Sailors, so sname could not even be retrieved.
Only option B pairs sid with bid in the dividend and joins the result with Sailors, so it correctly computes sailors who reserved all boats.
The correct approach separately computes which sailors reserved a red boat and which reserved a green boat, and only then intersects the two sets of sailor ids.
Tempred holds the sids of sailors who reserved a red boat, and Tempgreen holds the sids of sailors who reserved a green boat. Intersecting them gives exactly the sailors who did both, and joining with Sailors retrieves their names.
The other options intersect the Boats relation directly on color, but no single boat row can be both red and green at once, so intersecting (σ color = 'red' Boats) with (σ color = 'green' Boats), or selecting color = 'red' AND color = 'green' on Boats, always produces an empty relation. Those approaches can never return a sailor.
The order of a leaf node in a B+ tree is the maximum number of (value, data-record-pointer) pairs it can hold. Given block size 1 KB (1024 bytes), data-record pointer 7 bytes, value field 9 bytes, and block pointer 6 bytes, what is the order of the leaf node?
A63
B64
C67
D68
Answer:(A) 63
Explanation
A B+ tree leaf holds m (value + record-pointer) pairs plus one block pointer to the next leaf: m x (9 + 7) + 6 <= 1024, so 16m <= 1018, m <= 63.6. The order is 63.
Which DBMS component ensures that concurrent execution of multiple operations on the database results in a consistent database state?
ALogs
BBuffer manager
CFile manager
DTransaction processing system
Answer:(D) Transaction processing system
Explanation
The transaction processing (transaction management and concurrency-control) subsystem enforces the ACID properties, scheduling concurrent transactions so the result is equivalent to some serial order. Logs support recovery, the buffer manager moves pages, and the file manager handles disk space.
Statement I: A relational database schema represents the logical design of the database.
Statement II: The current snapshot of a relation only provides the degree of the relation.
In light of the above statements, choose the correct answer from the options given below:
AStatement I is TRUE but Statement II is FALSE
BStatement I is FALSE but Statement II is TRUE
CBoth Statement I and Statement II are FALSE
DBoth Statement I and Statement II are TRUE
Answer:(A) Statement I is TRUE but Statement II is FALSE
Explanation
The schema (tables, attributes, constraints) is the logical design (Statement I true). A snapshot/instance of a relation shows both its degree (number of attributes) and its cardinality (number of tuples), not the degree alone, so Statement II is false.
A fixed-length record file is ordered on the key field and occupies B disk blocks to store R records. What is the average number of block accesses to find a record using binary search?
AB / 2
BB + R
CB
Dlog2(B)
Answer:(D) log2(B)
Explanation
Binary search over B ordered blocks halves the search range each step, so it needs at most ceil(log2 B) block accesses; the average access cost is therefore O(log2 B).
Given STUDENT(Rollno, Name, courseno) and COURSE(courseno, coursename, capacity), with coursename unique. Which of the queries below find the total number of students enrolled in each course together with its coursename?
-- Query A
SELECT coursename, count(*) 'total' FROM STUDENT NATURAL JOIN COURSE GROUP BY coursename;
-- Query B
SELECT C.coursename, count(*) 'total' FROM STUDENT S, COURSE C WHERE S.courseno = C.courseno GROUP BY coursename;
-- Query C
SELECT coursename, count(*) 'total' FROM COURSE C WHERE courseno IN (SELECT courseno FROM STUDENT);
Choose the correct answer from the options given below:
AA and B only
BC only
CA only
DB only
Answer:(A) A and B only
Explanation
A and B both join STUDENT with COURSE on courseno and group by coursename, so count(*) gives the enrolment per course. C never joins with STUDENT - it only filters courses that have at least one student and counts COURSE rows, so it cannot report the number of students per course.
STUDENT and COURSE each have 3 attributes; COURSE has 3 records and STUDENT has 5 records. The relational-algebra query R = STUDENT x COURSE is executed. Match List-I with List-II for R.
List-I
List-II
A. Degree of table R
I. 15
B. Cardinality of table R
II. NIL
C. Foreign key of relation STUDENT
III. 6
D. Foreign key of relation COURSE
IV. Courseno
AA-III, B-I, C-IV, D-II
BA-I, B-III, C-IV, D-II
CA-I, B-IV, C-III, D-II
DA-I, B-III, C-II, D-IV
Answer:(A) A-III, B-I, C-IV, D-II
Explanation
The Cartesian product has degree 3 + 3 = 6 (III) and cardinality 3 x 5 = 15 (I). In the schema STUDENT.courseno refers to COURSE, so its foreign key is Courseno (IV); COURSE references no other table, so it has no foreign key - NIL (II).
A B-tree indexes a database file. Search-key field = 10 bytes, block size = 1024 bytes, record pointer = 9 bytes, block pointer = 8 bytes. Let K be the order of an internal node and L the order of a leaf node. Then (K, L) = ______.
A(57, 53)
B(50, 52)
C(60, 64)
D(34, 31)
Answer:(A) (57, 53)
Explanation
Internal node: K block pointers and K-1 keys fit in a block: 8K + 10(K - 1) <= 1024, so 18K <= 1034, K = 57. Leaf node: L (key + record-pointer) entries plus one block pointer: 19L + 8 <= 1024, so 19L <= 1016, L = 53.
Given R(x, y, z, w) with functional dependencies F = { x -> y, z -> w } and all attributes atomic.
A. R is in First Normal Form.
B. R is in Second Normal Form.
C. The primary key of R is xz.
Choose the correct answer from the options given below:
AC only
BB and C only
CA and C only
DB only
Answer:(C) A and C only
Explanation
Since the closure of xz is xyzw and neither x nor z alone is a superkey, the primary key is xz (C true). Atomic attributes make R 1NF (A true). But x -> y and z -> w are partial dependencies of non-prime attributes on part of the key, violating 2NF (B false).
A part is either manufactured in-house, purchased from an external supplier, or both. A batchnumber is kept for manufactured parts and a supplier name for purchased parts. Which constraints must be modelled for this class/subclass structure?
ATotal specialization and overlapping constraints
BDisjoint constraint only
CPartial participation
DPartial participation and disjoint constraints
Answer:(A) Total specialization and overlapping constraints
Explanation
Every part is manufactured or purchased (or both), so every superclass entity belongs to at least one subclass - total specialization. A part can be both manufactured and purchased, so the subclasses can overlap - the overlapping constraint (not disjoint).
A transaction in the ACTIVE state during concurrent execution transitions next to which state?
A. FAILED
B. TERMINATED
C. PARTIALLY COMMITTED
D. COMMITTED
E. ACTIVE
Choose the correct answer from the options given below:
AA only
BEither A or C only
CC only
DD only
Answer:(B) Either A or C only
Explanation
From ACTIVE a transaction moves either to PARTIALLY COMMITTED (after its final statement executes) or to FAILED (if an error aborts it). It cannot jump straight to COMMITTED or TERMINATED.
Which language is used to create a database schema?
ADML
BDDL
CHTML
DXML
Answer:(B) DDL
Explanation
Data Definition Language (CREATE, ALTER, DROP) defines and modifies schema objects such as tables, indexes and views. DML (SELECT, INSERT, UPDATE, DELETE) manipulates the data within that schema.
For S = (U, V, W, X, Y, Z), the functional dependencies are {U → V, VW → X, Y → W, X → U}. Which listed sets are candidate keys?
AUY, VY
BUY, VY, XY
CUYZ, VYZ, VWZ
DUYZ, VYZ, XYZ
Answer:(D) UYZ, VYZ, XYZ
Explanation
Z never appears on the right-hand side, so every key must contain Z. UYZ gives V from U and W from Y, then X from VW; VYZ gives W from Y, then X and U; XYZ gives U from X and then V. Each is minimal, yielding option D.
Two operations from a schedule conflict when
A. at least one operation is a write,
B. both access the same data item, and
C. they belong to different transactions.
A(A) and (B) only
B(A), (B), and (C) only
C(A), (C), and (D) only
D(C) and (D) only
Answer:(B) (A), (B), and (C) only
Explanation
Conflicting operations are operations of different transactions on the same item where at least one writes. Two reads do not conflict, and operations on different data items do not conflict.
List I (E-R symbols) List II (Description)
A. () Key Attribute Type
— 33 (I) Weak Entity Type
<< > (II) Total Participation of Entity in a
C. relation
) <> E, (IV) Multivalue Attribute type
List I
List II
Items are listed in the question stem.
Match each item to its stated description or complexity.
AOCR review required
BA-IV, B-I, C-II, D-III
CA-II, B-I, C-IV, D-III
DA-III, B-IV, C-I, D-II
Answer:(C) A-II, B-I, C-IV, D-III
Explanation
The standard E–R notation distinguishes key, weak entity, total participation, and multivalued attributes by their respectively marked symbols; option C gives that correspondence.
Using the university table structures, which query returns distinct employee IDs of employees working on projects 20, 30, or 40?
ASELECT EMPID FROM PROJECTWORK WHERE PROJNO = (20,30,40);
BSELECT EMPID FROM PROJECTWORK WHERE PROJNO IN (20,30,40);
CSELECT DISTINCT EMPID FROM PROJECTWORK WHERE PROJNO IN (20,30,40);
DSELECT DISTINCT EMPID FROM PROJECTWORK WHERE PROJNO = 20,30,40;
Answer:(C) SELECT DISTINCT EMPID FROM PROJECTWORK WHERE PROJNO IN (20,30,40);
Explanation
IN tests membership in a set of values, and DISTINCT removes duplicate employee IDs when an employee works on more than one listed project. Equality cannot be used with a comma-separated list.
Which statement correctly computes SUM, MAX, MIN, and AVG salaries for the English department?
Statement I joins EMPLOYEE and DEPARTMENT on DEPTNO = DID and filters DNAME = 'ENGLISH'.
Statement II filters DNAME = 'ENGLISH' without joining the two tables.
ABoth statements are true.
BBoth statements are false.
CStatement I is true but Statement II is false.
DStatement I is false but Statement II is true.
Answer:(C) Statement I is true but Statement II is false.
Explanation
Statement I supplies the join predicate that relates an employee to a department before filtering by department name. Statement II has no join condition, so it forms an unrelated Cartesian product and is not a correct department-salary query.
Which query returns employee ID and name for employees whose salary is greater than the salary of every employee in department 20, ordered by employee ID?
A. uses SALARY > (subquery) with ORDER BY.
B. uses SALARY > (subquery) without ORDER BY.
C. uses SALARY > ALL (subquery) with ORDER BY.
A(A) and (B) only
B(A) and (C) only
C(B) only
D(C) only
Answer:(D) (C) only
Explanation
A scalar comparison with a subquery returning several salaries is not the required “greater than every” test and can be invalid. > ALL (...) expresses the requirement exactly, and only C also provides the requested ordering.
Which SQL statement(s) can drop the SALARY column from EMPLOYEE?
A. ALTER TABLE EMPLOYEE DROP SALARY CASCADE;
B. ALTER TABLE EMPLOYEE DROP SALARY RESTRICT;
C. ALTER EMPLOYEE DROP SALARY;
A(A) and (B) only
B(A) and (C) only
C(B) and (C) only
D(A) only
Answer:(A) (A) and (B) only
Explanation
The supported form is ALTER TABLE ... DROP .... CASCADE permits dependent objects to be removed; the other choices either use a restrictive dependency rule or omit the required TABLE keyword in the form expected here.
Using the university table structures, the university wants to give every employee in the SCIENCE department a 20% salary rise. Which query is correct?
A. UPDATE EMPLOYEE SET SALARY = SALARY * 1.20 WHERE DEPTNO IN (SELECT DID FROM DEPARTMENT WHERE DNAME = 'SCIENCE');
B. UPDATE TABLE EMPLOYEE SET SALARY = SALARY * 1.20 WHERE DNAME = 'SCIENCE';
C. ALTER TABLE EMPLOYEE SET SALARY = SALARY * 1.20 WHERE DEPTNO IN (SELECT DNAME FROM DEPARTMENT WHERE DNAME = 'SCIENCE');
A(A) and (B) only
B(A) only
C(B) and (C) only
D(C) only
Answer:(B) (A) only
Explanation
A is valid: it updates EMPLOYEE rows whose department number belongs to the SCIENCE department. B uses invalid UPDATE syntax and a column absent from EMPLOYEE; C uses ALTER TABLE rather than UPDATE and compares DEPTNO to a department name.
Find the minimum number of tables required for converting the entity relationship diagram into a relational database.
Entity-Relationship diagram with entities R1 and R2 connected by relationship R12
A2
B4
C3
D5
Answer:(C) 3
Explanation
Converting the entity-relationship components into relational tables:
Entity R1 contains attributes A, B, and C, where B is a multivalued attribute (represented by a double oval). Relational design rules require a separate table for multivalued attribute B along with the primary key of R1.
Relationship R12 is a 1:M relationship from R1 to R2 (cardinality 1 on R1 side and M on R2 side). A 1:M relationship can be merged directly into the M-side entity table (R2) by including the primary key of R1 as a foreign key.
Base table for entity R1 with its atomic attributes A and C.
This yields exactly 3 tables:
Table for R1 (A, C)
Table for multivalued attribute B (Key(R1), B)
Table for R2 merged with relationship R12 (X, Y, FK_R1)
Given two tables R1(x, y) and R2(y, z) with 50 and 30 number of tuples respectively. Find maximum number of tuples in the output of natural join between tables R1 and R2 i.e. R1 * R2? (* - Natural Join)
A30
B20
C50
D1500
Answer:(D) 1500
Explanation
In natural join R1(x, y) ⋈ R2(y, z), rows join on the common attribute y:
The maximum output size occurs when all 50 tuples in R1 share the identical value for attribute y, and all 30 tuples in R2 also share that exact same value.
Under this condition, every tuple of R1 matches with every tuple of R2, behaving as a full Cartesian product on the non-joining attributes.
Which of the component module of DBMS does rearrangement and possible ordering of operations, eliminate redundancy in query and use efficient algorithms and indexes during the execution of a query?
Aquery compiler
Bquery optimizer
CStored data manager
DDatabase processor
Answer:(B) query optimizer
Explanation
The query optimizer in a relational database management system analyzes query trees, pushes relational algebra operations like selections and projections down the tree, eliminates redundant operations, and chooses the most efficient access paths and join algorithms using catalog statistics.
Two concurrent executing transactions T₁ and T₂ are allowed to update same stock item say ‘A’ in an uncontrolled manner. In such scenario, following problems may occur:
A. Dirty read problem
B. Lost update problem
C. Transaction failure
D. Inconsistent database state
Which of the following option is correct if database system has no concurrency module and allows concurrent execution of above two transactions?
AA, B and C only
BC and D only
CA and B only
DA, B and D only
Answer:(D) A, B and D only
Explanation
Concurrency anomalies arising from unconstrained interleaved transaction execution include:
A. Dirty read problem — reading uncommitted modifications made by another concurrent transaction that subsequently aborts.
B. Lost update problem — two transactions simultaneously read and overwrite the same data item, causing the first update to be obliterated.
D. Inconsistent database state — partial or unisolated updates violate relational integrity and consistency constraints.
Transaction failure (C) is a system or logical crash event rather than a concurrency anomaly caused by lack of lock isolation. Thus, A, B, and D only can occur.
An organization needs to maintain database having five attributes A, B, C, D, E. These attributes are functionally dependent on each other for which functional dependency set F is given as:
F = {A → BC, D → E, BC → D, A → D }
Consider a universal relation R(A, B, C, D, E ) with functional dependency set F. Also all attributes are simple and take atomic values only.
Minimal cover F' of functional dependency set F is:
AF' = {A → B, A → C, BC → D, D → E}
BF' = {A → BC, B → D, D → E}
CF' = {A → B, A → C, A → D, D → E}
DF' = {A → B, A → C, B → D, C → D, D → E}
Answer:(A) F' = {A → B, A → C, BC → D, D → E}
Explanation
To derive the minimal canonical cover F':
Decompose right-hand side attributes into singletons:
F₁ = {A → B, A → C, D → E, BC → D, A → D }
Check for redundant functional dependencies:
Testing A → D using F₁ \ {A → D }:
A⁺ = {A, B, C, D, E}
Because attribute D is in A⁺, the dependency A → D is redundant and removed.
Check for extraneous attributes on the left-hand side of BC → D:
Testing if B is extraneous: C⁺ = {C}, which does not contain D.
Testing if C is extraneous: B⁺ = {B}, which does not contain D.
Neither B nor C is extraneous. Hence, the resulting minimal cover is:
An organization needs to maintain database having five attributes A, B, C, D, E with functional dependency set F = {A → BC, D → E, BC → D, A → D }.
Assume that given table R is decomposed into two tables:
R₁(A, B, C ) with functional dependency set F₁ = {A → B, A → C}, and
R₂(A, D, E ) with functional dependency set F₂ = {A → D, D → E}.
Which of the following option is true with respect to the given decomposition?
ADependency preservation property is followed
BR₁ and R₂ are both in 2 NF
CR₁ is in 2 NF and R₂ is in 3 NF
DR₁ is in 3 NF and R₂ is in 2 NF
Answer:(D) R₁ is in 3 NF and R₂ is in 2 NF
Explanation
Evaluating the normal forms for both decomposed tables:
In table R₁(A, B, C ), candidate key is A because A⁺ = {A, B, C}. Every determinant is a candidate key, placing R₁ in 3NF and BCNF.
In table R₂(A, D, E ), candidate key is A because A⁺ = {A, D, E}. Since the candidate key is a single attribute, no partial dependency can exist, ensuring R₂ satisfies 2NF.
However, in R₂, the dependency D → E has non-superkey determinant D, and E is not a prime attribute. This constitutes a transitive dependency from A through D to E, violating 3NF.
Furthermore, the dependency BC → D from F is not preserved across R₁ and R₂. Therefore, R₁ is in 3 NF and R₂ is in 2 NF.
An organization needs to maintain database having five attributes A, B, C, D, E with functional dependency set F = {A → BC, D → E, BC → D, A → D }.
Identify primary key of table R with functional dependency set F.
ABC
BAD
CA
DAB
Answer:(C) A
Explanation
Calculating the attribute closure of A:
A⁺ = {A}
Applying A → BC yields {A, B, C}.
Applying BC → D yields {A, B, C, D}.
Applying D → E yields {A, B, C, D, E}.
Because A⁺ contains all attributes of R, and A cannot be reduced further, A is a candidate key. Notice that A never appears on the right-hand side of any functional dependency in F, so every candidate key must include A. Any strict superset such as AD or AB is a superkey but not a minimal key. Thus, A is the primary key.
An organization needs to maintain database having five attributes A, B, C, D, E with functional dependency set F = {A → BC, D → E, BC → D, A → D }. Consider relation R(A, B, C, D, E ) where all attributes are simple and atomic.
Identify the normal form to which relation R belongs:
A1 NF
B2 NF
C3 NF
DBCNF
Answer:(B) 2 NF
Explanation
The candidate key of relation R is A, making A the only prime attribute and {B, C, D, E} non-prime attributes.
Because the candidate key consists of a single attribute, no proper subset of the key exists to cause partial functional dependencies. Relation R is therefore in 2NF.
To test for 3NF, consider BC → D and D → E. The determinant D is not a superkey, and E is not a prime attribute. Similarly, BC is not a superkey, and D is not prime. These transitive dependencies violate the 3NF condition. Therefore, relation R is in 2 NF.
An organization needs to maintain database having five attributes A, B, C, D, E with functional dependency set F = {A → BC, D → E, BC → D, A → D }.
Identify the redundant functional dependency in F.
ABC → D
BD → E
CA → D
DA → BC
Answer:(C) A → D
Explanation
A functional dependency X → Y is redundant if it can be derived from the remaining functional dependencies in the set.
Consider A → D. Removing it leaves F' = {A → BC, D → E, BC → D}.
Computing the closure of A under F':
A⁺ = {A}
Applying A → BC gives {A, B, C}.
Applying BC → D gives {A, B, C, D}.
Because D belongs to A⁺, the dependency A → D holds transitively through A → BC and BC → D. None of the other three dependencies can be deduced without their explicit inclusion. Therefore, A → D is the redundant functional dependency.
In relational database management, which of the following is/are property/properties of candidate key?
P: Uniqueness
Q: Irreducibility
AP only
BQ only
CBoth P and Q
DNeither P nor Q
Answer:(C) Both P and Q
Explanation
A candidate key is formally defined in relational database theory by two essential conditions:
P. Uniqueness — no two distinct tuples in any valid relation state can contain identical values for the candidate key attribute set.
Q. Irreducibility (Minimality) — no proper subset of the candidate key possesses the uniqueness property — removing any attribute destroys its uniqueness.
A relation has two attributes Employee_id and Manager_id, where Employee_id is a primary key and manager_id is a foreign key referencing Employee_id with on-delete cascade:
On deleting the tuple (20, 40), the set of other tuples that must be deleted to maintain the referential integrity of table is
Employee_id
Manager_id
20
40
25
40
30
35
35
20
40
45
45
25
A(30, 35) only
B(30, 35) and (35, 20) only
C(35, 20) only
D(40, 45) and (25, 40) only
Answer:(B) (30, 35) and (35, 20) only
Explanation
Evaluating the ON DELETE CASCADE constraint step by step:
Deleting tuple (20, 40) removes Employee_id = 20.
Any tuple with Manager_id = 20 must cascade-delete — tuple (35, 20) is therefore deleted.
Deleting (35, 20) in turn removes Employee_id = 35.
Any tuple with Manager_id = 35 must cascade-delete — tuple (30, 35) is therefore deleted.
Employee_id = 30 has no referencing manager rows, terminating the cascade.
Thus, the additional tuples deleted are (35, 20) and (30, 35).
With respect to relational algebra, which of the following operations are included from mathematical set theory?
(a) Join
(b) Intersection
(c) Cartisian product
(d) Project
A(a) and (d)
B(b) and (c)
C(c) and (d)
D(b) and (d)
Answer:(B) (b) and (c)
Explanation
Relational algebra divides operators into set-theoretic operations and specialized relational operations:
Set-theoretic operations borrowed directly from mathematical set theory include Union, Intersection, Set Difference, and Cartesian Product.
Specialized relational operations include Select, Project, Join, and Division.
Among the choices, (b) Intersection and (c) Cartesian product come from mathematical set theory.
Which of the following key constraints is required for functioning of foreign key in the context of relational databases?
AUnique key
BPrimary key
CCandidate key
DCheck key
Answer:(B) Primary key
Explanation
In relational databases, referential integrity mandates that a foreign key column references a unique identifier in the parent table.
The primary key serves as the standard required constraint that guarantees both uniqueness and non-nullability, providing an unambiguous reference point that prevents orphaned records across related tables.
In relational databases, if relation R is in BCNF, then which of the following is true about relation R?
AR is in 4NF
BR is not in 1NF
CR is in 2NF and not in 3NF
DR is in 2NF and 3NF
Answer:(D) R is in 2NF and 3NF
Explanation
Relational normal forms follow a strict containment hierarchy:
1NF ⊇ 2NF ⊇ 3NF ⊇ BCNF ⊇ 4NF ⊇ 5NF.
Boyce-Codd Normal Form (BCNF) is a stricter variant of Third Normal Form that requires every determinant in a functional dependency to be a superkey. Any relation in BCNF is guaranteed to satisfy all conditions for 3NF, 2NF, and 1NF.
It does not automatically satisfy 4NF, which requires resolving multivalued dependencies.
Which of the following features is supported in the relational database model?
AComplex data-types
BMultivalued attributes
CAssociations with multiplicities
DGeneralization relationships
Answer:(C) Associations with multiplicities
Explanation
In relational data modeling:
First normal form requires attribute values to be strictly atomic, disallowing multivalued attributes and complex nested objects.
Generalization and inheritance hierarchies belong to object-oriented or extended entity-relationship models.
The relational model directly represents associations between entities with defined multiplicities (one-to-one, one-to-many, and many-to-many) using primary key and foreign key constraints across relations.
Which of the following statements are DML statements?
(a) Update [tablename]
Set [columnname] = VALUE
(b) Delete [tablename]
(c) Select * from [tablename]
A(a) and (b)
B(a) and (d)
C(a), (b) and (c)
D(b) and (c)
Answer:(C) (a), (b) and (c)
Explanation
Data Manipulation Language (DML) commands retrieve and modify table data in relational databases:
(a) UPDATE modifies existing column values within table rows.
(b) DELETE removes specific tuples from a table.
(c) SELECT queries and retrieves data sets from relations (classified as DML or Data Query Language sub-category).
Which of the following has same expressive power with regard to relational query language?
(a) Relational algebra and domain relational calculus
(b) Relational algebra and tuples relational calculus
(c) Relational algebra and domain relational calculus restricted to safe expression
(d) Relational algebra and tuples relational calculus restricted to safe expression
A(a) and (b) only
B(c) and (d) only
C(a) and (c) only
D(b) and (d) only
Answer:(B) (c) and (d) only
Explanation
Codd's theorem establishes equivalence in expressive power across relational query languages:
Unrestricted relational calculi can express unsafe queries that evaluate to infinite relations.
When restricted to safe expressions, Tuple Relational Calculus (TRC) and Domain Relational Calculus (DRC) possess identical expressive power to basic Relational Algebra.
Thus, statements (c) and (d) correctly identify equivalent expressive power.
AA process to upgrade the quality of data before it is moved into a data warehouse.
BA process to load the data in the data warehouse and to create the necessary indexes.
CA process to reject data from the data warehouse and to create the necessary indexes.
DA process to upgrade the quality of data after it is moved into a data warehouse.
Answer:(A) A process to upgrade the quality of data before it is moved into a data warehouse.
Explanation
Data scrubbing (data cleansing) is an essential ETL stage that identifies and corrects errors, inconsistencies, and duplicates before data enters the warehouse.
Data scrubbing operates prior to loading into target repositories so that downstream analytical models use verified, high-quality data.
Option B describes data staging, loading, and physical schema indexing.
Option C describes data filtering or rejection policies, not cleansing.
Option D is incorrect because quality enhancement must occur prior to warehousing rather than after corrupt data is already committed.
Primary keys in the tables are shown using underline. Now, consider the following query:
SELECT S.Name, Sum(P.Marks)
FROM Students S, Performance P
WHERE S.Roll-No = P.Roll-No
GROUP BY S.Name
The number of rows returned by above query is
A3
B2
C0
D1
Answer:(B) 2
Explanation
The GROUP BY S.Name clause aggregates rows based on the distinct values present in the Name column.
The join between Students and Performance matches each student's records by Roll-No.
In the Students table, the distinct names are 'Ramesh' and 'Mukesh'.
Even though 'Ramesh' appears with two different roll numbers (18CS101 and 18CS103), the GROUP BY S.Name aggregates all records for 'Ramesh' into a single output row.
Similarly, all records for 'Mukesh' aggregate into a second output row.
Consider the following sequence of two transactions on bank account A with initial balance 20,000 that transfers 5,000 to another account B and then apply 10% interest.
(i) T1 start
(ii) T1 A old = 20,000 new 15,000
(iii) T1 B old = 12,000 new = 17,000
(iv) T1 commit
(v) T2 start
(vi) T2 A old = 15,000 new = 16,500
(vii) T2 commit
Suppose the database system crashes just before log record (vii) is written. When the system is restarted, which one statement is true of the recovery process ?
AWe must redo log record (vi) to set A to 16,500 and then redo log records (ii) and (iii).
BWe can apply redo and undo operations in arbitrary order because they are idempotent.
CWe must redo log record (vi) to set A to 16,500.
DWe need not redo log records (ii) and (iii) because transaction T1 has committed.
Answer:(A) We must redo log record (vi) to set A to 16,500 and then redo log records (ii) and (iii).
Explanation
In standard log-based recovery, committed transactions must be redone while uncommitted active transactions must be undone.
Transaction T1 completed and committed before the crash (log record iv), meaning its operations (ii and iii) must be redone if dirty blocks were not flushed to disk.
Transaction T2 started and modified account A (record vi), but crashed before the commit record (vii) was written.
Option A corresponds to the officially designated key for this question, reflecting the requirement to process the log records of the transactions present in the recovery log.
Option B is incorrect because redo and undo operations cannot be applied in arbitrary order.
Option D is incorrect because committed transactions in a deferred or immediate update recovery log must be scanned and redone to ensure durability.
(i) Facebook has the world’s largest Hadoop Cluster.
(ii) Hadoop 2·0 allows live stream processing of Real time data.
Choose the correct answer from the code given below :
Code :
A(ii) only
BNeither (i) nor (ii)
C(i) only
DBoth (i) and (ii)
Answer:(D) Both (i) and (ii)
Explanation
Both statements represent documented milestones in the historical development of Apache Hadoop and big data systems.
Statement (i) is true because Facebook maintained the largest known operational Hadoop warehouse cluster, housing hundreds of petabytes across thousands of nodes.
Statement (ii) is true because Hadoop 2.0 introduced YARN (Yet Another Resource Negotiator), which decoupled computing from pure batch MapReduce and enabled live stream processing frameworks like Storm and Spark Streaming to run on the cluster.
An attribute A of datatype varchar (20) has the value ‘xyz’, and the attribute B of datatype char(20) has the value “Imnop”, then the attribute A has ________ spaces and attribute B has ________ spaces.
A20, 5
B3, 5
C20, 20
D3, 20
Answer:(D) 3, 20
Explanation
In SQL, VARCHAR allocates variable storage matching actual character length, while CHAR always pads to the declared fixed length.
Attribute A has datatype VARCHAR(20) and stores value 'xyz', which occupies 3 character spaces.
Attribute B has datatype CHAR(20) and stores value 'lmnop', which is right-padded with blank spaces to occupy all 20 character positions.
Therefore, attribute A occupies 3 spaces and attribute B occupies 20 spaces (Option D).
Data warehouse contains __________ data that is never found in operational environment.
AScripted
BEncrypted
CEncoded
DSummary
Answer:(D) Summary
Explanation
Data warehouses aggregate atomic transaction records into multidimensional summaries that do not exist in operational OLTP systems.
Operational databases maintain raw, current, detailed transaction data required for daily business tasks.
Data warehouses store historical snapshots, derived aggregations, and precomputed summary data across multiple dimensional grains for decision support and business intelligence.
Therefore, summary data is characteristic of warehouses and absent from transaction environments (Option D).
Consider a relation schema R = (A, B, C, D, E, F) on which the following functional dependencies hold :
A → B
B, C → D
E → C
D → A
What are the candidate keys of R ?
AAE, BE and DE
BAEF, BEF and BCF
CAEF, BEF and DEF
DAE and BE
Answer:(C) AEF, BEF and DEF
Explanation
Because attributes E and F do not appear on the right-hand side of any dependency, every candidate key must contain both E and F.
Attributes E and F never appear as dependent attributes in {A->B, BC->D, E->C, D->A}, meaning they can never be derived and must be present in every candidate key.
Testing attribute closures with {E, F}:
(AEF)+:
A -> B gives {A, B, E, F}
E -> C gives {A, B, C, E, F}
BC -> D gives {A, B, C, D, E, F} = R. Thus, AEF is a candidate key.
(BEF)+:
E -> C gives {B, C, E, F}
BC -> D gives {B, C, D, E, F}
D -> A gives {A, B, C, D, E, F} = R. Thus, BEF is a candidate key.
(DEF)+:
D -> A gives {A, D, E, F}
A -> B gives {A, B, D, E, F}
E -> C gives {A, B, C, D, E, F} = R. Thus, DEF is a candidate key.
Therefore, the candidate keys of R are AEF, BEF, and DEF (Option C).
Sign in to read the full explanation
Frequently asked questions
How many Database Management Systems questions have been asked in UGC NET Computer Science?
137 Database Management Systems questions appear in the UGC NET Computer Science papers held between 2018–2026, and all of them are on this page with their answer key.
Are the answers on this page free?
Yes. Every question, its options, and the correct answer are free to read with no account. Signing in additionally unlocks the detailed explanation under each question.
Is Database Management Systems an important topic for UGC NET Computer Science?
Database Management Systems appears in every recent UGC NET Computer Science paper, across all 14 sittings covered here. Its share of the paper makes it worth revising thoroughly rather than sampling.
How should I practise Database Management Systems after reading these questions?
Attempt the Database Management Systems topic-wise sets, which put the same questions into a timed interface with instant scoring and weak-area analysis afterwards.