Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

p

Year : 2023-
24
UNIT I RELATIONAL DATABASES
Sem. :EVEN

QUESTION BANK
Subject Code : CS3492 Branch : CSE A & B
Subject Name : Database Management Systems Year/Sem. : II / IV

UNIT – I RELATIONAL DATABASES


Purpose of Database System – Views of data – Data Models – Database System Architecture –
Introduction to relational databases – Relational Model – Keys – Relational Algebra – SQL
fundamentals – Advanced SQL features – Embedded SQL– Dynamic SQL
PART - A

1. List out the different types of data models.(K1)(A/M’2022)

2. What are the different types of integrity constraints in relational databases. (K1) (A/M’2022)

3. What is Data manipulation language? (K1) (N/D’2021)

4. State the three levels of data abstraction.(K1) (A/M’21)(N/D’2021)

5. What is Metadata? (K1) (N/D’2021)

6. Draw the symbols used in an entity relationship diagram for representing an entity set, weak entity set,
attribute and multivalued attribute. (K2) (N/D’2021)

7. For a binary relationship set R between entity sets A and B, list the mapping cardinalities. .(K3)
(N/D’2021)

8. What are the various types of keys in the database ? (K1) (A/M’21)

9. Define functional dependency. (K1) (A/M’21)

10. List four significant differences between a file-processing system and a DBMS. .(K1) (N/D’20)

11. What are the different types of Data Models ? (K1).(N/D’20)

12. What are primary key constraint ? (K1) (N/D’20)

13. Write the characteristics that distinguish the Database approach with the file based approach.(K2)
(N/D’2020)
14. Define functional dependency. (K1) (N/D’2020)
15. What is data definition language ? (K1) (N/D’2020 , A/P 2023)
16. What are the four main characteristics that differentiate the database approach from the file processing
approach? (K1) (N/D’19)
17. Can a view defined with other view.Explain with example.(K1) ((N/D’19)
18. Differentiate lossless join decomposition and lossy Join decomposition.(K4). (N/D’19)
19. What is the purpose of Database Management System? (K1) (N/D’14) (N/D’16)
20. List the disadvantages of file processing systems. (K1) (N/D’14) (N/D’16)
21. Define DBMS. (K1) (N/D’14)
22. Express in relational algebra, the division operation (/) using the project, Cartesian product and minus
operations. Give a simple example.(K1) (N/D’19)
23. List any eight applications of DBMS. (K1) (A/M’ 19)
24. State the three levels of data abstraction. (K1) (A/M’21)
25. What is a data model? What are the different types of data models? .(K1) (A/M’ 19)
26. Define relational database. (K1) (M/J’15)
27. What is data definition language? Give example. (K1) (A/M’18)
28. List four significant differences between a file-processing system and a DBMS. (K1) (M/J’15,
(N/D’16)
29. Write the characteristics that distinguish the Database approach with the file based approach.(K1)
(A/M’15)
30. What are primary key constraints? .(K1) (M/J’13)
31. Mention the six fundamental operations of relational algebra and their symbols. (Or) List the operations
in relational algebra. (K1) (N/D’12)
32. Distinguish the terms primary key and super key. (K4) (N/D’12) (M/J’14)(A/M’17)
33. What are the various types of keys in the database? (K1) (A/M’21)
34. What is the use of assignment operator in relational algebra with an example? (K1) (M/J’15)
35. What is the use of unique statement? (K1) (M/J’15)
36. Give an example of a join that is not a simple equi-join for which partitioned parallelism can be used.
(K4)(N/D’15)
37. In what way database users can be differentiated? (N/D’16)
38. What are the desirable properties of decomposition? (A/M’17)
39. Differentiate between Dynamic SQL and Static SQL. (N/D’14) (A/M’15) (N/D’15) (N/D’16)
40. Give a brief description on DCL command. (K4) (N/D’14)
41. Define: DDL, DML, DCL, and TCL. (K1) (A/M’15)
42. Name the categories of SQL commands. (K2) (M/J’16)
43. What is data definition language? Give example. (K1) (N/D’16)
44. List out any two keys. (K1) (N/D’16)
45. Give the difference between ODBC and JDBC. (K4) (N/D’16)
46. What are the major drawbacks of File processing System? (K1) (N/D ’19)
47. What is meant by weak entity set? Explain with an example. (K1) (N/D ’19)
48. What is the latest version of SQL Server? Is Sybase SQL? (K1)
49. Who designed the first integrated DBMS? How it was called? (K1)
50. What is Sequel?(K1)
51. What is the name of the product released by IBM using Codd’s idea? (K1)
52. Who is the Father of Database Management Systems? (K1)
53. Who were the principal designers of original SQL specification? (K1)
54. Define data, database, and DBMS and data base system. (K1)
55. Define relational algebra. (K1)
56. What do you mean by degree of a relation? (K1)
57. Define attribute. What are the types of attribute? (K1)
58. Define the terms relation, tuple variable and domain. (K1)
59. What is a SELECT and PROJECT operation? (K1)
60. What is SQL? Write down the advantages. (K1)
61. Differentiate between Timestamp & Time Data type. (K4)
62. Write a short note on String operations.(K3)
63. List the various SQL data types. (K1)
64. Who described relational model? When? (K1)
PART - B
1. (a)Explain the database management system architecture with a neat sketch. (K2)
(b)(i)Outline select and project operations in relational algebra with an example. (K2)
(ii)What is embedded SQL ? Explain with an example. (K1) (A/M’2023)
2. Consider the following relations :
EMPLOYEE
ENO NAME DOB GENDER DCODE

12345 HAMEN 24-MAR-2001 M 201

12346 VINI 12-MAR-2001 F 202

12347 ANI 11-JAN-1999 F

12348 PETER 14-FEB-2001 M

DEPARTMENT
DCODE DNAME

201 COMPUTER SC

202 INFN SC

203 CIVIL

204 MECHANICAL
The primary key of each relation is underlined .Outline cartesian product, equi join, left outer
join , right outer join and full outer join operations in relational algebra operations with the
EMPLOYEE and DEPARTMENT relations. (K2) (A/M’2023)
3. Illustrate the database system architecture with a neat diagram. (K3) (A/M’2022)
consider the relational database
employee(empname,street,city)
works(empname,companyname,salary)
company(companyname,city)
manages(empname,managername)
write each of the following queries in relational algebra and sql
4. write each of the following queries in relational algebra and sql.(K3)
i) Find the names,street addresses and cities of the all employees who work for Indian bank
corporation and earn more than 10 lakhs per annum. (2 + 2)
ii) Insert the tuple (‘siva’.gandhi street,Chennai) in the database.(2 + 1)
iii) Delete all employees who work for Indian Bank Corporation.(2+1)
iv) Give all the managers in this database a 15 % salary raise in the database.(2+1) (A/M’2022)
5. i) Construct an E – R Diagram for a car insurance company whose customers own one or more
cars each .Each car has associated with it zero to any number of recorded accidents .(9)
ii) Convert the designed E-R in to relational design.(4). (K5) (A/M’2022)
6. Present a relational database schema for a “Library Management System”. State the functional
requirements you are considering. (K1) (N/D’2021)
7. What is query processing? Outline the steps involved in processing a query with a diagram. (13)
(N/D’2021) .(K2)
8. (i) Outline the isolation levels specified by the SQL standard with an example. (8) (ii) Outline the SQL
statements used for transaction control. (5) .(K2) (N/D’2021)
9. Consider the following relations : EMPLOYEE (ENO, NAME, DATE_BORN, GENDER,
DATE_JOINED, DESIGNATION, BASIC_PAY, DEPARTMENT_NUMBER) DEPARTMENT
(DEPARTMENT NUMBER, NAME) Write SQL queries to perform the following : (i) List the details
of employees belonging to department number ‘CSE’. (2) (ii) List the employee number, employee
name, department number and department name of all employees. (4) (iii) List the department number
and number of employees in each department. (3) (iv) List the details of employees who earn less than
the average basic pay of all employees. (4) (K2) (A/M’2021)
10. State and explain the architecture of DBMS. Discuss about the people who deals with database. (K1)
(A/M’2021)
11. What are the several parts of SQL query language ? What are the basic built in types used during SQL
create statement ? State and given example for the basic structure of SQL queries. (K1) (A/M’2021)
12. Explain the following terms briefly : attribute, domain, entity relationship, entity set, relationship set,
one-to-many relationship, many-to-many relationship, participation constraint, overlap constraint,
covering constraint, weak entity set, aggregation and role indicator. (K2) (A/M’2021)
13. Consider the following relations : Sailors (sid:integer, sname:string, rating:integer, age:real) Boats
(bid:integer, bname:string, color:string) Reserves(sid:integer, bid:integer, day:date) Write the SQL
statement for the following queries : i) Find all sailors with a rating above 7. (3) ii) Find the sids of
sailors who have reserved a red boat. (3) iii) Find the colors of boats reserved by lubber. (4) iv) Find the
names of sailors who have reserved at least one boat. (3) (K2) (A/M’2021)
14. Explain in detail about Relational Algebra, Domain Relational Calculus and Tuple Relational Calculus
with suitable examples. .(K2) (N/D’2020)
15. Write the DDL, DML, DCL commands for the students database. Which contains student details :
name, id, DOB, branch, DOJ. Course details : Course name, Course id, Stud. id, Faculty name, id,
marks. (15) .(K3) (N/D’2020)
16. Justify the need of embedded SQL. Consider the relation student (Reg. No., Name, mark and grade).
Write embedded dynamic SQL program in C language to retrieve all the student’s records whose mark
is more than 90. .(K5) (N/D’2020)
17. a) i) Explain select, project and Cartesian product operations in relational algebra with an example. (K2)
(6)
ii) Construct an E-R diagram for a car insurance company whose customers own one or more cars each.
Each car has associated with it zero to any number of recorded accidents. Each insurance policy covers
one or more cars and has one or more premium payments associated with it. Each payment is for a
particular period of time and has an associated due date and the data when the payment was received. .
(K5) (N/D’2020)
18. i) Write a note on SQL facilities. (8) ii) With a neat sketch explain the states of a transaction. (8) .(K3)
(N/D’2020)
19. Sketch the typical component modules of DBMS. Indicate and explain the interactions between those
modules of the system. (N/D’19) With suitable neat diagram, explain the database system architecture.
(N/D’16) (M/J’14) (or) Write about the structure of database system architecture with block diagram.
(M/J’16) (M/J’13)(M/J’15)(A/M’11)(A/M’10) (N/D’15)(A/M’17)(or) State and explain the
architecture of DBMS. Discuss about the people who deals with database. .(K3) (A/M’21)
20. Explain the three schema architecture with a neat diagram. (N/D’19) Briefly explain about views of
data.(16) .(K2) (M/J’16)
21. Consider the schema .(K2) (N/D’19)
Suppliers (sid:integer, sname: string, address : string)
Parts(pid: integer, pname: string,color :string)
Catlog(sid:integer , pid:integer, cost:real)
The key fields are underlined, and the domain of each field is listed after the field name. Therefore sid is
the key for suppliers, pid is the key for Parts, and sid and pid together form the key for catlog. The
Catlog relation lists the prices charged for parts by Suppliers.
Write the queries in SQL
i. Find the names of suppliers who supply some red part
ii. Find the sids of suppliers who supply some red part and some green part
iii. Find the sids of suppliers who supply every red part
iv. Find the pids of parts supplied by atleast two different suppliers
22. Consider the following schema .(K2) (N/D’19) (M/J’15)
Suppliers (sid:integer, sname: string, address : string)
Parts(pid: integer, pname: string,color :string)
Catlog(sid:integer , pid:integer, cost:real)
The key fields are underlined, and the domain of each field is listed after the field name. Therefore sid is
the key for suppliers, pid is the key for Parts, and sid and pid together form the key for catlog. The
Catlog relation lists the prices charged for parts by Suppliers. Write the following queries in relational
algebra and SQL.
(i) Find the sids of suppliers who supply some red or green part.
(ii) Find the sids of suppliers who supply every part.
(iii) Find the sids of suppliers who supply every red part of supply green part.
23. Write short notes on Embedded SQL. Give example. (N/D’16) )(or) Describe about the static and
dynamic SQL in detail. .(K3) (A/M’2019)
24. Explain three different groups of data models with suitable examples. (A/M’ 19).Compare and contrast
various data models. (N/D’16)(or) Explain in detail about the different data models with neat diagram.
(10) .(K2) (N/D’12)
25. Consider the following scenario: .(K2) (A/M 2018)
A university registrar’s office maintains data about the following entities:
(a) Courses, including number, title, credits, syllabus and prerequisites
(b) Course offerings, including course number, year semester section number, instructor, timing and
classroom
(c) Students, including student-id, name and program
(d) Instructors, including identification number, name, department and title.
Further, the enrollment of students in courses and grades awarded to students in each course they are
enrolled for must be appropriately modeled.
(i) Model an entity relationship diagram for the above scenario
(ii) Map the entity relationship diagram you have modeled to relations
26. Explain the select, project, Cartesian product and join operations in relational algebra with an example.
(K2) (A/M 2018)
27. Explain the aggregate function in SQL with an example. (K2) (A/M 2018)
28. What are the functions of database administrator? (6) (M/J’14) (or) Mention any four major
responsibilities of DBA. (4) .(K1) (A/M’11)
29. Write a note on database languages.(8) .(K3) (M/J’14)
30. Explain the distinctions among the terms primary key, candidate key and super key. Give relevant
examples. (6) .(K2) (N/D’11)
31. What is referential integrity? Give relevant example. (4) .(K1) (N/D’11)
32. With relevant examples discuss the various operations in relational algebra. (K2) (N/D’11) (M/J’14)
(A/M’17)
33. Discuss in detail about the major disadvantages of file-processing system. (K2) (6) (N/D’12)
34. A university registrar’s office maintains data about the following entities: (N/D’11)
Courses, including number, title, credits, syllabus and prerequisites;
Course offerings, including course number, year, semester, section number, instructor, timings and
classroom;
Students, including student-id, name and program; and Instructors, including identification number,
name, department and title. Further, the enrollment of students in course and grades awarded to students
in each course they are enrolled for must be appropriately modeled. Construct an E-R diagram for the
registrar’s office. Document all assumptions that you make about the mapping constraints. (K2) (10)
35. Explain the advantages and disadvantages of DBMS. (K2) (8)
36. Explain E.F.Codd rules.(Or) Explain in detail on the Codd’s rule on relational database.
(K2) (N /D ’19)
37. Give a note on any 10 database terminologies. (K4)
38. Write the following queries in relational algebra and SQL.
(i) Find the names of employees who have borrowed a book published by McGraw-Hill. (5)
(ii) Find the names of employees who have borrowed all books published by McGraw-Hill. (5) (K3)
(A/M’17)
39. Consider a student registration database comprising of the below given table schema (K2) (A/M’15)
Student File
Student Number Student Name Address telephone
Course File
Course Number Description Hours Professor Number
Professor File
Professor Number Name Office
Registration File
Student Number Course Number Date
Consider a suitable sample of tuples/records for the above mentioned tables and write DML statements
(SQL) to answer for the queries listed below:
(i) Which courses does a specific professor teach?
(ii) What courses are taught by two specific professors?
(iii) Who teaches a specific course and where is his/her office?
(iv) For a specific student number, in which courses is the student registered and what is his/her
name?
(v) Who are the professors for a specific student?
(vi) Who are the students registered in a specific course?
40. Write different SQL facilities for recovery. (K3) (M/J’15)
41. Explain about SQL Fundamentals.(8) (M/J’16) (or) Briefly explain about fundamental, additional
operations in SQL with example. (K2)
42. Explain about Data Definition Language(DDL).(8) (K2) (M/J’16)
43. What are the several parts of SQL query language? What are the basic build in types used during SQL
crate statement? State and given example for the basic structure of SQL queries. (K1) (A/M’21)
44. Explain the following with examples:
(i)DDL
(ii)DML
(iii) Embedded SQL (K2) (N/D’14)
42. Write short notes on Advanced SQL features. (K3)
43. Describe the six clauses in the syntax of an SQL query, and show what type of constraints can be
specified in each of the six clauses. Which of the six clauses are required and which are optional? (K2)
(N/D’15) (8)
44. Assume the following table:(K3) (N/D’15)
Degree (degcode, name, subject)
Candidate (seatno, degcode, name, semester, month, year, result)
Marks (seatno,degcode, semester ,month,year,papcode,marks)
Degcode-degree code, Name-name of the degree (M.Sc, M.Com)
Subject –subject of the course Eg. Phy, Pap code- paper code eg.A1.
Solve the following queries using SQL.
i) Write a SELECT statement to display all the degree codes which are there in the candidate table but
not present in degree table in the order of degree code. (4)
ii) Write a SELECT statement to display the name of all the candidate who have got less than 40 marks
in exactly 2 subjects.(4)
iii) Write a SELECT statement to display the name, subject and number of candidate for all degree in
which there are less than 5 candidates. (4)
iv) Write a SELECT statement to display the name of all the candidate who have got highest total marks
in M.Sc. (4)
45. Discuss about various SQL data types. (K2)
46. Explain briefly about the database objects in detail with an example. (K2)
47. Justify the need of Embedded SQL. Consider the relation student(Reg No, name, mark and grade). Write
embedded dynamic SQL program in C language to retrieve all the student’s record whose mark is more
than 90. (K5) (A/M’17)

48. Consider the following relations : (K2) (A/M’21)

Sailors (sid:integer, sname:string, rating:integer, age:real)

Boats (bid:integer, bname:string, color:string)

Reserves(sid:integer, bid:integer, day:date)

Write the SQL statement for the following queries :


i) Find all sailors with a rating above 7. (3)
ii) Find the sids of sailors who have reserved a red boat. (3)
iii) Find the colors of boats reserved by lubber. (4)
iv) Find the names of sailors who have reserved at least one boat. (3)

K1-Remember, K2-Understand, K3-Apply, K4-Analyze, K5-Evaluate and K6-Create

Prepared by : Verified by : Approved by

Mrs.K H Gayathri AP/ CSE Mr. S .Balaji Dr. U.V ARIVAZHAGU

HOD/CSE Principal

You might also like