Professional Documents
Culture Documents
Tuple Relational Calculus (TRC) : CSC 742 Database Management Systems
Tuple Relational Calculus (TRC) : CSC 742 Database Management Systems
CSC 742
Database Management Systems
Topic #8:
Relational Calculus
Spring 2002
Relational Calculus: 1
not any specific series of operations
In contrast, relation algebra defines the
sequence of operations.
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
TRC (Contd)
SSN
Relational Calculus: 2
Spring 2002
Employee
Spring 2002
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
Spring 2002
Tuple Variables
Spring 2002
11
TRC Examples: 1
Spring 2002
Spring 2002
12
TRC Examples: 2
Employee
Project
Works_on
13
TRC Examples: 3
Spring 2002
16
14
Using ER Diagrams
17
Spring 2002
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