Overview
The origin of relational database originates from the concept of set in mathematics. Therefore, between the collection and the collection, the operation between the mathematical sets is also inherited. For relational databases, relationships are often used in relational databases that are not directly related to two datasets. For example, the foreign key. But two data rallies have indirect relationships, such as two games, where there is an indirect relationship between the players ' collections.
Types of data set operations
In T-SQL, relational operations can actually be divided into four categories, first of all by looking at the table we use to illustrate:
The example tables here are recorded for two different meetings, MEETING1 and Meeting2 respectively, as follows:
The specifics of a relational operation can be grouped into the following four categories:
1.a∩b is both in a and B in the desired dataset
In the example table, the actual example is a collection of participants who participate in the first meeting and the second meeting, as shown in the following figure:
2.a∪b, where the data is either in DataSet A or in DataSet B
In the example table, the actual example is a collection of people attending the first meeting, or participating in the second meeting, as shown below:
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/database/SQLServer/