What is a Virtual Base Class? When should it be used? Explain with an example.
See Answer →What do you mean by Exception Handling? What are its advantages and disadvantages?
See Answer →
What is a Virtual Destructor? What are its advantages? Explain with examples.
See Answer →
Develop SRS for Student Admission System. SRS should be as per IEEE standard SRS template. Make necessary assumptions.
See Answer →Consider the following schedule S with two transactions T1 and T2:
S: R1(X); W1(X); R2(X); W2(X); R1(Y); W1(Y); Commit1; R2(Y); W2(Y); Commit2;
(i) Draw the precedence (serializability) graph for the schedule S.
(ii) Is the schedule S serializable? If yes, provide the equivalent serial schedule(s). If no, explain why.
iii) Identify any concurrency problems (e.g., Lost Update, Dirty Read) present in this schedule. Explain how the problem occurs.
See Answer →Consider the relation R(A, B, C, D, E, F) with the following set of Functional Dependencies (FDs):
F = { A → BC, CD → E, B → D, E → A }
(i) Find all the candidate keys for the relation R.
(ii) Is the relation R in 3NF? Justify your answer.
(iii) Decompose the relation R into a set of relations that are in BCNF.
See Answer →Write and execute SQL queries for the following tasks. Make suitable assumptions where necessary.
(a) Create the Employees table with EmpID as the primary key and DeptID as a foreign key referencing the Departments table. The Salary should not be negative. (4 Marks)
(b) List the names and salaries of all employees working in the 'Technology' department, sorted in descending order of their salary.
(c) Find the name of each department and the number of employees working in it. Display only those departments that have more than 10 employees.
(d) Find the names of all employees whose salary is greater than the average salary of all employees in the company.
(e) List the names of all projects along with the name of the employee who is leading the project.
See Answer →Consider the following relational schemas for a company database:
- Employees (EmpID, EmpName, Salary, DeptID)
- Departments (DeptID, DeptName)
- Projects (ProjID, ProjName, Lead_EmpID)
Convert the ER diagram from part (a) into a set of relational schemas (tables). You must underline the primary key for each table and clearly indicate all foreign keys and the tables they reference.
See Answer →Design a complete ER (Entity-Relationship) diagram for the "EduSphere" platform. Clearly show all entities, attributes (including primary keys), relationships, and their cardinality constraints.
See Answer →An online learning platform, "EduSphere," needs a database to manage its operations. The requirements are as follows:
- The platform has many Students. Each student is identified by a unique StudentID and has a Name, Email, and RegistrationDate.
- The platform features several Instructors. Each instructor has a unique InstructorID, Name, and a short Bio.
- There are multiple Courses on offer. Each course has a unique CourseID, a Title, Duration (in hours), and a Fee.
- An instructor can teach multiple courses, but each course is taught by only one instructor.
- A student can enroll in multiple courses, and a course can have many students. When a student enrolls, the EnrollmentDate and the final Grade obtained are recorded.
Explain the difference between 3NF (Third Normal Form) and BCNF (Boyce-Codd Normal Form). Provide an example of a relation that is in 3NF but not in BCNF.
See Answer →Differentiate between DDL (Data Definition Language) and DML (Data Manipulation Language) statements in SQL. Provide two examples for each category.
See Answer →What are the ACID properties of a transaction? Explain each property with a suitable example of an airline ticket booking.
See Answer →Explain the three-level architecture of a DBMS (External, Conceptual, and Internal). How does this architecture support Logical and Physical Data Independence?
See Answer →
Differentiate between a File Processing System and a Database Management System (DBMS) based on four key aspects.
See Answer →
Write a C program to perform and visualize DFS and BFS traversal of a user-defined undirected graph. Record and report the order of traversal and number of operations.
See Answer →
Implement Dijkstra's algorithm for a graph with 5 nodes using adjacency list representation. Display the shortest path tree and explain how the greedy choice is applied at each step.
See Answer →