1. Query


SELECT nama_mhs, alamat
FROM mahasiswa m, nilai n, matakuliah mk
WHERE m.nim=n.nim AND n.kd_mk=mk.kd_mk AND semester=6


2. Aljabar Relasional




π nama_mhs, alamat (σ semester = 6(mahasiswa nilai matakuliah))

Query Graph
 Query Tree



3. Menyederhanakan Query

misal :  P : alamat = “depok” 
            Q : nilai = “B” 
            R :jns_kelamin : “laki-laki”

( ¬P ∨ Q ) ∧ ( ¬Q ∨ R ) ∧ P ∧ ¬R
P ∧ ( ¬P ∨ Q ) ∧ ¬R ∧ (¬Q ∨ R)
( P ∧ ¬P) ∨ ( P ∧ Q ) ∧ ( ¬R ∧ ¬Q) ∨ ( ¬R ∧ R )
false ∨ ( P ∧ Q ) ∧ ( ¬R ∧ ¬Q) ∨ false
( P ∧ Q ) ∧ ( ¬R ∧ ¬Q)
( P ∧ ¬R ) ∧ ( Q ∧ ¬Q)
( P ∧ ¬R ) ∧ false
false