tailieunhanh - Database systems concepts 4th edition phần 4

Nhúng các biểu thức SQL thay đổi cơ sở dữ liệu (cập nhật, chèn, và xóa) không trả lại kết quả. Vì vậy, họ được phần nào đơn giản để thể hiện. Một yêu cầu databasemodification có dạng EXEC SQL END-EXEC Chúng ta phải sử dụng câu lệnh đóng cửa nói với hệ thống cơ sở dữ liệu để xóa các mối quan hệ tạm thời đã tổ chức kết quả của các truy vấn. | Silberschatz-Korth-Sudarshan I II. Relational Databases Database System Concepts Fourth Edition 7. Relational-Database Design The McGraw-Hill Companies 2001 270 Chapter 7 Relational-Database Design combines functional dependencies with the same left side. It is cheaper to test Fc than it is to test F itself. Consider the following set F of functional dependencies on schema A B C A BC B C A B AB C Let us compute the canonical cover for F. There are two functional dependencies with the same set of attributes on the left side of the arrow A BC A B We combine these functional dependencies into A BC. A is extraneous in AB C because F logically implies F AB C u B C . This assertion is true because B C is already in our set of functional dependencies. C is extraneous in A BC since A BC is logically implied by A B and B C. Thus our canonical cover is A B B C Given a set F of functional dependencies it may be that an entire functional dependency in the set is extraneous in the sense that dropping it does not change the closure of F. We can show that a canonical cover Fc of F contains no such extraneous functional dependency. Suppose that to the contrary there were such an extraneous functional dependency in Fc. The right-side attributes of the dependency would then be extraneous which is not possible by the definition of canonical covers. A canonical cover might not be unique. For instance consider the set of functional dependencies F A BC B AC and C AB . If we apply the extraneity test to A BC we find that both B and C are extraneous under F. However it is incorrect to delete both The algorithm for finding the canonical cover picks one of the two and deletes it. Then 1. If C is deleted we get the set F A B B AC and C AB . Now B is not extraneous in the righthand side of A B under F . Continuing the algorithm we find A and B are extraneous in the right-hand side of C AB leading to two canonical covers Fc A B B C and C A and Fc a B B AC and C B . Silberschatz-Korth-Sudarshan