Synonyms
Definition
Given two relation instances R 1, over set of attributes U 1, and R 2, over set of attributes U 2 – with U 1 and U 2 disjoint – the cartesian product R 1 × R 2 returns a new relation, over set of attributes U 1 ∪ U 2, consisting of tuples {t|t(U 1) ∈ R 1 and t(U 2) ∈ R 2}. Here t(U) denotes the restriction of the tuple t to attributes in the set U.
Key Points
The cartesian product is an operator of the relational algebra which extends to relations the usual notion of cartesian product of sets.
Since the sets of attributes of the input relations are disjoint, in R 1 × R 2 each tuple of R 1 is combined with each tuple of R 2; moreover the arity of the output relation is the sum of the arities of R 1 and R 2.
As an example, consider a relation Students over attributes (student-number, student-name), containing tuples {(1001, Black), (1002, White)}, and a relation Courses over attributes (course-number, course-name), containing tuples {(EH1, Databases), (GH...
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer Science+Business Media, LLC
About this entry
Cite this entry
Sirangelo, C. (2009). Cartesian Product. In: LIU, L., ÖZSU, M.T. (eds) Encyclopedia of Database Systems. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-39940-9_1259
Download citation
DOI: https://doi.org/10.1007/978-0-387-39940-9_1259
Publisher Name: Springer, Boston, MA
Print ISBN: 978-0-387-35544-3
Online ISBN: 978-0-387-39940-9
eBook Packages: Computer ScienceReference Module Computer Science and Engineering