tailieunhanh - INTRODUCTION TO COMPUTER SCIENCE - PART 3

THE RELATIONAL DATA MODEL Giả sử chúng ta có hai cặp của những người yêu: Tieán và Cuùc, Vieät và khác có thể yêu một ai đó khác không phải trong bộ. Chúng ta nói rằng tình yêu quan hệ nhị phân trên MS bộ và FS có hai tuples: (Tieán, Cuùc) và (Vieät, Lan). Các bộ dữ liệu khác, nói (Khoa, Hueä) hoặc (Hương Lan), không phải trong tình yêu. Bây giờ chúng ta có thể xác định mối quan hệ nhị phân chính thức. Trước tiên, hãy A và B là hai bộ. các sản phẩm hoặc sản phẩm Cartesian. | INTRODUCTION TO COMPUTER SCIENCE HANDOUT 3. THE RELATIONAL DATA MODEL K5 K6 Computer Science Department Văn Lang University Second semester -- Feb 2002 Instructor Trăn Đức Quang Major themes 1. Binary Relations 2. Relations 3. Relational Algebra Reading Sections and . BINARY RELATIONS Consider two sets of students MS Tiến Hung Khoa Viet and FS Lan Cuc Huệ . Suppose that we have two pairs of lovers Tiến and Cuc Viet and Lan. Others may love someone else not in the sets. We say that the binary relation love on the sets MS and FS has two tuples Tiến Cuc and Viet Lan . The other tuples say Khoa Hue or Hung Lan are not in love. We can now define binary relations formally. First let A and B be two sets. The product or Cartesian product of A and B denoted A X B is defined as the set of pairs in which the first component is chosen from A and the second component is chosen from B. That is A X B a b a e A and b e B A binary relation R on A and B is a subset of the product A X B. In the previous example we have love Tiến Cuc Viet Lan and may write in a predicate form love Tiến Cuc true love Viet Lan true love Hung Hue false 18 INTRODUCTION TO COMPUTER SCIENCE HANDOUT 3. THE RELATIONAL DATA MODEL The last must be false since it is not in the relation. We can use an infix notation for binary relations so that a binary relation like can be written between the componets of pairs in the relation. For example we may write 1 2 instead of 1 2 e or 1 2 true . Some special properties Binary relations may have some useful properties transitivity reflexivity symmetry and antisymmetry. Reflexivity A relation R on a set A is called reflexive if a a e R for every element a e A. Symmetry A relation R on a set A is called symmetric if b a e R whenever a b e R for a b e A. Antisymmetry A relation R on a set A such that a b e R and b a e R only if a b for a b e A is called antisymmetric. Transitivity A relation R on a set A is called transitive if whenever a b e R and b c e

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã 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.