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

DBMS Midterm Question Fall 2022

Uploaded by

mr.jhion.adbar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

DBMS Midterm Question Fall 2022

Uploaded by

mr.jhion.adbar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Daffodil International University

Department of Computer Science and Engineering


Faculty of Science & Information Technology
Midterm Examination, Fall 2022
Course Code: CSE311 (Day), Course Title: Database Management System
Level: 3 Term: 1 Batch: 57

Time: 01:30 Hrs Marks: 25

Answer ALL Questions


[The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each
question must be answered sequentially.]
1. Consider the following scenario: 7+5 CLO1

Eagle Music Bangladesh has decided to store information about artists who
perform on its albums (as well as other company data) in a database. Each artist
that records at Eagle has an SSN, a name, an address, and a phone number. Poorly
paid artists often share the same address, and no address has more than one phone.
Each instrument that is used in songs recorded at Eagle has a name (e.g., guitar,
synthesizer, flute) and a musical key (e.g., C, B-flat, E-flat). Each album that is
recorded on the Eagle label has a title, a copyright date, a format (e.g., CD or
MC), and an album identifier. Each song recorded at Eagle has a title and an
author. Each artist may play several instruments, and several artists may play a
given instrument. Each album has a number of songs on it, but no song may
appear on more than one album. Each song is performed by one or more artists
and an artist may perform a number of songs. Each album has exactly one artist
who acts as its producer. An artist may produce several albums.

a) From the scenario, show an Entity Relationship diagram that captures all the
information. Be certain to indicate primary keys, relationships, participation
constraints and cardinality constraints.
b) Translate the ER diagram (you have already proposed in Q1-a) into a
relational database schema.

2. Suppose that you have developed Student Management System. Tell about logical 2 CLO1
level and physical level of data abstraction for this software.

3. Consider the following relation schemas: 3 CLO2


Suppliers(sID, sName, address)
Parts(pID, pName, colour)
Catalog(sID, pID, price)
Answer the following questions using relational algebra query:
a) Choose all prices for parts that are yellow or green
b) Choose the names of all suppliers who supply a part that is white or sky
4. Consider the following tables: 3 CLO2
WorkerInfo (WorkerId, Name, ManagerId, DateOfjoining, City)
WorkerSalary (WorkerId, Project, Salary, Bonus)
Answer the following questions using SQL query:
a) Select all the workers who either live in Washington or work under a manager
with ManagerId – 254
b) Select the workers whose name begins with any two characters, followed by a
text “sd” and ending with any other characters

5. From the following two tables: 5 CLO2


a) Identify the SQL statements for left join and inner join.
b) Show the output for left join.
(From Salesman table take salesman_id and name columns, from Customer table
take customer_id and city columns for all types of joining )

Table 1 – Salesman
salesman_id | name | city | commission
-------------+------------+----------+------------
5001 | James | New York | 0.15
5002 | Nail | Paris | 0.13
5005 | Alex | London | 0.11
5006 | Lyon | Paris | 0.14
5007 | Paul | Rome | 0.13
5003 | Lauson | San Jose | 0.12

Table 2 – Customer
customer_id |cust_name| city |gender|salesman_id
-------------+---------+------------+------+-----------
3002 | Nick | New York | M | 5001
3007 | Davis | New York | M | 5002
3005 | Graham | California | M | 5002
3008 | Julian | London | F | 5003

You might also like