You are on page 1of 5

Thc hnh C s d liu Tun 4

GV: ThS. Lng Th Ngc Khnh Khoa CNTT i hc Tn c Thng



1
BI TP THC HNH C S D LIU
====Tun 4====
GV: ThS. LNG TH NGC KHNH
I. Trng tm
1. To v qun l CSDL DeAnCongTy.
2. S dng cc cu lnh truy vn d liu trn CSDL DeAnCongTy.
II. Yu cu
CSDL DeAnCongTy c m t nh sau:


Thc hnh C s d liu Tun 4

GV: ThS. Lng Th Ngc Khnh Khoa CNTT i hc Tn c Thng

2
NHANVIEN:


PHONGBAN:


PHANCONG:


DEAN:
Thc hnh C s d liu Tun 4

GV: ThS. Lng Th Ngc Khnh Khoa CNTT i hc Tn c Thng

3


DIADIEM_PHG:


THANNHAN:

Cu hi
1. Tm nhng nhn vin lm vic phng s 4.
2. Tm nhng nhn vin c mc lng trn 30000.
3. Tm nhng nhn vin c mc lng trn 25000 phng s 4 hoc c mc
lng trn 30000 phng s 5.
4. Cho bit h tn y ca cc nhn vin TPHCM.
5. Cho bit ngy sinh v a ch ca nhn vin Dinh Ba Tien.
6. Vi mi phng ban, cho bit tn phng ban v a im phng.
7. Tm tn nhng ngi trng phng ca tng phng ban.
Thc hnh C s d liu Tun 4

GV: ThS. Lng Th Ngc Khnh Khoa CNTT i hc Tn c Thng

4
8. Tm TENDA, MADA, DDIEM_DA, PHONG, TENPHG, MAPHG, TRPHG,
NG_NHANCHUC.
9. Tm tn v a ch ca tt c nhn vin phng nghien cuu
10. Tm tn nhng n nhn vin v tn ngi thn ca h.
11. Gii thch ngha ca hai cu truy vn sau:
select MANV, TENNV select MANV, TENNV
from NHANVIEN from NHANVIEN
where MA_NQL is null where MA_NQL is not null
12. Cho bit h tn v a ch cc nhn vin sng TPHCM, sp xp tng dn /
gim dn theo tn.
13. Cho bit h tn v mc lng cc nhn vin trn 40 tui, sp xp tng dn /
gim dn theo lng.
14. Hy cho bit nhng nhn vin no tham gia vo cc n c a im t
Ha noi.
15. Vi cc n TPHCM , lit k cc m s n, m s phng ban ch tr
n, h tn trng phng, cng nh ngy sinh v a ch ca ngi y.
16. Vi mi nhn vin cho bit h tn nhn vin v h tn ngi qun l tr!c tip
ca nhn vin.
17. Vi mi nhn vin cho bit h tn nhn vin v h tn trng phng ca
phng ban m nhn vin lm vic.
18. Tm nhng nhn vin phng s 5 c tham gia vo n sn ph"m X vi s
gi lm vic trn 10h.
19. Tm nhng nhn vin phng s 5 c tham gia vo n sn ph"m X v nhn
vin ny do Nguyen Thanh Tung qun l tr!c tip.
20. Cho bit h tn nhn vin v tn cc n nhn vin ny tham gia nu c.
Thc hnh C s d liu Tun 4

GV: ThS. Lng Th Ngc Khnh Khoa CNTT i hc Tn c Thng

5
---------------------------------------------------------------------------------------------
TI LIU THAM KHO
1. Nguy#n Gia Tun Anh, Trng Chu Long, Bi tp C s d liu
2. Slide bi ging C s d liu, Khoa Cng ngh thng tin - $i hc Khoa hc
T! Nhin
3. R. Elmasri & S.B. Navathe (2010), Fundamentals of Database Systems, 6
th

Edition, Addison-Wesley