DBMS case study topics IT1 00211503120 ABHISHEK PUROHIT 00311503120 ADITI 00411503120 ADITI PRASAD 00511503120 ADITYA 00611503120 ADITYA KASHYAP 00711503120 AKSHITA GUPTA 00811503120 ANMOL TREHAN 00911503120 ANSH KUMAIN 01011503120 ANSH SACHDEVA 01111503120 ANSHAY SAGAR 01211503120 ANUSHKA SINGH 01311503120 ARIHANT JAIN 01411503120 ASHISH KUMAR RAI 01511503120 ASMITA DEY 01611503120 AYUSH DIXIT 01711503120 BHANU 01911503120 BHAVYA KALRA 02011503120 BHUMI BATRA 02211503120 CHIRANJEEV BATRA 02311503120 DANIAL ALI NAQVI 02411503120 DEEPAK KUMAR 02511503120 DEEPANSHU SHARMA 02611503120 DEVANSH VERMA 02711503120 DEVANSHI SINGH 02811503120 DHRUV KOTRA 02911503120 DHRUV MITTAL 03011503120 DHRUV PRAKASH 03111503120 GAURAV 03211503120 HARSH SHARMA Q1 Q2 Q3 Q4 Q5 03311503120 HARSHIT KHATTER 03411503120 HIMANSHU SHARMA 03511503120 HITEN VATS 03611503120 HITESH GANDHI 03711503120 ISHIKA SUNIL 03811503120 ISHITA KAPOOR 03911503120 KAUSHIK KOUL 04011503120 KETAN SINGH 04111503120 KUNAL SINGLA 04211503120 KUSHAGRA RANGA 04311503120 KUSHAGRA VARSHNEY 04411503120 MANISH SHARMA 04511503120 MAYANK GAGNEJA 04611503120 MAYANK GOEL 04811503120 MUDIT JAIN 05011503120 OMVIR SINGH 05111503120 PAARTH BHASIN 05211503120 PALAK GUPTA 05311503120 PARAM S RATANPAL 05411503120 PARITOSH KUMAR JHA 05511503120 PAWAN KUMAR 05611503120 PRAKASH KUMAR PODDAR 05711503120 RAJAT GUPTA 05811503120 RISHABH BHATNAGAR 05911503120 RISHAV SASMAL 06011503120 RITIK RAJ 06111503120 ROHIT KUMAR Q6 Q7 Q8 Q9 06211503120 RONIT DADRA 06311503120 SAGAR ASWAR 06411503120 SAHIL KUMAR JHA 06511503120 SAKSHAM KAUSHIK 06611503120 SAKSHI SAXENA 06711503120 SALONI KANSAL 06811503120 SARTHAK MAHESHWARI 06911503120 SATVIK SEHGAL Q10 Q11 Q 1. Consider a relation ‘Employee’ with following attributes: Employee (EmpNo#, EName, DName, Salary, DOJ, Gender) Suppose you are asked to find the department name and number of employees in a given department. Write a PL/SQL block to using cursors for retrieving and displaying the desired information. Q 2. Consider a relation ‘Employee’ with following attributes: Employee (EmpNo#, EName, DName, Salary, DOJ, Work_Experience, Gender) Write a PL/SQL program to display the names of all the employees and increment percentage of salary according to their working experiences, such as employees having more than 10 years of experience should be given 15% increment, employees having experience between 5 to 10 years should be given 10% increment and employees with less than 5 years of experience should be given 5% increment. Q 3. Consider following relations ‘Student’ with following attributes: Student (Roll_No#, Name, Course, Gender, Contact_No) Student_backup (RollNo#, Name, Date_of_Operation) Create a trigger which will work before deletion in Student table and create a duplicate copy of the record in another table Student_backup, with date of operation. Q 4. Write a trigger for table Student called ‘Ensure_Case’ that converts the SName and city to uppercase before they are inserted or updated in the table. If the insert statement given by a user is: insert into Student values (‘Sunita’,‘MCA’, 20, ‘noida’) the trigger should convert the name and city in upper case as – SUNITA and NOIDA Q 5. Consider a relation ‘Employee’ with following attributes: Employee (EmpNo#, EName, DName, Salary, DOJ, City) Using explicit cursor, write a PL/SQL code that displays the name and salary of each employee from the Employee table whose salary is less than that specified by a passed-in parameter value Q6. Consider the following two transactions: T1: read A read B if A=0 then B=B+1 write B T2: read B read A if B=0 then A=A+1 write A Add lock and unlock statements into these transactions, T1 and T2 so that they observe 2PL protocol. Can the execution of these transactions result in a deadlock? Q7 Consider a relation R=(A,B,C,D,E,F,G,H,I,J) and the set of functional dependencies F={AB→C, BD→EF, AD→GH, A→I, H→J}. Compute the key for R. And decompose R into highest normal form. Q8. Assume you are to compose database requirements of a wholesale dealer for audio, video consumer equipment from different manufacturers (brands).Customers are the various retail outlets (retailers). Wholesaler extends credit to old customer and special discounts are offered to new customers (retailers). You have to generate an E-R model for the above DBMS application with the scope restricted to details (queries on) of customers (retailers), products stocked and their price discounts and credits offered etc. Q9. Bob and Martin opened a CD Company, Inc., a family-owned business that sells audio CDs of classic and best-selling children's stories. The Company has a number of distributors from whom they purchase the CDs for resale. For selling purposes, the CDs are classified by appropriate age groups: 4–6; 7–10; and 11–14. Roughly 30% of total sales occur within their single retail store; the remaining 70% are through mail order. Sales are particularly strong during the summer vacation months and Christmas shopping season. CD, Inc. has hired you to design a relational database to manage all their data. The ERD should reflect the following: • The Company offers its customers a purchasing incentive: all CDs are always discounted 40% from the retail price. • The Company likes to store the names of “potential” customers, even if they’ve never done business with them. • 3 times each year, the Company sends out 5–6 page brochures to advertise their top-selling and latest-release CDs, including general descriptions of each CD. Q10. The railway reservation system facilitates the passengers to enquire about the trains available on the basis of source and destination, booking and cancellation of tickets, enquire about the status of the booked ticket, etc. The aim of case study is to design and develop a database maintaining the records of different trains, train status, and passengers. The record of train includes its number, name, source, destination, and days on which it is available, whereas record of train status includes dates for which tickets can be booked, total number of seats available, and number of seats already booked. You have to prepare an ERD for railway reservation system. Description: Passengers can book their tickets for the train in which seats are available. For Page 2 of 3 this, passenger has to provide the desired train number and the date for which ticket is to be booked. Before booking a ticket for a passenger, the validity of train number and booking date is checked. Once the train number and booking date are validated, it is checked whether the seat is available. If yes, the ticket is booked with confirm status and corresponding ticket ID is generated which is stored along with other details of the passenger. After all the available tickets are booked, certain numbers of tickets are booked with waiting status. If waiting lot is also finished, then tickets are not booked and a message of non‐availability of seats is displayed. The ticket once booked can be cancelled at any time. For this, the passenger has to provide the ticket ID (the unique key). The ticket ID is searched and the corresponding record is deleted. With this, the first ticket with waiting status also gets confirmed. List of Assumption Since the reservation system is very large in reality, it is not feasible to develop the case study to that extent and prepare documentation at that level. Therefore, a small sample case study has been created to demonstrate the working of the reservation system. To implement this sample case study, some assumptions have been made, which are as follows: 1. The number of trains has been restricted to 5. 2. The booking is open only for next seven days from the current date. 3. Only two categories of tickets can be booked, namely, AC and General. 4. Total number of tickets that can be booked in each category (AC and General) is 10. 5. The total number of tickets that can be given the status of waiting is 2. 6. The in‐between stoppage stations and their bookings are not considered. Q11. Consider the following three relations: Student (Roll, Name, Course, DateOf Reg) Book (Bcode, Bname, Publisher, Author, Price) Issue (Roll,Bcode, DateOfIssue, DateOfRet) Now write queries for the following in relational algebra as well as in SQL: 1. Find the names of books issued to ‘Manoj’. 2. Find the price of the books issued to roll no. 20 3. Find the names of students with their course who issued books on 23rd February 2016. 4. Display the names and publisher of books issued to MCA students. 5. Display the names of books issued to Sonali and Monika both.