Docsity

DBMS VTU Question Bank, Summaries of Database Management Systems (DBMS)

Toggle sidebar
bg1
REVA UNIVERSITY
Department of Computer Science and Engineering
QUESTION BANK
Academic year : Even Sem 2023
Sub name : DBMS
Sub Code : B20CI0403
Sem :IV Sec:A/B
UNIT-1
Q.
No.
Questions
Course
Outcomes
Mapped
1
A company keeps track of employee details using database. Outline the
main characteristics of the database approach and how it differs from
traditional file systems with relevant examples.
CO-1
2
What is weak entity type? Explain the role of partial key in design of
weak entity set.
CO-1
3
Explain Transactions?
CO-1
4
What are structural Constraints on Relationship types? Explain with
Examples.
CO-1
5
Discuss about Three schema architecture? Why do we need mapping
among the schemas?
CO-1
6
Explain the Datatypes available for specification in relational model.
CO-1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download DBMS VTU Question Bank and more Summaries Database Management Systems (DBMS) in PDF only on Docsity!

REVA UNIVERSITY

Department of Computer Science and Engineering QUESTION BANK Academic year : Even Sem 2023 Sub name : DBMS Sub Code : B20CI0403 Sem :IV Sec:A/B UNIT- 1 Q. No. Questions Blooms Taxonomy level Course Outcomes Mapped 1 A company keeps track of employee details using database. Outline the main characteristics of the database approach and how it differs from traditional file systems with relevant examples.

L 2

CO- 1

2 What is weak entity type? Explain the role of partial key in design of weak entity set.

L

CO- 1

3 Explain Transactions? L2 CO- 1 4 What are structural Constraints on Relationship types? Explain with Examples.

L1 CO- 1

5 Discuss about Three schema architecture? Why do we need mapping among the schemas?

L2 CO- 1

6 Explain the Datatypes available for specification in relational model. L2 CO- 1

7 Distinguish between entity and attribute. And list various types of attributes with notation and example of each.

L4 CO- 1

8 Consider a company database. Define Attribute and list various types of attribute with ER notation and examples. .

L1 CO- 1

9 Identify the naming conventions used for ER Schema as ER diagrams and also develop ER diagram for Company database model.

L2 CO- 1

10 Consider a company database and Outline its Relationship constraints (Participation and Cardinality ratios) with notations and examples

L2 CO- 1

11 A bank data can be stored in different structures. Define Data Model and outline the main categories of Data Model

L1 CO- 1

12 Define the following: i)Data ii)Database iii)Database Schema iv)Snapshot v)Metadata

L1 CO- 1

13 Consider any real world database and explain the weak entity types (key attribute and relationship) with notations and examples

L3 CO- 1

14 Deisgn the E-R diagram for keep tracking of AIRLINE database. Define Entity,Attribute and list various types of attribute with ER notation and examples.

L4 CO- 1

15 Explain the main phases of database process with the help of a diagram. L2 CO- 1 16 Define Different languages and interfaces provided by DBMS? L1 CO- 1 17 What is Data Independence? Explain Logical & Physical Data Independence.

L1 CO- 1

Q.

No. Questions Blooms Taxonomy level Course Outcomes Mapped 1 Define the following: i)Relation ii)Domain iii)Tuple iv)Primary key v)Foreign key

L

CO- 2

2 Consider the Company database, Appraise the various schema based or explicit constraints that can be applied to a relational model. Defend How these constraints are violated during insert, delete and update operations

L5 CO- 2

3 Summarize the various characteristics of relations that make them different from ordinary tables and files.

L2 CO- 2

4 For any real world application, Illustrate the relational algebra operations Division and Cartesian Product with examples

L2 CO- 2

5 Consider any real world database and illustrate various types of joins with suitable examples

L2 CO- 2

6 Consider the schema for College Database: STUDENT ( USN, SName, Address, Phone, Gender ) SEMSEC ( SSID, Sem, Sec ) CLASS ( USN, SSID ) SUBJECT ( Subcode, Title, Sem, Credits ) IAMARKS ( USN, Subcode, SSID, Test1, Test2, Test3, FinalIA ) Identify and relate the Relation, Foreign key, Domain , Tuple and superkey concept for the above database.

L3 CO- 2

7 In database , we should avoid the usage of cross product. Justify the statement with a solution supported with an operator and its types in relational algebra.

L5 CO- 2

8 Set theory uses Union to combine two sets, Intersection to find difference and Intersection to find common. Same operations can work on database

L2 CO- 2

relations. Illustrate with examples, UNION, DIFFERENCE and INTERSECTION operations in relational algebra. 9 In relational model the operations Select, Project ,Division and Cartesian Product are used to form queries. Explain each with suitable example.

L3 CO- 2

UNIT- 3

Q.

No. Questions Blooms Taxonomy level Course Outcomes Mapped 1 Solve the below queries by using SQL Specify the following queries on the Sailors relational database schema using SQL SAILORS( sid, sname, rating, age) BOATS(bid, bname,color) RESERVES(sid,bid,day)

  1. Find the sids of sailors with age over 20 who have not reserved a red boat.
  2. Find the name of the sailors, who have reserved at least two boats.
  3. Find the names of sailors who have reserved a red or a green boat.
  4. F i n d the colors of boats reserved by “Rajesh”.
  5. Find the name of the sailors who have reserved boat 103.
  6. Find sailors whose rating is better than every sailor called Horatio
  7. Find the sailors with the highest rating
  8. Find the average age of all sailors
  9. Find the average age of sailors with a rating of 10
  10. Find the name and age of the oldest sailor
  11. Count the number of sailors
  12. Find the names of sailors who are older than the oldest sailor with a rating of 10
  13. Find the age of the youngest sailor for each rating level
  14. Find the age of the youngest sailor who is eligible to vote(i.e., is at least 18 years old)
  15. For each red boat, find the number of reservations for this boat
  16. Find the average age of sailors for each rating level that has at least two sailors

L

CO- 3

2 Specify the following queries on the Flight relational database schema using SQL

L

CO- 3

  1. Find the names of faculty members for whom the combined enrollment of the courses that they teach is less than five.
  2. Print the Level and the average age of students for that Level, for each Level.
  3. Print the Level and the average age of students for that Level, for all Levels except JR.
  4. Find the names of students who are enrolled in the maximum number of classes.
  5. Find the names of students who are not enrolled in any class. 4 Solve the below queries by using SQL branch (branch-name, branch-city, assets) customer (customer-name, customer-street, customer-city) account (account-number, branch-name, balance) loan (loan-number, branch-name, amount) depositor (customer-name, account-number) borrower (customer-name, loan-number) employee (employee-name, branch-name, salary)

L

CO- 3

5 Solve the following queries on the Company relational database schema EMPLOYEE(name,ssn,salary,sex,superssn,address,dno) DEPARTMENT(Dname,Dnumber,MGRSSN) DEPT_LOCATIONS (

L

CO- 3

Dnumber, Dloc) PROJECT(Pname, Pnumber,Plocation,Dnum) WORKS_ON(ESSN,PNO,Hours) DEPENDENT(ESSN, DEPE_Name, Address,Relationship,sex) I. Retrieve the names of employees who work on all the projects that ‘John Smith’ works on. II. Retrieve the list of project numbers for the projects that involve an employee whose name is ‘smith’ either as a worker or as a manager of the department that controls the project. III. Retrieve the names of the managers with two or more dependents. IV. For each project, list the project name and the total hours (by all employees) spent on that project. V. Retrieve the number of dependents for each employee

  1. Consider the following schema for a Library Database: BOOK (Book_id, Title, Publisher_Name, Pub_Year) BOOK_AUTHORS (Book_id, Author_Name) PUBLISHER (Name, Address, Phone) BOOK_COPIES (Book_id, Branch_id, No-of_Copies) BOOK_LENDING (Book_id, Branch_id, Card_No, Date_Out, Due_Date) LIBRARY_BRANCH (Branch_id, Branch_Name, Address) Make use of SQL queries to

  2. Retrieve details of all books in the library – id, title, name of publisher, authors, number of copies in each branch, etc.

L

CO- 3

8 Consider the following schema for Order Database: SALESMAN ( Salesman_id, Name, City, Commission ) CUSTOMER ( Customer_id, Cust_Name, City, Grade, Salesman_id ) ORDERS ( Ord_No, Purchase_Amt, Ord_Date, Customer_id, Salesman_id ) Write SQL queries to

  1. Count the customers with grades above Bangalore’s average.
  2. Find the name and numbers of all salesmen who had more than one customer.
  3. List all salesmen and indicate those who have and don’t have customers in their cities (Use UNION operation.)
  4. Create a view that finds the salesman who has the customer with the highest order of a day.
  5. Demonstrate the DELETE operation by removing salesman with id
    1. All his orders must also be deleted.

L

CO- 3

9 Consider the schema for Movie Database: ACTOR ( Act_id, Act_Name, Act_Gender ) DIRECTOR ( Dir_id, Dir_Name, Dir_Phone ) MOVIES ( Mov_id, Mov_Title, Mov_Year, Mov_Lang, Dir_id ) MOVIE_CAST ( Act_id, Mov_id, Role ) RATING ( Mov_id, Rev_Stars ) Make use of SQL queries to

L

CO- 3

  1. List the titles of all movies directed by ‘Hitchcock’.
  2. Find the movie names where one or more actors acted in two or more movies.
  3. List all actors who acted in a movie before 2000 and also in a movie after 2015 (use JOIN operation).
  4. Find the title of movies and number of stars for each movie that has at least one rating and find the highest number of stars that movie received. Sort the result by movie title.
  5. Update rating of all movies directed by ‘Steven Spielberg’ to 5. 10 Consider the schema for College Database: STUDENT ( USN, SName, Address, Phone, Gender ) SEMSEC ( SSID, Sem, Sec ) CLASS ( USN, SSID ) SUBJECT ( Subcode, Title, Sem, Credits ) IAMARKS ( USN, Subcode, SSID, Test1, Test2, Test3, FinalIA ) Make use of SQL queries to
  6. List all the student details studying in fourth semester ‘C’ section.
  7. Compute the total number of male and female students in each semester and in each section.
  8. Create a view of Test1 marks of student USN ‘1BI15CS101’ in all subjects.

L

CO- 3

  1. Retrieve the name of each employee who works on all the projects controlled by department number 5 (use NOT EXISTS operator). For each department that has more than five employees, retrieve the department number and the number of its employees who are making more than Rs. 6,00,000. UNIT- 4 Q. No. Questions Blooms Taxonomy level Course Outcomes Mapped 1 1. Define candidate keys. Identify the candidate keys and highest normal form for following i) R (A, B, C), FD’s: A→B, B→C, C→A ii) R (A, B, C, D, E), FD’s : AB→C,B→D,D→E

L

CO- 4

2 Outline and briefly explain the informal design guidelines for relational schemas. What happens when the guidelines are violated.

L3 CO- 4

3 “BCNF is stricter version of 3NF “ and sometimes also known as 3.5NF. Explain BCNF in detail.

L3 CO- 4

4 For the relation R(A,B,C,D), the functional dependencies are BC->A, AD->B, CD->B, AC->D. Make use of FDs and Find all the candidate keys.

L3 CO- 4

5 Illustrate with real world relations, Multivalued Dependency in 4 NF and Join Dependency in 5 NF

L2 CO- 4

6 For the relation Registration(rollno, courseid, email), the functional dependencies are (rollno, courseid - > email),( email->rollno). Make use of FDs and Find out the highest normal form, the registration relation satisfies. Explain it.

L3 CO- 4

(^7) Consider the relation EMP_PROJ = {SSN, PNUMBER, HOURS, ENAME, PNAME, PLOCATION} Assume (SSN, PNUMBER} as primary key.

L3 CO- 4

The dependencies are: {SSN, PNUMBER}→HOURS SSN→ENAME PNUMBER→{PNAME, PLOCATION} Normalize the above relation to 3NF. 8 Consider the following relations: Car_sale (car_no, date- sold, salemanno, commission%, discount). Assume a car can be sold by multiple salesman and hence primary key is {car-no, salesman} additional dependencies are: date- sold - > discount salesmanno - > commission i)Is this relation is in 1NF,2NF,3NF? Why or why not? ii)How would you normalize it completely?.

L1 CO- 4

9 Consider the universal relation R = {A, B, C, D, E, F, G, H, I,J} and the set of functional dependencies F = {{A, B} →{C}, {A}→ {D, E}, {B} → {F}, {F} →{G, H},{D}→ {I, J}}. What is the key for R? Decompose R into 2NFand then 3NFrelations.

L1 CO- 4

10 Consider the universal relation R = {A, B, C, D, E, F, G, H, I,J} and the set of functional dependencies F = {{A, B} →{C}, {A}→ {D, E}, {B} → {F}, {F} →{G, H},{D}→{I, J}} Determine whether each decomposition has the lossless join property, with respect to F. Also determine which normal form each relation in the decomposition is in. D1={R1,R2,R3}; R1={A,B,C,D,E}; R2={B,F,G,H} R3={D,I,J}.

L3 CO- 4

Course Coordinator Module Coordinator Director