CP363 Lecture Notes - Lecture 10: Tuple, Referential Integrity, Foreign Key

44 views2 pages

Document Summary

Attributes whose values are to be retrieved. Boolean condition that must be true for any retrieved tuple. Selection conditions include join conditions when multiple relations are involved. Query 1: two tables in from clause (from employee,department) When you have two tables in from clause need a condition to join them. With three table need two join conditions. Same name can be used for two (or more) As long as the attributes are in different relations. Must qualify the attribute name with the relation name to prevent ambiguity. Declare alternative relation names e and s to refer to the employee relation twice in a query. From employee as e,employee as s where e. super_ssn=s. ssn; Recommended to practice abbreviated names and to prefix same or similar attributes from multiple tables. Note that te relation employee now has variable name e. Result is all possible tuple combinations (or the algebra operation of cartesian product)

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents