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)
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
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F21dc8d94-0133-4889-ac27-cb4b34cf0cb1%2Fac8bf2d5-3e3a-4897-a348-d3d69ab5e17a%2Favq8jjq_processed.png&w=3840&q=75)
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.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F21dc8d94-0133-4889-ac27-cb4b34cf0cb1%2Fac8bf2d5-3e3a-4897-a348-d3d69ab5e17a%2F06iqb2g_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education