Uploaded by Minh Trần

Relational Algebra

advertisement
σ ⋈
9.
R1 (MAGV, PHAI, SOCON) <- MAGV F MAGV, PHAI, COUNT(MAGV) (GIAOVIEN ⨝ NGUOITHAN)
R2 <- R1
RESULT <- π MAGV (R1 ⨝ R1.PHAI = R2.PHAI AND R1.SOCON = R2.SOCON R2)
11.
R1 <- π MAGV (σ HOTEN = ‘Nguyễn Hoài An’ ( GIAOVIEN))
R2 <- π MADT (R1 ⨝ THAMGIADT)
RESULT <- π GVCNDT ( DETAI ÷ R2 )
13.
R1 <- DETAI
R2 <- σ DETAI.KINHPHI < R1.KINHPHI (DETAI x R1)
R3 <- π GVCNDT (DETAI – R2)
RESULT <- π TENKHOA (KHOA ⋈ KHOA.TRUONGKHOA=R3.GVCNDT R3)
15.
R1 <- π MADT, TENCD (CHUDE ⋈ DETAI)
R2 <- π TENCD, MAGV (R1 ⋈ THAMGIADT)
R3 <- π MAGV (σ MABM=’CNPM’ (GIAOVIEN))
RESULT <- π TENCD (R2 ÷ R3)
3.
R1(MADT, CVCHUADAT) <- MADT F
R2 (MADT, SOGIAOVIEN) <- MADT F
MADT, COUNT(KETQUA) (
σ KETQUA=NULL (THAMGIADT))
MADT, COUNT(MAGV) (THAMGIADT)
RESULT <- π MADT, SOGIAOVIEN, CVCHUADAT (R1 ⋈ R2)
1.
R1 (NAMTBM, MABM) <- π
BOMON)
YEAR(NGSINH), MABM
(GIAOVIEN ⋈
R2 <- π HOTEN, LUONG (GIAOVIEN ⋈ YEAR(NGSINH) < NAMTBM R1)
GIAOVIEN.MAGV = BOMON.TRUONGBM
Download