1 / 9

8.2 n- ary Relations and their applications

8.2 n- ary Relations and their applications. Def– n- ary. Let A1, A2, …An be sets. An n- ary relation on these sets is a subset of A1xA2xA3… xAn . The sets A1, A2, …An are called domains of the relation and n its degree. Database.

chaz
Download Presentation

8.2 n- ary Relations and their applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 8.2 n-ary Relations and their applications

  2. Def– n-ary Let A1, A2, …An be sets. An n-ary relation on these sets is a subset of A1xA2xA3…xAn. The sets A1, A2, …An are called domains of the relation and n its degree

  3. Database Database: Consists of records, n-tuples, made up of fields. The fields are the entries of the n-tuple.

  4. Example

  5. Example Notice the repeats. Questions: Can we identify each table by major? __By name? __ ID#- primary key (a domain that determines the n tyuple) Major- not primary Favorite dessert- not primary Major and dessert could serve as a composite key (combination that determines the n-tuple)

  6. Projections P14 maps (a1,a2,a3,a4) to (a1,a4)

  7. Join Join operation: Jp combines two relations R1 and R2 into a new one by combining all m-tuples of R1 with all n-tuples of R2, where the last p components of R1 agree with the first p components of R2.

  8. Use the Join operator J2

  9. J2 result

More Related