0% found this document useful (0 votes)
2 views

Mid_Term_Question_222_CSE3521

The document outlines the mid-term exam for the Database Management Systems course, detailing the structure, rules, and specific questions related to database concepts such as ER diagrams, data abstraction, and SQL queries. It includes scenarios for an Online Art Gallery and an HR schema, requiring students to demonstrate their understanding of database relationships and query writing. The exam is designed to assess knowledge on various database management topics within a time limit of 1 hour and 45 minutes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Mid_Term_Question_222_CSE3521

The document outlines the mid-term exam for the Database Management Systems course, detailing the structure, rules, and specific questions related to database concepts such as ER diagrams, data abstraction, and SQL queries. It includes scenarios for an Online Art Gallery and an HR schema, requiring students to demonstrate their understanding of database relationships and query writing. The exam is designed to assess knowledge on various database management topics within a time limit of 1 hour and 45 minutes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Mid Term Exam, Trimester: Summer 2022

Course Code: CSE-3521, Course Title: Database Management Systems


Total Marks: 30, Duration: 1 hour 45 minutes

Any examinee found adopting unfair means will be expelled from the trimester /
program as per UIU disciplinary rules.

1. a) What do you understand by discriminator? Differentiate between identifying and 2+6


non-identifying relationships.
b) Consider the scenario for Online Art Gallery:

The Art Gallery stores all the artist information including unique artist_id, name, age, and
address. An artist can have multiple addresses containing holding no., street name, and
city. An artist can have many arts.

Art is described by unique art_id, title. Every art has art details. This detail contains
category, style, subject, medium, material, and tag. This system also stores the date when
the art was created.

Curators take care of the arts and place them in the right places(rooms). Art can be taken
care of by many curators and a curator can take care of many arts. Curators assign a
virtual room for each art. A room has a unique room_id, title, and size. The system also
stores the date when a curator places art in a room. Curators have unique curator_id,
name, and hiring date.

Art lovers can see the arts and they have a unique id, name, and address.

Design an ER diagram for the scenario.

2. a) Give a brief explanation about data abstraction in the case of database management 4+7
systems. Can all candidate keys be a primary key? Justify your answer with proper
explanation.
b) Write the corresponding schema of the ER diagram given below.
3. 8+3

Figure 1: HR Schema
a) Use the given HR schema (Figure 1) to write the following queries (I-V)
I. Show the employee id, email and full name of those employees whose employee id
ranges between 110 and 200. Full name format: first_name<space>last_name
II. Write a query to display the top 5 jobs details considering Max_Salary. (Hint:
Higher Max_Salary means better job).
III. Write a query to get the department id-wise difference between the average
salary and minimum salary of the employees. Only consider the departments
having minimum salary of less than 4000.
IV. Write a query to display the city and number of departments in each of the cities
by the descending order of the cities.
V. Write a query to find the name (first_name, last_name), and salary of the
employees who earn more than the average salary and have the string ‘er’ starting
at the 3rd position of their first name. (use subquery)

b) Consider the following relations for question (I) and (II):

I. Write relational algebra for the following query:


Show Student_Id, Student_Name and Course_Name for the students whose
Student_Id is greater or equal to 550 and consider the courses of ‘CSE’
department only.
II. Show the output relation:
∏Student_Id, Course_Id, Department(σCourse_ID>1151(Course Students))

You might also like