Physics Wallah
banner

UGC NET Computer Science Unit 8 PYQs with Answers

UGC NET Computer Science Unit 8 PYQs focus on DBMS concepts such as relational algebra, normalisation, SQL queries, transactions, concurrency control, and indexing. Practising previous year questions helps candidates understand question patterns, strengthen fundamentals, and improve accuracy in the exam.

authorImageAnshika Agarwal22 Jun, 2026

UGC NET Computer Science Unit 8 is based on Database Management Systems (DBMS), one of the most scoring and concept-heavy areas of the syllabus. It deals with how data is structured, stored, retrieved, and managed efficiently using relational models and database techniques. 

Since questions are often conceptual as well as query-based, solving UGC NET Computer Science Unit 8 PYQs is extremely important. PYQs help candidates understand how topics like normalization, SQL, and transaction management are tested in the actual exam and highlight the most frequently asked concepts.

UGC NET Computer Science Unit 8 PYQs

UGC NET Computer Science Unit 8 Previous Year Questions (PYQs) primarily revolve around Database Management System concepts. This unit is particularly important because it combines conceptual clarity with direct application-based questions, making PYQ practice essential for scoring well.

  1. Which of the following tasks could be attained using syntax trees in compiler design?

A. Type Checking
B. Code Generation
C. Code Optimisation
D. Error Handling

Choose the correct answer from the options given below:

A) A, B, C Only
B) B, C, D Only
C) A, C, D Only
D) A, B, D Only

Answer: A) A, B, C Only

Explanation: Syntax Trees (especially Abstract Syntax Trees - ASTs) are widely used in compiler design for:

  • Type Checking (A): Semantic analysis uses syntax trees to verify type correctness.

  • Code Generation (B): Target code can be generated by traversing the syntax tree.

  • Code Optimization (C): Optimizations such as constant folding, dead code elimination, and expression simplification are often performed on syntax trees.

  • Error Handling (D) is primarily associated with lexical, syntax, and semantic analysis phases rather than being a direct task attained using syntax trees.

  1. Arrange the following stages of parsing in the correct order as they typically occur in the compilation process.

A. Lexical Analysis
B. Semantic Analysis
C. Syntax Analysis
D. Intermediate Code Generation
E. Code Optimization

Choose the correct answer from the options given below:

A) A, B, C, D, E
B) A, C, B, D, E
C) A, D, B, C, E
D) A, C, D, B, E

Answer: B) A, C, B, D, E

Explanation:

The standard compilation phases occur in the following order:

  1. Lexical Analysis (A)

    • Converts source code into tokens.

  2. Syntax Analysis (C)

    • Builds parse tree / syntax tree according to grammar rules.

  3. Semantic Analysis (B)

    • Performs type checking, scope checking, and other semantic validations.

  4. Intermediate Code Generation (D)

    • Produces an intermediate representation (IR).

  5. Code Optimization (E)

    • Improves the intermediate code for efficiency.

Thus, the correct sequence is: A → C → B → D → E

3. Which of the following tasks could be attained using syntax trees in compiler design?

A. Type Checking
B. Code Generation
C. Code Optimization
D. Error Handling

Choose the correct answer from the options given below:

A. A, B, C Only
B. B, C, D Only
C. A, C, D Only
D. A, B, D Only

Answer: A. A, B, C Only

Explanation: Syntax Trees (or Abstract Syntax Trees - ASTs) are widely used in compiler design for:

  • Type Checking during semantic analysis.

  • Code Generation by translating tree structures into target code.

  • Code Optimization by simplifying expressions and improving efficiency.

Error handling is generally performed during lexical, syntax, and semantic analysis phases rather than being a direct function of syntax trees.

4. Shift-Reduce conflicts are resolved by:

A. Left recursion
B. Left factoring
C. Ambiguity
D. Associativity and Precedence

Answer: D. Associativity and Precedence

Explanation:
A Shift-Reduce Conflict occurs when a parser cannot decide whether to shift the next input symbol or reduce the current symbols on the stack. Such conflicts are commonly resolved using:

  • Operator Precedence

  • Operator Associativity (left-to-right or right-to-left)

5. Match List-I with List-II:

List-I   List-II
A. A → aB | a, a ∈ T, A, B ∈ V   I. Recursive Descent Parser
B. A → BC | a, a ∈ T, A, B, C ∈ V   II. Turing Machine
C. LL (1) grammar   III. Chomsky Normal Form
D. Halting problem   IV. Finite Automata

Choose the correct answer from the options given below:

A. A–IV, B–III, C–I, D–II
B. A–III, B–I, C–II, D–IV
C. A–II, B–IV, C–III, D–I
D. A–IV, B–III, C–II, D–I

Answer: A. A–IV, B–III, C–I, D–II

Explanation:

  • A → aB | a represents a Right Linear Grammar, equivalent to Finite Automata (IV).

  • A → BC | a is the form used in Chomsky Normal Form (III).

  • LL(1) Grammar is parsed using a Recursive Descent Parser (I).

  • The Halting Problem is associated with Turing Machines (II).

6. Which of the following is the function of the semantic analysis phase of the compilation process?

A. Type conversion
B. Tokenization
C. Loop optimization
D. Data flow Analysis

Answer: A. Type conversion

Explanation: The Semantic Analysis phase checks the meaning of the program, including Type checking, Type conversion/coercion, Scope resolution, and Declaration checking.

Other options belong to different phases:

  • Tokenization → Lexical Analysis

  • Loop Optimization → Code Optimization

  • Data Flow Analysis → Optimization phase

7. One of the purposes of using intermediate code in compilers is to:

A. make parsing and semantic analysis simpler
B. improve error recovery and error reporting
C. increase the chances of reusing the machine independent optimizer in other compilers
D. improve the register allocation

Answer: C. increase the chances of reusing the machine independent optimizer in other compilers

Explanation: Intermediate Code Representation (IR) provides a machine-independent form of the source program. Its advantages include:

  • Portability across different target machines.

  • Reusability of machine-independent optimizers.

  • Separation of front-end and back-end compiler phases.

8. Three address codes can be represented in special structures known as:

A. Quadruples
B. Triples
C. Patterns
D. Indirect Triples
Choose the correct answer from the options given below:

  • A) A and B Only

  • B) A, B and D Only

  • C) B and C Only

  • D) B, C and D Only

Answer: B) A, B and D Only
Explanation: Three address codes can be represented using Quadruples, Triples, and Indirect Triples — these are the three standard data structures used in compiler design for intermediate code representation. "Patterns" is not a valid representation structure for three address codes.

 

UGC NET Computer Science Unit 8 PYQs FAQs

What topics are included in UGC NET Computer Science Unit 8?

Unit 8 covers Database Management Systems, including relational model, ER diagrams, normalisation, SQL, transactions, concurrency control, indexing, and file structures.

Why are PYQs important for Unit 8 DBMS preparation?

PYQs help identify frequently asked SQL patterns, normalisation questions, and transaction-based problems, improving both accuracy and conceptual clarity.

Which topics are most frequently asked from DBMS?

Normalisation (1NF to BCNF), SQL queries, relational algebra, transaction properties (ACID), locking protocols, and indexing are commonly asked topics.

Are SQL queries important in UGC NET Unit 8?

Yes, SQL is one of the most important areas. Questions often involve writing queries, output prediction, and query optimisation concepts.
banner
banner
Popup Close ImagePopup Open Image
Talk to a counsellorHave doubts? Our support team will be happy to assist you!
Popup Image
avatar

Get Free Counselling Today

and Clear up all your Doubts

Talk to Our Counsellor just by filling out the form.
Student Name
Phone Number
IN
+91
OTP
Join 15 Million students on the app today!
Point IconLive & recorded classes available at ease
Point IconDashboard for progress tracking
Point IconLakhs of practice questions
Download ButtonDownload Button
Banner Image
Banner Image
Free Learning Resources
Know about Physics Wallah
Physics Wallah is an Indian edtech platform that provides accessible & comprehensive learning experiences to students from Class 6th to postgraduate level. We also provide extensive NCERT solutions, sample paper, NEET, JEE Mains, BITSAT previous year papers & more such resources to students. Physics Wallah also caters to over 3.5 million registered students and over 78 lakh+ Youtube subscribers with 4.8 rating on its app.
We Stand Out because
We provide students with intensive courses with India’s qualified & experienced faculties & mentors. PW strives to make the learning experience comprehensive and accessible for students of all sections of society. We believe in empowering every single student who couldn't dream of a good career in engineering and medical field earlier.
Our Key Focus Areas
Physics Wallah's main focus is to make the learning experience as economical as possible for all students. With our affordable courses like Lakshya, Udaan and Arjuna and many others, we have been able to provide a platform for lakhs of aspirants. From providing Chemistry, Maths, Physics formula to giving e-books of eminent authors like RD Sharma, RS Aggarwal and Lakhmir Singh, PW focuses on every single student's need for preparation.
What Makes Us Different
Physics Wallah strives to develop a comprehensive pedagogical structure for students, where they get a state-of-the-art learning experience with study material and resources. Apart from catering students preparing for JEE Mains and NEET, PW also provides study material for each state board like Uttar Pradesh, Bihar, and others

Copyright © 2026 Physicswallah Limited All rights reserved.