1. A computer implemented method for determining the connectivity components defined by a set of relations over a set of data elements, wherein the relations and the data elements are stored in a database, the method comprising: selecting, for each first data element in the set of data elements, a respective second representative data element from among a group of data elements that includes the first data element and those data elements linked to the first data element by a path of relations, including: assigning, to each of the data elements in the set of data elements, a random value within a predetermined range using a randomization process, and wherein randomization process is biased to reduce a total number of distinct representatives; and the selecting is based on the respective random values assigned to the data elements in the group; and creating a new set of relations by replacing each first data element of the set of data elements by its representative in the set of relations; wherein the selecting and creating are performed within the database.