Bags versus sets; are they needed?
From: Peter Koch Larsen <pkl_at_mailme.dk>
Date: 2 Apr 2002 03:35:31 -0800
Message-ID: <61c84197.0204020335.5aa9c00f_at_posting.google.com>
Hi all
Date: 2 Apr 2002 03:35:31 -0800
Message-ID: <61c84197.0204020335.5aa9c00f_at_posting.google.com>
Hi all
It is a wellknown fact that SQL returns duplicate values unless you use the SELECT DISTINCT option. What is almost as wellknown (i hope!) is that relational theory is based on sets. I believe that the original motivation for returning bags ("sets" with duplicate values retained) was one of performance: to eliminate the extra step, that would be required if duplicates were to be removed. My question is simple: Do you personally have code, where the retaining of duplicate tuples is essential/convenient/whatever? If so - could you provide me with an insight in to what problem is solved.
Kind regards
Peter Koch Larsen
Received on Tue Apr 02 2002 - 13:35:31 CEST