Escolar Documentos
Profissional Documentos
Cultura Documentos
CSC 742
Database Management Systems
Topic #8:
Relational Calculus
Spring 2002
Spring 2002
Relational Calculus: 1
SSN
Fname
Salary
Smith
John
30000
121-23-3333
Wong
Frank
45000
153-32-1342
Wallace
Jennifer
43000
154-33-3333
Borg
James
56000
555-44-5555
Lname
111-22-3333
English
Joyce
53000
Employee
Spring 2002
Relational Calculus: 2
Spring 2002
TRC (Contd)
Spring 2002
Employee
{t.Fname, t.Lname | Employee(t) and t.salary > 50000}
SSN
Lname
Fname
Salary
111-22-3333
Smith
John
30000
121-23-3333
Wong
Frank
45000
153-32-1342
Wallace
Jennifer
43000
154-33-3333
Borg
James
56000
555-44-5555
English
Joyce
53000
Spring 2002
Spring 2002
10
Conventions
Tuple Variables
Spring 2002
11
TRC Examples: 1
Spring 2002
Spring 2002
Spring 2002
12
TRC Examples: 2
Employee
Project
Works_on
13
TRC Examples: 3
Spring 2002
16
14
Using ER Diagrams
Spring 2002
17
15
Spring 2002
18
Spring 2002
19
Spring 2002
20
Limitations of TRC
It cannot express queries involving
aggregations
closure
It cannot express non-query operations
insert
delete
update
because those involve modeling the changes in the
state of a database.
Spring 2002
21