官术网_书友最值得收藏!

  • Learning PostgreSQL 11
  • Salahaldin Juba Andrey Volkov
  • 91字
  • 2021-07-02 13:11:39

The set theory operations

The set theory operations are UNION, intersection, and minus (difference). Intersection is not a primitive relational algebra operator, because it can be written using the UNION and difference operators:

A∩B = ((A∪B)-(A-B))-(B-A)

The intersection and union are commutative:

A∩B=B∩A

A∪B=B∪A

For example, the query give me all the customer IDs where the customer does not have a service assigned to him could be written as follows:

πcustomer_id customer-πcustomer_id customer_service

主站蜘蛛池模板: 宣威市| 姚安县| 淮滨县| 项城市| 淮北市| 宜兰市| 青川县| 额敏县| 夏邑县| 临夏县| 云霄县| 伊宁县| 建湖县| 永胜县| 固安县| 临沭县| 孟津县| 五华县| 韶关市| 琼海市| 阿克苏市| 东乌珠穆沁旗| 宽城| 湖口县| 霸州市| 新竹县| 柳州市| 姜堰市| 宁明县| 仙居县| 屯门区| 阳西县| 泰顺县| 潞西市| 清丰县| 当涂县| 金川县| 定边县| 镇平县| 子洲县| 松原市|