Cartesian Product

Cartesian Product


Relational algebra

  • Relational algebra is a special form of algebra that describes the data stored in relational databases and the query languages used to access that data. It was first developed by E. F. Codd at IBM and was formally introduced in 1970. Codd's work became the basis for database query languages, such as SQL and MySQL.

    The five primitive operators

  • Set union (∪) - Given multiple sets of data, for instance two sets B and C, the union of the sets B ∪ C is the data that appears in any or in all the sets.

  • Set difference (∖) - Given two sets of data B and C, the difference of the sets B ∖ C is the data that appears in C but does not appear in B.

  • Cartesian product (×) - Given two sets of data B and C, the Cartesian product B × C is the set of all ordered pairs (b, c) where b is a member of B, and c is a member of C.

  • Selection (σ) - Consider a set of data B, and a formula φ that uses the logical operators and (∧) or (∨) and not (¬). The selection σφ(B) results in all members of B for which the formula φ is true. For instance, suppose that φ is the propositional formula gender=female ∨ (eyeColor=Blue ∧ eyeColor=Hazel). The selection σφ(Friends) would result in a set that contains all members of Friends who are female and have either blue or hazel eyes.

  • Projection (π) - Given a set of data B and a set of attributes a1, a2…, the projection πa1, a2…(R) is the set of all members of B restricted by the a1, a2… attributes. For instance, the projection πfullName, phoneNumber(addressBook) results in a set that contains only the members of addressBook that have the
    attributes fullName and phoneNumber.


    What is an Operating System? » Computer Shortcut Keys and their Functions » Keyboard Function Keys » Computer Basics - Hardware - Software - Parts

    Short Stories for Kids - Moral Stories – English Short Stories for Children - Moral Stories for Kids - Stories for Kids - Funny Story for Kids - Scary Stories for Kids - Really Funny Short Stories - Bedtime Stories
    Proverb Stories
    Powerful Motivational Quotes for Students » Success Quotes » English Short Stories for Kids

    Cabin Crew Jobs & Career Advice » Secretary Job Description » Receptionist Job Description » Top 100 Interview Questions and Answers » How to Prepare for an Interview » How to Write a CV » How to Choose a Career » Computer Shortcut Keys and their Functions

    Scholarships in Australia » Scholarships in Austria » Scholarships in Belgium » Scholarships in Canada » Scholarships in Germany » Scholarships in Ireland » Scholarships in Italy » Scholarships in Japan » Scholarships in Korea » Scholarships in Netherlands » Scholarships in Switzerland » Scholarships in UK » Scholarships in USA

    Scholarships for Study in Africa » Scholarships for African Students » Undergraduate Scholarships » African Women Scholarships & Grants Scholarships for Study in Africa » Scholarships for African Students » Undergraduate Scholarships » African Women Scholarships & Grants Scholarships for Study in Africa » Scholarships for African Students » Undergraduate Scholarships » African Women Scholarships & Grants Short Stories for Kids - Moral Stories – English Short Stories for Children - Moral Stories for Kids - Stories for Kids - Funny Story for Kids - Scary Stories for Kids - Really Funny Short Stories - Bedtime Stories
    Proverb Stories
    Powerful Motivational Quotes for Students » Success Quotes »Scholarships in UK » Scholarships in USA Scholarships in UK » Scholarships in USA Scholarships in UK »

  • Click here to post comments

    Join in and write your own page! It's easy to do. How? Simply click here to return to Computer Basics FAQ.