際際滷

際際滷Share a Scribd company logo
Database System Conceps : CH2 Exercises and solutions
Relation Algebra Six basic operators select:   project:   union:   set difference:     cartesian product: x rename:   Additional Operations Natural join: Aggregation: Outer Join: Division:
Problem 2.1.
Problem 2.1.a.  (Street = M_street  City = M_city) (   relation) t1  employee  manages t2   manager (manager_name, m_street, m_city) (employee) Person_name Street City Manager_name M_street M_city Person_name Street City Manager_name Manager_name M_street M_city
Problem 2.1.a. t1  employee  manages t2   manager (manager_name, m_street, m_city) (employee)  (person_name)   (Street = M_street  City = M_city) (t1  t2) Person_name Street City Manager_name M_street M_city Person_name Street City Manager_name Manager_name M_street M_city
Problem 2.1.a. t1  employee  manages t2   manager (manager_name, m_street, m_city) (employee)  (person_name)   (Street = M_street  City = M_city) (t1  t2)
Problem 2.1.b.
Problem 2.1.b. wrong answer! Set different operation     attribute  螳 狩伎  ! person_name company_name salary person_name
Problem 2.1.c.
Problem 2.1.c.
Problem 2.1.c.
Problem 2.3.a.
Problem 2.3.a. wrong answer! Update    覲伎 襯 譟一 !
Problem 2.3.b.
Problem 2.5.a.
Problem 2.5.b. & 2.5.c
Problem 2.5.d. & 2.5.e
Problem 2.6.
Problem 2.6.a.
Problem 2.6.a.
Problem 2.6.b. & 2.6.c
Problem 2.7.a.
Problem 2.7.b.
Problem 2.7.b.
Problem 2.7.c.
Problem 2.8.a. t1 account_number count(customer_name)
Problem 2.8.b. account customer 1 customer 2 customer 3
Problem 2.8.b. account customer 1 customer 2 customer 3 depositor 1 account 1 customer 1 depositor 2 account 2 customer 2 depositor 3 account 3 customer 3
Problem 2.8.b. account customer 1 customer 2 customer 3 customer 1 customer 2 customer 3 account 1 account 2 account 3 depositor 1 account 1 customer 1 depositor 2 account 2 customer 2 depositor 3 account 3 customer 3
Problem 2.8.b. account customer 1 customer 2 customer 3 customer 1 customer 2 customer 3 account depositor 1 account 1 customer 1 depositor 2 account 2 customer 2 depositor 3 account 3 customer 3
Problem 2.8.b.
Problem 2.9.a. t1 t2 company_name count-distinct(person_name) max(count-tistinct(person_name)
Problem 2.9.b.
Problem 2.9.b.
Problem 2.9.c.
Problem 2.11.a
Problem 2.11.b.
Problem 2.11.c. common mistake! t1 name  譟伎讌  ! empno count_distinct(isbn) empno name office age isbn title authors publisher date
Problem 2.11.c. & 2.11.d
Thanks to listening! :D 讌覓語 る ? e-mail :  [email_address] twitter :  http://twitter.com/tm_kor facebook :  http://bit.ly/alTaCE always open!

More Related Content

Assignment1 solution