UGC NET · Computer Science

DBMS & SQL Previous Year Questions (page 2)

85 DBMS & SQL (Computer Science) questions asked in UGC NET previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.

  • 85 questions
  • Official answer key
  • Free

Other Computer Science topics

Q51UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Which of the following statements is TRUE? D₁ : The decomposition of the schema R(A, B, C) into R₁(A, B) and R₂ (A, C) is always lossless. D₂ : The decomposition of the schema R(A, B, C, D, E) having AD →B, C →DE, B → AE and AE →C, into R₁ (A, B, D) and R₂ (A, C, D, E) is lossless.
  1. ABoth D₁ and D₂
  2. BNeither D₁ nor D₂
  3. COnly D₁
  4. DOnly D₂
Show answerHide answer

Correct answer: (D) Only D₂

Explanation

D₂: R₁ ∩ R₂ = {A, D}, and AD → B, so AD is a key of R₁ (A, B, D); the decomposition is lossless. D₁ is not always lossless since no FDs are given: if B → A and C → A, then the common attribute A is not a key of either table, so the decomposition is lossy. Hence only D₂.

Q52UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Consider the following statements : (1) Revised simplex method requires lesser computations than the Simplex method. (2) Revised simplex method automatically generates the inverse of the current basis matrix. (3) Less number of entries are needed in each table of revised simplex method than usual simplex method. Which of these statements are correct?
  1. A(1) and (2) only
  2. B(1) and (3) only
  3. C(2) and (3) only
  4. D(1), (2) and (3)
Show answerHide answer

Correct answer: (D) (1), (2) and (3)

Explanation

The revised simplex method is an improvement over the simplex method: it is computationally more efficient (fewer computations), it automatically generates the inverse of the current basis matrix, and fewer entries are needed in each table, since the simplex method updates the entire tableau while only a small part is used. So answer is option (d).

Q53UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)
_____ is subject oriented, integrated, time variant, nonvolatile collection of data in support of management decisions
  1. AData mining
  2. BWeb mining
  3. CData warehouse
  4. DDatabase management system
Show answerHide answer

Correct answer: (C) Data warehouse

Explanation

Data warehouse is a subject oriented integrated, time variant and non volatile collection of data in support of management decision making process. A data warehouse is a copy of transaction data specifically structured for query & analysis.

Q54UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)
In data mining, classification rules are extracted from _____
  1. AData
  2. BInformation
  3. CDecision tree
  4. DDatabase
Show answerHide answer

Correct answer: (C) Decision tree

Explanation

A decision tree can be used to visually and explicitly represent decision & division making. In data mining, a decision tree describes data but not decisions; rather the resulting classification tree can be an input for decision making.

Q55UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)
Consider a database table R with attributes A and B. Which of the following SQL queries is illegal?
  1. ASELECT A FROM R;
  2. BSELECT A, COUNT (*) FROM R;
  3. CSELECT A, COUNT(*) FROM GROUP BY A;
  4. DSELECT A, B, COUNT (*) FROM R GROUP BY A, B;
Show answerHide answer

Correct answer: (B) SELECT A, COUNT (*) FROM R;

Explanation

SELECT A, COUNT(*) FROM R; is illegal: when an aggregate function (SUM, AVG, COUNT, MAX, MIN) is used in the SELECT clause along with a non-aggregated attribute, a GROUP BY clause on that attribute is required. SELECT A, B, COUNT(*) FROM R GROUP BY A, B; is legal.

Q56UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)
DBMS provides the facility of accessing data from a database through
  1. ADDL
  2. BDML
  3. CDBA
  4. DSchema
Show answerHide answer

Correct answer: (B) DML

Explanation

Accessing the data from the database in DBMS done through DML (Data manipulation language). The DML command can access the data from a database.

Q57UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)
Relational database schema normalization is NOT for :
  1. AReducing the number of joins required to satisfy a query
  2. BEliminating uncontrolled redundancy of data stored in the database
  3. CEliminating number of anomalies that could otherwise occur with inserts and deletes
  4. DEnsuring that functional dependencies are enforced
Show answerHide answer

Correct answer: (A) Reducing the number of joins required to satisfy a query

Explanation

Relational database schema normalization is not for reducing the number of joins required to satisfy a query (normalization usually increases joins). Its goals are eliminating redundancy and anomalies and enforcing functional dependencies.

Q58UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)
Consider the following statement regarding relational database model : (1) NULL values can be used to opt a tuple out enforcement of a foreign key (2) Suppose that table T has only one candidate key. If Q is in 3NF, then it is also in BCNF (3) The difference between the project operator (Π) in relational algebra and the SELECT keyword in SQL is that if the resulting table/set has more than one occurrences of the same tuple, then Π will return only one of them, while SQL SELECT will return all One can determine that :
  1. A(1) and (2) are true
  2. B(1) and (3) are true
  3. C(2) and (3) are true
  4. D(1), (2) and (3) are true
Show answerHide answer

Correct answer: (D) (1), (2) and (3) are true

Explanation

(1) NULL values can be used to opt a tuple out of enforcement of a foreign key: correct. (2) If a table has only one candidate key and is in 3NF, then it is also in BCNF: correct. (3) Projection (Π) in relational algebra eliminates duplicate tuples while SQL SELECT returns all of them: correct. So (1), (2) and (3) are true.

Q59UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)
Let R and S be two fuzzy relations defined as R (rows x₁, x₂; columns y₁, y₂): x₁: [0.7 0.5] x₂: [0.8 0.4] and S (rows y₁, y₂; columns z₁, z₂, z₃): y₁: [0.9 0.6 0.2] y₂: [0.1 0.7 0.5] Then, the resulting relation, T, which relates elements of universe of X to elements of universe of Z using max-product composition is given by
  1. AT (columns z₁, z₂, z₃): x₁: [0.68 0.89 0.39], x₂: [0.76 0.72 0.32]
  2. BT (columns z₁, z₂, z₃): x₁: [0.68 0.89 0.39], x₂: [0.72 0.76 0.32]
  3. CT (columns z₁, z₂, z₃): x₁: [0.63 0.42 0.35], x₂: [0.72 0.48 0.20]
  4. DT (columns z₁, z₂, z₃): x₁: [0.05 0.35 0.14], x₂: [0.04 0.28 0.16]
Show answerHide answer

Correct answer: (C) T (columns z₁, z₂, z₃): x₁: [0.63 0.42 0.35], x₂: [0.72 0.48 0.20]

Explanation

Max-product composition: T(x, z) = max over y of R(x, y) × S(y, z). T(x₁, z₁) = max(0.7 × 0.9, 0.5 × 0.1) = 0.63; T(x₁, z₂) = max(0.42, 0.35) = 0.42; T(x₁, z₃) = max(0.14, 0.25) = 0.35. T(x₂, z₁) = max(0.72, 0.04) = 0.72; T(x₂, z₂) = max(0.48, 0.28) = 0.48; T(x₂, z₃) = max(0.16, 0.20) = 0.20. So T = x₁: [0.63 0.42 0.35], x₂: [0.72 0.48 0.20].

Q60UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)
Consider a file currently consisting of 50 blocks. Assume that the file control block and the index block is already in memory. If a block is added at the end (and the block information to be added is stored in memory), then how many disk I/O operations are required for indexed (single-level) allocation strategy?
  1. A1
  2. B101
  3. C27
  4. D0
Show answerHide answer

Correct answer: (A) 1

Explanation

The file control block and the index block are already in memory, so for indexed allocation only the new block has to be written to disk: 1 disk I/O operation. (Contiguous and linked allocation would need 1 and 3 operations respectively in this scenario, per the book.)

Q61UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)
The Global conceptual Schema in a distributed database contains information about global relations. The condition that all the data of the global relation must be mapped into the fragments, that is, it must not happen that a data item which belongs to a global relation does not belong to any fragment, is called:
  1. ADisjointness condition
  2. BCompleteness condition
  3. CReconstruction condition
  4. DAggregation condition
Show answerHide answer

Correct answer: (B) Completeness condition

Explanation

Completeness Condition: All the data of the global relation must be mapped into the fragments; it must not happen that a data item which belongs to a global relation does not belong to any fragment.

Q62UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)
Consider the following ORACLE relations: One (x, y) = {<2, 5>, <1, 6>, <1, 6>, <1, 6>, <4, 8>, <4, 8>} Two (x, y) = {<2, 55>, <1, 1>, <4, 4>, <1, 6>, <4, 8>, <4, 8>} Consider the following two SQL queries SQ1 and SQ2: SQ1: (SELECT * FROM One) EXCEPT (SELECT * FROM Two); SQ2: (SELECT * FROM One) EXCEPT ALL (SELECT * FROM Two); For each of the SQL queries, what is the cardinality (number of rows) of the result obtained when applied to the instances above?
  1. A2 and 1 respectively
  2. B1 and 2 respectively
  3. C2 and 2 respectively
  4. D1 and 1 respectively
Show answerHide answer

Correct answer: (B) 1 and 2 respectively

Explanation

EXCEPT returns the records present in the first relation and absent in the second, eliminating duplicates: SQ1 gives the single tuple <2, 5>. EXCEPT ALL keeps duplicates, removing one occurrence per matching tuple: SQ2 gives <2, 5> and <1, 6> (2 tuples). So the cardinalities are 1 and 2.

Q63UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)
Which of the following statements is/are True regarding some advantages that an object-oriented DBMS (OODBMS) offers over a relational database? I. An OODBMS avoids the "impedance mismatch" problem. II. An OODBMS avoids the "phantom" problem. III. An OODBMS provides higher performance concurrency control than most relational database. IV. An OODBMS provides faster access to individual data objects once they have been read from disk.
  1. AII and III only
  2. BI and IV only
  3. CI, II, and III only
  4. DI, III and IV only
Show answerHide answer

Correct answer: (B) I and IV only

Explanation

I. An OODBMS avoids the "impedance mismatch" problem: true. II. An OODBMS does not avoid the "phantom" problem. III. An OODBMS does not provide higher-performance concurrency control than most relational databases. IV. An OODBMS provides faster access to individual data objects once they have been read from disk: true. So I and IV only.

Q64UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
If h is chosen from a universal collection of hash functions and is used to hash n keys into a table of size m, where n ≤ m, the expected number of collisions involving a particular key x is less than .........
  1. A1
  2. B1/n
  3. C1/m
  4. Dn/m
Show answerHide answer

Correct answer: (A) 1

Explanation

Let Xᵢ = 1 if key x collides with the i-th other key, else 0. For a universal hash family, a given pair collides with probability 1/m, so E(Xᵢ) = 1/m. Summing over the other (n – 1) keys, the expected number of collisions involving x is (n – 1)/m. Since n ≤ m, this is less than 1.

Q65UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
______ refers loosely to the process of semi-automatically analyzing large databases to find useful patterns
  1. ADatamining
  2. BData warehousing
  3. CDBMS
  4. DData mirroring
Show answerHide answer

Correct answer: (A) Datamining

Explanation

The practice of examining large pre-existing databases in order to generate new information is data mining. It refers loosely to the process of semi-automatically analyzing large databases to find useful patterns.

Q66UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
An attribute A of data type varchar (20) has value 'Ram' and the attribute B of data type char (20) has value 'Sita' in oracle. The attribute A has ______ memory spaces and B has ______ memory spaces.
  1. A20, 20
  2. B3, 20
  3. C3, 4
  4. D20, 4
Show answerHide answer

Correct answer: (B) 3, 20

Explanation

CHAR and VARCHAR are both declared with a maximum length, but a CHAR column is fixed to the declared length (padded with spaces), while VARCHAR(20) uses only as much space as the stored value. So A ('Ram') needs 3 spaces and B ('Sita') needs 20.

Q67UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
Integrity constraints ensure that change made to the database by authorized users do not result into loss of data consistency. Which of the following statement (s) is (are) true w.r.t. the examples of integrity constraints? (A) An instructor Id. No. cannot be null, provided Instructor Id No. being primary key. (B) No two citizens have same Adhar-Id (C) Budget of a company must be zero
  1. A(A), (B) and (C) are true
  2. B(A) false, (B) and (C) are true
  3. C(A) and (B) are true; (C) false
  4. D(A), (B) and (C) are false
Show answerHide answer

Correct answer: (C) (A) and (B) are true; (C) false

Explanation

An instructor Id. No. cannot be null when it is the primary key – valid integrity constraint. No two citizens have the same Aadhaar-Id – valid. But 'the budget of a company must be zero' is not a valid integrity constraint. So (A) and (B) are true and (C) is false.

Q68UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
Let M and N be two entities in an E-R diagram with simple single value attributes. R₁ and R₂ are two relationship between M and N, where as : R₁ is one-to-many and R₂ is many-to-many. The minimum number of tables required to represent M, N, R₁ and R₂ in the relational model are _____
  1. A4
  2. B6
  3. C7
  4. D3
Show answerHide answer

Correct answer: (D) 3

Explanation

Two tables are created for entities M and N, and a third table for the many-to-many relationship R₂. R₁ (one-to-many) needs no separate table: the primary key of the 'one' side is placed as a foreign key in the 'many' side. So the minimum is 3 tables.

Q69UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
Consider a schema R(MNPQ) and functional dependencies M → N, P → Q. Then the decomposition of R into R₁ (MN) and R₂(PQ) is ______
  1. ADependency preserving but not lossless join
  2. BDependency preserving and lossless join
  3. CLossless join but not dependency preserving
  4. DNeither dependency preserving nor lossless join
Show answerHide answer

Correct answer: (A) Dependency preserving but not lossless join

Explanation

With R(MNPQ), M → N and P → Q, the decomposition into R₁(MN) and R₂(PQ) clearly preserves both dependencies, but it is not lossless because R₁ and R₂ have no common attribute, so R cannot be recovered by joining them.

Q70UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
Distance vector routing algorithm is a dynamic algorithm. The routing tables in distance vector routing algorithm are updated ______
  1. AAutomatically
  2. BBy server
  3. CBy exchanging information with neighbor nodes
  4. DWith back up database
Show answerHide answer

Correct answer: (C) By exchanging information with neighbor nodes

Explanation

A distance vector routing protocol requires that a router inform its neighbors about its topology changes periodically.

Q71UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
With respect to a loop in the transportation table, which one of the following is not correct?
  1. AEvery loop has an odd no. of cells and atleast 5.
  2. BClosed loops may or may not be square in shape
  3. CAll the cells in the loop that have a plus or minus sign, except the starting cell, must be occupied cells
  4. DEvery loop has an even no. of cells and atleast four.
Show answerHide answer

Correct answer: (A) Every loop has an odd no. of cells and atleast 5.

Explanation

In transportation table: (i) An even number of atleast 4 cells must participate in closed loop and an occupied cell can be considered only once and not more. (ii) Closed loop may or may not be square or rectangle in shape. (iii) All cells in the loop that have a plus or minus sign, except the starting cell, must be occupied.

Q72UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
For a database relation R(A, B, C, D) where the domains of A, B and D include only atomic values, only the following functional dependencies and those that can be inferred from them are : A → C B → D The relation R is in ______
  1. AFirst normal form but not in second normal form
  2. BBoth in first normal form as well in second normal form
  3. CSecond normal form but not in third normal form
  4. DBoth in second normal form as well in third normal form
Show answerHide answer

Correct answer: (A) First normal form but not in second normal form

Explanation

No single attribute determines all others. The closure {AB}⁺ = {A, B, C, D}, so AB is the only candidate key. 2NF requires non-prime attributes to be fully dependent on the key, but C depends on A alone and D on B alone (partial dependencies). So R is in 1NF but not in 2NF.

Q73UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
Consider the following relation : Works (emp_name, company_name, salary) Here, emp_name is primary key. Consider the following SQL query Select emp_name From works T where salary > (select avg (salary) from works S where T.company_name = S.company_name) The above query if for following :
  1. AFind the highest paid employee who earns more than the average salary of all employees of his company
  2. BFind the highest paid employee who earns more than the average salary of all the employees of all companies
  3. CFind all employees who earn more than the average salary of all employees of all the companies
  4. DFind all employees who earn more than the average salary of all employees of their company
Show answerHide answer

Correct answer: (D) Find all employees who earn more than the average salary of all employees of their company

Explanation

The correlated subquery computes the average salary of the employee's own company (T.company_name = S.company_name). The query does not use max, so it does not select only the highest paid employee; it selects all employees who earn more than the average salary of their company.

Q74UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
Which one is correct w.r.t. RDBMS?
  1. APrimary key ⊆ super key ⊆ candidate key
  2. BPrimary key ⊆ candidate key ⊆ super key
  3. CSuper key ⊆ candidate key ⊆ primary key
  4. DSuper key ⊆ primary key ⊆ candidate key
Show answerHide answer

Correct answer: (B) Primary key ⊆ candidate key ⊆ super key

Explanation

Super key: a set of attributes that uniquely identifies a tuple. Candidate key: a minimal super key (no proper subset is a super key). Primary key: the candidate key chosen to identify tuples. So Primary key ⊆ candidate key ⊆ super key.

Q75UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)
Which of the following HTML code will affect the vertical alignment of the table content?
  1. A<td style = "vertical-align : middle" > Text Here </td>
  2. B<td valign = "centre"> Text Here </td>
  3. C<td style = "text-align : center"> Text Here </td>
  4. D<td align = "middle" > Text Here </td>
Show answerHide answer

Correct answer: (B) <td valign = "centre"> Text Here </td>

Explanation

Vertical alignment of table contents is set by <td valign = 'top | middle | bottom | baseline'> Text here </td>. No option matches exactly; taking 'centre' as middle, option (b) matches.

Q76UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Consider an array representation an n element binary heap where the elements are stored from index 1 to index n of the array. For the element stored at index i of the array (i < = n), the index of the parent is :
  1. Afloor ((i + 1)/2)
  2. Bceiling ((i + 1)/2)
  3. Cfloor (i/2)
  4. Dceiling (i/2)
Show answerHide answer

Correct answer: (C) floor (i/2)

Explanation

In a binary heap stored in an array from index 1 to n, the children of index i are at 2i and 2i + 1, so the parent of the element at index i is at floor(i/2).

Q77UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
______ SQL command changes one or more fields in a record.
  1. ALOOK-UP
  2. BINSERT
  3. CMODIFY
  4. DCHANGE
Show answerHide answer

Correct answer: (C) MODIFY

Explanation

As keyed by the book, MODIFY is the SQL command that changes one or more fields in a record.

Q78UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is/are true with reference to 'view' in DBMS? (A) A 'view' is a special stored procedure executed when certain event occurs (B) A 'view' is a virtual table, which occurs after executing a pre-complied query. Code :
  1. AOnly (A) is true
  2. BOnly (B) is true
  3. CBoth (A) and (B) are true
  4. DNeither (A) nor (B) are true
Show answerHide answer

Correct answer: (B) Only (B) is true

Explanation

A view is a virtual table through which a selective portion of the data from one or more tables can be seen; it does not contain data of its own. A stored procedure executed when an event occurs is a trigger, not a view. So only (B) is true.

Q79UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In SQL ______is an Aggregate function.
  1. ASELECT
  2. BCREATE
  3. CAVG
  4. DMODIFY
Show answerHide answer

Correct answer: (C) AVG

Explanation

AVG returns the average of the values in a group, ignoring null values. It is an aggregate function. Syntax: AVG([ALL | DISTINCT] expression).

Q80UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Match the following with respect to RDBMS : A. Entity integrity B. Domain integrity C. Referential integrity D. User defined integrity i. Enforces some specific business rule that to not fall into entity or domain ii. Rows can't be deleted which are used by other records iii. Enforces valid entries for a column iv. No duplicate rows in a table Code : A B C D
  1. Aiii iv i ii
  2. Biv iii ii i
  3. Civ ii iii i
  4. Dii iii iv i
Show answerHide answer

Correct answer: (B) iv iii ii i

Explanation

Entity integrity - no duplicate rows in a table (iv); Domain integrity - enforces valid entries for a column (iii); Referential integrity - rows can't be deleted which are used by other records (ii); User defined integrity - enforces specific business rules that do not fall into entity or domain integrity (i).

Q81UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Find the normalization transformation that maps a window whose lower left corner is at (1, 1) and upper right corner is at (3, 5) onto a view port that is the entire normalized device screen
  1. A[1/2 0 −1/2] [0 1/4 −1/4] [0 0 1]
  2. B[1/2 0 1/2] [0 −1/4 1/4] [1 1 1]
  3. C[1/2 0 −1/2] [0 1/4 1/4] [1 0 0]
  4. D[1/2 0 1/2] [0 1/4 −1/4] [1 0 0]
Show answerHide answer

Correct answer: (A) [1/2 0 −1/2] [0 1/4 −1/4] [0 0 1]

Explanation

Window: xwmin = 1, ywmin = 1, xwmax = 3, ywmax = 5. Viewport (normalized screen): xvmin = 0, yvmin = 0, xvmax = 1, yvmax = 1. Scale factors sx = (1 − 0)/(3 − 1) = 1/2 and sy = (1 − 0)/(5 − 1) = 1/4. N = T(xvmin, yvmin) · S(sx, sy) · T(−xwmin, −ywmin), which gives the matrix [1/2 0 −1/2], [0 1/4 −1/4], [0 0 1].

Q82UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Given two relations R₁(A, B) and R₂(C, D), the result of following query Select distinct A, B From R₁, R₂ is guaranteed to be same as R₁ provided one of the following condition is satisfied.
  1. AR₁ has no duplicates and R₂ is empty
  2. BR₁ has no duplicates and R₂ is non - empty
  3. CBoth R₁ and R₂ have no duplicates
  4. DR₂ has no duplicates and R₁ is non - empty
Show answerHide answer

Correct answer: (B) R₁ has no duplicates and R₂ is non - empty

Explanation

The query takes the Cartesian product R₁ × R₂ and projects A, B with duplicates removed. If R₂ is empty the product is empty, so R₂ must be non-empty; and since DISTINCT removes duplicates, the result equals R₁ only if R₁ has no duplicates.

Q83UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Consider a schema R(A, B, C, D) and following functional dependencies. A → B B → C C → D D → B Then decomposition of R into R1(A, B), R2(B, C) and R3 (B, D) is ______
  1. ADependency preserving and lossless join
  2. BLossless join but not dependency preserving
  3. CDependency preserving but not lossless join
  4. DNot dependency preserving and not lossless join
Show answerHide answer

Correct answer: (A) Dependency preserving and lossless join

Explanation

A → B is preserved in R1, B → C in R2, and B → D, D → B in R3; C → D follows from C → B (in R2, since C → D → B) and B → D. So all dependencies are preserved. R1 ∩ R2 = B and R2 ∩ R3 = B, and B is a key of R2 and R3, so the decomposition is also lossless.

Q84UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
If every non-key attribute is functionally dependent on the primary key, then the relation is in _____
  1. AFirst normal form
  2. BSecond normal form
  3. CThird normal form
  4. DFourth normal form
Show answerHide answer

Correct answer: (B) Second normal form

Explanation

A relation is in 2NF if it is in 1NF and every non-key attribute is fully functionally dependent on the primary key. If every non-key attribute is functionally dependent on the primary key (no partial dependency), the relation is in second normal form.

Q85UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Consider a relation R (A, B, C, D, E, F, G, H), where each attribute is atomic, and following functional dependencies exist CH → G A → BC B → CFH E → A F → EG The relation R is ______
  1. AIn 1NF but not in 2NF
  2. BIn 2NF but not in 3NF
  3. CIn 3NF but not in BCNF
  4. DIn BCNF
Show answerHide answer

Correct answer: (A) In 1NF but not in 2NF

Explanation

A⁺ contains all attributes except D, and D cannot be derived from any attribute, so D must be part of every key (e.g. AD, BD, ED, FD are keys). Then A → BC is a partial dependency of non-key attribute C on part of key AD, so R is in 1NF but not in 2NF.

How to use these UGC NET Computer Science questions

Every question here was asked in a real UGC NET paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full UGC NET papers as timed tests to check your speed under exam conditions.