CS-502 · Database Management Systems/Unsolved PYQ Paper
CS-502 Database Management Systems - Nov 2023 Question Paper
Under each question, How to answer lists the points an answer should cover, outlined by CampusPrep from the syllabus. Check the details against your textbook.
-
7 MarksaDiscuss the role of following in representing information about the real world in a database?
- i)DDL and DML
- ii)The buffer manager
- iii)The data model
How to answer
- Define DDL for schema definition and DML for data manipulation with examples
- Explain buffer manager role in bringing disk pages to memory and caching
- Explain data model as abstraction for structure, constraints and operations
- Relate each to representing real-world information
-
7 MarksbDescribe the structure of a DBMS. If your operating system is upgraded to support some new functions on OS files (e.g., the ability to force some sequence of bytes to disk), which layer(s) of the DBMS would you have to rewrite to take advantage of these new functions?
How to answer
- Describe layered DBMS architecture: query, storage, buffer, OS interface
- Identify disk manager / storage manager as layer interacting with OS files
- Argue only low-level storage layer needs rewrite to use new force-to-disk primitive
- Note upper layers unchanged due to data independence
-
7 MarksaConsider the following ER Diagram with the relations $E1(\underline{a}, b)$ and $E2(\underline{c}, d)$. R1 and R2 denote relationships between E1 and E2. Illustrate the table schema of the entities E1, E2 while converting ER Diagram to Relational tables.

How to answer
- Interpret double lines as total participation / key constraints from diagram
- Identify R1 and R2 cardinalities between E1 and E2
- Derive relational tables with primary and foreign keys
- Show merged tables if many-to-one or separate table if many-to-many
-
7 MarksbDraw an ER diagram that captures the following information. "A company database needs to store information about employees (identified by ssn, with salary and phone as attributes), departments (identified by dno, with dname and budget as attributes), and children of employees (with name and age as attributes). Employees work in departments; each department is managed by an employee; a child must be identified uniquely by name when the parent (who is an employee; assume that only one parent works for the company) is known. We are not interested in information about a child once the parent leaves the company."
How to answer
- Identify entities Employee(ssn,salary,phone), Department(dno,dname,budget), Child(name,age) as weak entity
- Show Works_in and Manages relationships with cardinalities
- Show identifying relationship for Child dependent on Employee
- Include keys, participation and arrow for one-to-many
-
7 MarksaConsider the following Employee relation with E_ID as the primary key. Discuss the anomalies that may arise during Insert, Delete and Updating a record in the above relation.

How to answer
- Describe given Employee(E_ID,Ename,Dname) table with sample rows
- Explain insertion anomaly due to null / duplicate department
- Explain deletion anomaly losing department info
- Explain update anomaly and redundancy
-
7 MarksbConsider the following Employee Relation. Write SQL Queries for the following:
- i)Fetch the Dept_ID whose average salary is higher than 4000.
- ii)Fetch the Dept_ID whose average salary of male employees is higher than 2000.
- iii)Fetch the Name of all employees whose Manager_ID is '1'.
- iv)Fetch the Name of all employees of Dept_ID as '103' and their Manager_ID is '1'.
- v)Fetch the name, salary, and Dept_ID of employee getting second highest salary.
- vi)Fetch the E_ID and Name of employees who are getting salary higher than the salary of employee 'F'.
- vii)Fetch the D_ID of employees who are getting salary higher than the salary of employee 'E'.

How to answer
- Use GROUP BY Dept_ID with HAVING AVG(Salary) for i and ii
- Use simple WHERE on Manager_ID and Dept_ID for iii and iv
- Use subquery with MAX and NOT IN / ORDER BY LIMIT for second highest
- Use scalar subquery comparing to salary of F and E for vi and vii
-
7 MarksaDiscuss the major steps in query optimization. What do you understand by sigma cascade operation?
How to answer
- List parsing, translation, optimization, evaluation steps
- Explain cost-based plan selection and statistics
- Define sigma cascade as splitting combined selection
- Give example sigma_c1^c2 = sigma_c1(sigma_c2)
-
7 MarksbDiscuss various cost components for query execution.
How to answer
- Define query execution cost as resource estimate
- Explain I/O, CPU and communication costs
- Discuss buffer, storage and index access components
- Mention selectivity and statistics influence
-
7 MarksaIdentify the candidate keys and highest normal form of the relation $R(ABCDEF)$. The functional dependencies of the relation R. $$A \to BC$$ $$C \to E$$ $$E \to F$$ $$F \to AB$$
How to answer
- Compute closures to find candidate keys D and F
- Check FDs for partial and transitive dependencies
- Determine highest normal form as 1NF/2NF
- Justify with key and non-prime attributes
-
7 MarksbConsider a relation $R(WXYZ)$ with the following set of functional dependencies. $$X \to W$$ $$WZ \to XY$$ $$Y \to WXZ$$ Compute the minimal (canonical) cover of the above relation R.
How to answer
- Split RHS into single attributes
- Remove extraneous LHS attributes from WZ->XY
- Eliminate redundant FDs by closure test
- Present final canonical cover
-
7 MarksaConsider the following actions taken by transaction T1 on database objects X and Y $$R(X), W(X), R(Y), W(Y)$$ Give an example of another transaction T2 that, if run concurrently to transaction T without some form of concurrency control, could interfere with T1.
How to answer
- State T1 operations R(X),W(X),R(Y),W(Y)
- Construct T2 with conflicting read-write on same items
- Show lost update / dirty read / unrepeatable read scenario
- Explain need for concurrency control
-
7 MarksbExplain the concept of recoverability in database management system. Show any recoverable schedule consisting of two transactions.
How to answer
- Define recoverable schedule: commit after reading committed values
- Give two-transaction example with W and R and commits
- Show commit order satisfies recoverability
- Contrast with non-recoverable / cascading case
-
7 MarksaConsider the following transactions with two data items A and B. Show the precedence graph for the given concurrent schedule and find equivalent serial schedule.

How to answer
- List conflicting operations on A and B between T1 and T2
- Draw precedence graph nodes T1,T2 with edges
- Check for cycle to test conflict serializability
- Derive equivalent serial order
-
7 MarksbConsider a schedule S using two phase locking mechanism for concurrency control. Convert the given schedule to strict and rigorous two-phase locking protocol. $$Lock\ Shared(A)$$ $$Read(A)$$ $$Lock\ Exclusive(B)$$ $$Read(B)$$ $$B = B + A$$ $$Write\ (A)$$ $$Write\ (B)$$ $$Unlock\ (A)$$ $$Unlock\ (B)$$ $$Commit$$
How to answer
- Recall basic 2PL lock/unlock sequence given
- Hold all exclusive locks till commit for strict 2PL
- Hold all shared and exclusive locks till commit for rigorous 2PL
- Rewrite schedule with Unlocks after Commit
-
14 MarksWrite short notes on (any two):
- a)Oracle exception handling mechanism
- b)Functions of DBA
- c)SQL Aggregate Functions
- d)Distributed databases
How to answer
- Define chosen topics with key terms and purpose
- Explain working with example / architecture
- Mention advantages, uses in DBMS
- Conclude with summary for each of the two notes
Go to where you left off?
Quick Add to Notes
Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.
Create free accountHave an account? Log in
Notes Panel