Selecting DISTINCT rows in relational algebra

后端 未结 3 1508
旧时难觅i
旧时难觅i 2021-01-08 00:33

There is a DISTINCT operator in SQL. However, I have an assignment in which I need to get some distinct values from a table, and I can only use relational algebra. Is there

3条回答
  •  执念已碎
    2021-01-08 01:21

    The projection in relational algebra is equivalent to select distinct. In select statement of sql, duplicates are allowed as it is based on multiset theory but in projection of relational algebra, which is based on set theory, duplicates are not allowed.

    Hence, relational algebra equivalent of select distinct is projection.

提交回复
热议问题