Đang chuẩn bị liên kết để tải về tài liệu:
Applied Mathematics for Database Professionals phần 6

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Hầu hết các tham gia liên quan đến chỉ có hai cấu trúc bảng. Năm vị (PTIJ3, PTIJ9, PTIJ10, PTIJ12, PTIJ15) hạn chế tuples tham gia có liên quan đến nhiều hơn so với hai cấu trúc bảng. Chúng ta hãy xem xét kỹ hơn những năm. Vị PTIJ3 tham gia một tuple SREP (biến) với tuple EMP liên quan của nó (es biến), tiếp tục tham gia tuple EMP với tuple MEMP liên quan của nó (biến m), | CHAPTER 7 SPECIFYING DATABASE DESIGNS 177 o1ị COURSE STARTS o2ị COURSE STARTS Ú ol STARTS o2 STARTS c2 DUR Ú 02 starts oi starts ci dur Predicates PTIJ1 to PIJ15 all limit the tuples that are allowed in some join. Most of these joins involve only two table structures. Five predicates PTIJ3 PTIJ9 PTIJ10 PTIJ12 PTIJ15 limit the tuples in joins that involve more than two table structures. Let s take a closer look at those five. Predicate PTIJ3 joins an SREP tuple variable s with its related EMP tuple variable es continues to join this EMP tuple with its related MEMP tuple variable m and finally joins this MEMP tuple with its related EMP tuple variable em . All tuples that are in this join across four tables note that EMP is joined twice are constrained by the predicate es MSAL s COMM 12 em MSAL . This states that the monthly salary of the sales representative increased with a twelfth of his her commission should be less than the monthly salary of the employee that is managing this sales representative. By the way this managing employee cannot be a sales representative which might have required adding a twelfth of a commission at the right-hand side of the smaller-than symbol too due to subset requirement PSSR3. Predicate PTIJ9 joins a TERM tuple t directly with a REG tuple r and continues to join the REG tuple with its related CRS tuple c . Note A few notes The join from TERM to REG is not done via EMP. Because TERM is a specialization of EMP you can join TERM directly to any other table structure that EMP can join to using the EMPNO attribute. The join from REG to CRS is not done via OFFR. From the two subset requirements PSSR6 and PSSR10 you can deduce that CRS in REG references CODE in CRS a subset requirement between REG and CRS and you can thus join REG directly to CRS in the way shown. Tuples in this join are constrained by the predicate t LEFT r STARTS c DUR . Do you notice that this formal specification somewhat differs from the embedded informal comment The .