tailieunhanh - Applied Mathematics for Database Professionals phần 4

Lặp đi lặp lại được thực hiện trên tất cả các yếu tố của các thiết lập mà từ đó các tham số định lượng được rút ra cho mỗi giá trị phần tử, lần xuất hiện của biến bên trong các vị được thay thế bởi giá trị đó. Bằng cách này, thay thế giải thích biểu thức định lượng có thể giúp đỡ khi bạn điều tra các giá trị chân lý của họ. | CHAPTER 5 TABLES AND DATABASE STATES 95 Definition 5-1 describes the concept of a table in a formal way. It uses the concept of a function over a given set see Definition 4-2 . Definition 5-1 Table If Tand H are sets then T is a table over H VteT t is a function over H . This definition is generic in the sense that no restrictions are imposed upon the elements of set H. However in practice we ll only be interested in those cases where H is a set of names representing attributes. Table T1 can be considered a parts table. It is a table over partno name instock price consisting of six tuples each representing information about a different part. It holds for each such part the part number its name how many items of the part are in stock and the price of the part. Here are a few more examples T2 X 2 Y 1 Y 8 X 0 Y 10 X 5 T3 partno 3 name hammer pno 4 pname nail T4 empno 105 ename Mrs. Sparks born 03-apr-1970 empno 202 ename Mr. Tedesco T2 is indeed a table. It holds three functions all of which share the domain X Y . It is a table over X Y . Note that the order of the pairs inside the functions doesn t matter. T3 is not a table. It is a set of functions however the domain of the first function is partno name which differs from the domain of the second function pno pname . Likewise T4 is also not a table. It is a set of functions however the domain of the first function is empno ename born which differs from the domain of the second function empno ename . An element of a table is a function and each such function is referred to specifically as a tuple. In Chapter 4 you were introduced to this term when we introduced the generalized product of a characterization see the section The Generalized Product of a Set Function . The generalized product of a characterization is in fact a table it holds functions all of which share the same domain. A table is a set and the elements of this set are tuples. By the definition of a set this implies that every tuple is unique within that