Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CSE3055 Database SQL, Assignments of Database Management Systems (DBMS)

SQL Homework Database MSSQL Homework Database

Typology: Assignments

2020/2021

Uploaded on 06/07/2021

eagca2
eagca2 🇹🇷

1 document

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Student ID:
Student Name:
Assoc.Prof.Dr. Mustafa AĞAOĞLU
CSE3055 F’20 | Q#2
1/2
Marmara University Faculty of Engineering Department of Computer Engineering
Fall 2020 CSE3055 Database Systems
Quiz #2
(26.11.2020 | Duration: 45 min)
1) [40 pts] Map the following enhanced entity-relationship diagram into a relational database schema i.e.
tables and fields. Please state any assumptions that you have made. Do not forget to use arrows for
foreign key primary key references. Also, note that the attribute PersonType is a subtype discriminator.
d
d
pf2

Partial preview of the text

Download CSE3055 Database SQL and more Assignments Database Management Systems (DBMS) in PDF only on Docsity!

Student ID: Student Name:

Assoc.Prof.Dr. Mustafa AĞAOĞLU CSE3^055 –^ F’^20 |^ Q# 1 / 2

Marmara University – Faculty of Engineering – Department of Computer Engineering

Fall 2020 – CSE3 0 55 Database Systems

Quiz

( 26 .1 1 .20 20 | Duration: 45 min)

1) [ 40 pts] Map the following enhanced entity-relationship diagram into a relational database schema i.e.

tables and fields. Please state any assumptions that you have made. Do not forget to use arrows for

foreign key – primary key references. Also, note that the attribute PersonType is a subtype discriminator.

d d

Student ID: Student Name:

Assoc.Prof.Dr. Mustafa AĞAOĞLU CSE3^055 –^ F’^20 |^ Q# 2 / 2

2) [ 60 pts] Consider the following database. Write SQL statements for the following queries using the

relational database below.

ALBUM

albumID title year singerID 1 Festival 2006 11 2 Patron 2009 11 3 Mançoloji 1999 6 5 Sakin Ol 1992 4 6 Turuncu 2001 4 7 Sade 2013 4 INSTRUMENT_SINGER singerID insID 1 1 1 3 2 4 3 1 3 8 4 1 4 5 4 6 4 7 11 1 11 3

SINGER

singerID name style 1 Ferhat Göçer Pop 2 Orhan Gencebay Arabesk 3 Candan Erçetin Pop 4 Sertab Erener Pop 5 Gülben Ergen Arabesk 6 Barış Manço Pop 7 Murat Boz Pop 8 Erol Büyükburç Pop 9 Demir Demirkan Rock 10 Zeynep Dizdar Pop 11 Kenan Doğulu Pop INSTRUMENT insID name 1 Piano 2 Drum kit 3 Zurna 4 Bağlama 5 Guitar 6 Harmonica 7 Trumpet 8 Violin

a) [12 pts] List all the attributes of albums which have a year greater than or equal to 2005.

b) [12 pts] List album title, album year, singer name and singer style of albums whose singer is “Sertab

Erener”. The order of the list should be descending according to album title.

c) [12 pts] List all the names of instruments played by the singers whose style is “Pop”. The list should

not display redundant records.

d) [12 pts] List the album ID, title, singer name and style of singers other than the ones who play an

instrument such that second character of the instrument’s name is “a”.

e) [12 pts] List the album title and the name of singers who play at least two different instruments.

Remove redundant records in the list.