Ashish
Ashish

Reputation: 388

Why Projection Operator in relational algebra eliminates duplicates?

What are the consequences of eliminating duplicates in Projection Operator?And yes, why there is no duplicate elimination in real systems, unless specified?

Upvotes: 13

Views: 16294

Answers (2)

liju
liju

Reputation: 31

As Martin suggested, Relational Algebra deals with sets, projection, selection, union, intersection are all SET operations. And sets don't have duplicates. However real world systems take into considerations tuples or multisets, which can have duplicates.

Upvotes: 3

Erwin Smout
Erwin Smout

Reputation: 18408

If something is true, then saying it twice won't make it any truer.

The required duplicate elimination was left out of the early implementations of "relational" systems because the engineers were afraid of the performance implications. And even when keywords like DISTINCT were newly introduced / newly supported in an existing system, the algorithms used for it were typically so naive that "performance implications" appeared to be very real and/or inevitable. Things have remained like that ever since.

Upvotes: 8

Related Questions