Traditional Culture Encyclopedia - Traditional festivals - Steps of relational operation
Steps of relational operation
1 and UNION have two relations, R and S, which have the same structure. The union of R and S is a set of tuples belonging to R or S, and the operator is ∨. Write t = r ∪ s.
2. The difference between R and S is a set of tuples belonging to R but not S, and the operator is-. Write it down as t = r-s.
3. Intersection The intersection of R and S is a set of tuples belonging to both R and S, and the operator is ∩. Write it as t = r ∩ s. R∩S=R-(R-S).
Second, select the operation
Finding tuples from relationships that meet given conditions is called selection. The condition is given by a logical expression, and a tuple with a true value will be selected. This operation extracts tuples from the horizontal direction. In FOXPRO, FOR and WHILE are equivalent to selection operations.
For example, list of publishing units =' Higher Education Press' and unit price.
Third, the projection operation
Selecting several attributes from the relational schema to form a new relationship is called projection. This is an operation from the perspective of columns, which is equivalent to the vertical decomposition of relations. In FOXPRO, the word FIELDS is equivalent to projection operation. Such as: list field unit, name
Fourth, the connection operation
The join operation is to select tuples whose attributes meet certain conditions from the Cartesian products of two relations.
Verb (abbreviation for verb) division operation
In relational algebra, division can be understood as the inverse of cartesian product.
Let the divided relation R be an m-ary relation and the divided relation S be an n-ary relation, then their quotient is an m-n-ary relation, which is denoted as r÷s. The principle of forming quotient is: divide the m-n columns in the divided relation R into several groups according to their values, and check whether the set of n-column values in each group contains the divided relation S, if so, take the values of the m-n columns as tuples of quotient, otherwise don't take them.
Six, external connection operation
- Previous article:Which company developed the erp system?
- Next article:How to face the public relations crisis
- Related articles
- Opera evening program
- Which is the best Chinese herbal medicine pulverizer
- What's the difference between Chinese style and new Chinese style? I'm confused about choosing a piece of furniture!
- How to effectively popularize Hanfu culture?
- What are the top ten brands of solid wood furniture in China?
- Planning and arrangement of national dance
- Five winter vacation compositions.
- Which poor village in Shaxian got rich by selling snacks?
- What's the name of the Red and White Western Orchestra?
- Renting a house often moves, how to build a storage box at low cost?