Exercise 1: Write expressions of relational algebra to answer the following queries: a. Find MaMH and TenMH of all courses having SOTIET greater than 45. b. Find MaSV, HoSV, TenSV of all students of the department Hệ thống thông tin. (denoted department name is TenMH) c. Find MaKH, TenKH of all departments having no students. (denotation of departments is MaKH,, student code is denoted by MaSV)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write expressions of relational algebra to answer the following queries: 

We have the database consist of 4 relations:
Table KHOA:
MaKH
HTTT
MANG
CNPM
KTMT
KHMT
TenKH
Hệ thống thông tin
Mạng và truyền thông
Công nghệ phần mềm
Kỹ thuật máy tính
Khoa học máy tính
Table SINHVIEN:
MASV HOSV
SV01
SV02
SV03
SV04
SV05
SV06
SV07
SV08
Lê Kim
Trần Minh
SV01
SV01
Lê An
Trần Anh
Trần Thị
Lê Thị Thu
Nguyễn Kim
Lê Văn
Table KETQUA:
Masy MaMH
SV01
CSDL
SV01
CSDL
TTNT
TTNT
SV01
MMT
SV02 CSDL
SV02
CSDL
SV02 MMT
SV02 CTDL
SV03 CSDL
CSDL
SV03
SV03 MMT
SV03
MMT
SV04
CSDL
SV04
CTDL
SV05
CSDL
SV05
MMT
SV05 MMT
SV06
TTNT
SV06
DHMT
LanThi
1
2
1
2
1
1
2
1
1
1
2
1
2
1
1
1
1
TenSV
Lan
Chánh
Tuyết
Tuấn
Mai
Thuy
Thu
Long
2
1
1
GioiTinh
Nữ
Nam
Nữ
Nam
Nữ
Nữ
Nữ
Nam
Diem
3
6
5.5
6
5
4.5
7
10
9
2
5
2.5
4
4.5
10
7
2.5
5
6
10
Trượt
Dat
Table MONHOC:
MAMH
CSDL
TTNT
MMT
Dat
Dat
DHMT
CTDL
|NgaySinh
23/02/1990
24/12/1992
21/02/1991
20/12/1993
KetQua
Trượt
Dat
Dat
Dat
Dat
Trượt
Dat
Dat
Dat
Trượt
Dat
Trượt
Trượt
Trượt
Dat
Dat
ΤΕΝΜΗ
Cơ sở dữ liệu
Trí tuệ nhân tạo
Mạng máy tinh
Đồ họa máy tính
Cấu trúc dữ liệu
NoiSinh
Hà nội
Bình Định
Hải phòng
TpHCM
12/08/1991 TpHCM
02/01/1991
An Giang
02/02/1990
Hà Nội
08/12/1992 TpHCM
MaKH
HTTT
MANG
HTTT
MANG
CNPM
HTTT
CNPM
HTTT
SOTIET
|45 45 45
60
60
Hoc Bong
130000
150000
170000
80000
0
0
180000
190000
Diem TB
Transcribed Image Text:We have the database consist of 4 relations: Table KHOA: MaKH HTTT MANG CNPM KTMT KHMT TenKH Hệ thống thông tin Mạng và truyền thông Công nghệ phần mềm Kỹ thuật máy tính Khoa học máy tính Table SINHVIEN: MASV HOSV SV01 SV02 SV03 SV04 SV05 SV06 SV07 SV08 Lê Kim Trần Minh SV01 SV01 Lê An Trần Anh Trần Thị Lê Thị Thu Nguyễn Kim Lê Văn Table KETQUA: Masy MaMH SV01 CSDL SV01 CSDL TTNT TTNT SV01 MMT SV02 CSDL SV02 CSDL SV02 MMT SV02 CTDL SV03 CSDL CSDL SV03 SV03 MMT SV03 MMT SV04 CSDL SV04 CTDL SV05 CSDL SV05 MMT SV05 MMT SV06 TTNT SV06 DHMT LanThi 1 2 1 2 1 1 2 1 1 1 2 1 2 1 1 1 1 TenSV Lan Chánh Tuyết Tuấn Mai Thuy Thu Long 2 1 1 GioiTinh Nữ Nam Nữ Nam Nữ Nữ Nữ Nam Diem 3 6 5.5 6 5 4.5 7 10 9 2 5 2.5 4 4.5 10 7 2.5 5 6 10 Trượt Dat Table MONHOC: MAMH CSDL TTNT MMT Dat Dat DHMT CTDL |NgaySinh 23/02/1990 24/12/1992 21/02/1991 20/12/1993 KetQua Trượt Dat Dat Dat Dat Trượt Dat Dat Dat Trượt Dat Trượt Trượt Trượt Dat Dat ΤΕΝΜΗ Cơ sở dữ liệu Trí tuệ nhân tạo Mạng máy tinh Đồ họa máy tính Cấu trúc dữ liệu NoiSinh Hà nội Bình Định Hải phòng TpHCM 12/08/1991 TpHCM 02/01/1991 An Giang 02/02/1990 Hà Nội 08/12/1992 TpHCM MaKH HTTT MANG HTTT MANG CNPM HTTT CNPM HTTT SOTIET |45 45 45 60 60 Hoc Bong 130000 150000 170000 80000 0 0 180000 190000 Diem TB
Exercise 1: Write expressions of relational algebra to answer the following queries:
a. Find MaMH and TenMH of all courses having SOTIET greater than 45.
b. Find MaSV, HoSV, TenSV of all students of the department Hệ thống thông tin.
(denoted department name is TenMH)
c. Find MaKH, TenKH of all departments having no students.
(denotation of departments is MaKH,, student code is denoted by MaSV)
d. Find MaMH, TenMH of all courses learned by both Lê Kim Lan and Trần Minh Chánh.
(the symbol of the courses is MAKH)
e. Find the MaSV, HoSV, TenSV of student having the highest scholarship.
(the symbol for the scholarship is HOCBONG)
f. Find the MaSV, HoSV, TenSV of all students participating in at least two different
courses.
g. Find the MaSV, HoSV, TenSV of all students participating in one course many times.
Transcribed Image Text:Exercise 1: Write expressions of relational algebra to answer the following queries: a. Find MaMH and TenMH of all courses having SOTIET greater than 45. b. Find MaSV, HoSV, TenSV of all students of the department Hệ thống thông tin. (denoted department name is TenMH) c. Find MaKH, TenKH of all departments having no students. (denotation of departments is MaKH,, student code is denoted by MaSV) d. Find MaMH, TenMH of all courses learned by both Lê Kim Lan and Trần Minh Chánh. (the symbol of the courses is MAKH) e. Find the MaSV, HoSV, TenSV of student having the highest scholarship. (the symbol for the scholarship is HOCBONG) f. Find the MaSV, HoSV, TenSV of all students participating in at least two different courses. g. Find the MaSV, HoSV, TenSV of all students participating in one course many times.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education