TAILIEUCHUNG - Introduction to Database Systems- P14

Tham khảo tài liệu 'introduction to database systems- p14', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 624 Part V Further Topics RX A ELLIPSE RÏ A s CIRCLE El t ellipse C2 t circle C2 circle C3 i circle Fig. Relations RX and RY RJ Fig. The join RJ of relations RX and RY Now consider the join of RX and RY. RJ say see Fig. . Clearly every A value in RJ will necessarily be of type CIRCLE because any A value in RX whose most specific type is merely ELLIPSE cannot possibly compare equal to any A value in RY . Thus it might be thought that the declared type of attribute A in RJ should be CIRCLE not ELLIPSE. But consider the following Since RX and RY each have A as their sole attribute RX JOIN RY reduces to RX INTERSECT RY. In this case therefore the rule regarding the declared type of the result attribute for JOIN must obviously reduce to the analogous rule for INTERSECT. RX INTERSECT RY in turn is logically equivalent to RX MINUS RX MINUS RY . Let the result of the second operand here that is RX MINUS RY be RZ. Then it should be clear that a. RZ will include some A values of most specific type ELLIPSE in general and so the declared type of attribute A in RZ must be ELLIPSE. b. The original expression thus reduces to RX MINUS RZ. where the declared type of attribute A in both RX and RZ is ELLIPSE and hence yields a final result in which the declared type of attribute A must obviously be ELLIPSE once again. It follows that the declared type of the result attribute for RX INTERSECT RY and therefore for RX JOIN RY as well must be ELLIPSE not CIRCLE even though to repeat every value of that attribute must in fact be of type CIRCLE1 Now we turn to the relational difference operator MINUS. First consider RX MINUS RY. It should be clear that some A values in the result of this operation will be of type ELLIPSE not CIRCLE and so the declared type of A in that result must be of type ELLIPSE. But what about RY MINUS RX Clearly every A value in the result of this latter operation will be of type CIRCLE and so again it might be thought that the declared type of A in .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.