
UGC NET Computer Science Unit 3 and Unit 4 are among the most important sections of the syllabus, covering Computer Organisation & Architecture and Programming & Data Structures. These units frequently include conceptual, numerical, and problem-solving questions in the examination.
Practising Previous Year Questions (PYQs) helps candidates understand recurring topics, identify high-weightage areas, and improve their problem-solving speed and accuracy. By regularly solving UGC NET Computer Science Unit 3 & 4 PYQs, aspirants can strengthen their fundamentals, improve accuracy, and gain confidence for the exam.
UGC NET Computer Science Unit 3 & 4 Previous Year Questions (PYQs) are an effective tool for understanding the exam pattern and focusing on important concepts. PYQs from these units test both theoretical knowledge and practical problem-solving abilities.
Match List-I with List-II.
| List-I | List-II | ||
| A. | Timestamp protocol | 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. |
Choose the correct answer from the options given below:
A) A-III, B-IV, C-II, D-I
B) A-III, B-IV, C-I, D-II
C) A-IV, B-III, C-II, D-I
D) A-IV, B-II, C-I, D-III
Answer: A) A-III, B-IV, C-II, D-I
Explanation: Timestamp protocol ensures freedom from deadlock β III; Strict 2PL ensures cascadeless rollback β IV; Two-phase locking's lock point indicates the final lock β II; Lock point definition matches the "already running" description β I.
Match List-I with List-II.
| List-I | List-II | ||
| A. | BCNF iff | I. | every JD is implied by the candidate keys |
| B. | 5NF iff | II. | all underlying domains contain scalar values only |
| C. | 1NF iff | III. | every MVD is implied by the candidate keys |
| D. | 4NF iff | IV. | every FD is implied by the candidate keys |
A) A-III, B-II, C-I, D-IV
B) A-IV, B-I, C-II, D-III
C) A-II, B-III, C-IV, D-I
D) A-IV, B-I, C-III, D-II
Answer: B) A-IV, B-I, C-II, D-III
Explanation: BCNF β every FD implied by candidate keys; 5NF β every JD implied by candidate keys; 1NF β all domains contain scalar values only; 4NF β every MVD implied by candidate keys.
Find the number of tuples by applying the operation Xβ X.S = Y.S^Y
A) 1
B) 3
C) 4
D) 6
Answer: C) 4
Explanation: The left outer join XβY on X.S = Y.S keeps all tuples from X and matches with Y where S values match. J, B, R match in both tables (3 matches), and T has no match in Y but is still retained with NULLs β giving 4 total tuples.
Identify the incorrect statement(s).
A) A candidate key is minimal set of one or more attributes that, taken collectively, allows us to uniquely identify any entity in the entity set.
B) A candidate key for which no proper subset is also a candidate key is called a super key.
C) A super key is a set of one or more attributes that, taken collectively, allows us to uniquely identify any entity in the entity set.
D) A 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: Statement B is incorrect because it has the definition reversed β it is actually a super key for which no proper subset is also a super key that is called a candidate key, not the other way around.
Given the following STUDENT-COURSE scheme: STUDENT (Rollno, Name, Courseno) COURSE (Courseno, Coursename, Capacity), where Rollno is the primary key of relation STUDENT and Courseno is the primary key of relation COURSE. Attribute Coursename of COURSE takes unique values only. The number of records in COURSE and STUDENT tables are 3 and 5 respectively. Following relational algebra query is executed: R = STUDENT X COURSE
Match List-I with List-II in context to the above problem statement.
| 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 |
A) A-III, B-I, C-IV, D-II
B) A-I, B-III, C-IV, D-II
C) A-I, B-III, C-IV, D-II
D) A-I, B-III, C-II, D-IV
Answer: B) A-I, B-III, C-IV, D-II
Explanation: Degree of R = 3+3 = 6 attributes β III; Cardinality = 5Γ3 = 15 tuples β I; Foreign key of STUDENT is Courseno β IV; COURSE has no foreign key β NIL β II.
The following table 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 an on-delete cascade:
| Employee_id | Manager_id |
| 20 | 40 |
| 25 | 40 |
| 30 | 35 |
| 35 | 20 |
| 40 | 45 |
| 45 | 25 |
On deleting the tuple (20, 40), the set of other tuples that must be deleted to maintain the referential integrity of the table is:
A) (30, 35) only
B) (30, 35) and (35, 20) only
C) (35, 20) only
D) (40, 45) and (25, 40) only
Answer: C) (35, 20) only
Explanation: Deleting Employee_id = 20 causes cascade delete on tuples where Manager_id = 20, which is (35, 20). Deleting Employee_id = 35 then cascades to tuples where Manager_id = 35, which is (30, 35). So the full set deleted is (35, 20) and (30, 35) β Answer: B) (30, 35) and (35, 20) only.
Which of the following key constraints is required for functioning of foreign key in the context of relational databases?
A) Unique key
B) Primary key
C) Candidate key
D) Check key
Answer: B) Primary key
Explanation: A foreign key must reference a primary key in the parent table, as the primary key constraint ensures uniqueness and non-nullability, which are both required for the referential integrity enforced by foreign keys.