1. A computer-implemented method comprising: receiving a request to compute identifiers for domain tuples of a relation for a first alternative subtype of an algebraic data type, wherein the first alternative subtype depends on a definition of a second alternative subtype of the algebraic data type; and until evaluating a definition of the first alternative subtype generates no new domain tuples, performing operations comprising: evaluating the definition of the first alternative subtype using tuples in a relation for the second alternative subtype to generate one or more new domain tuples for the first alternative subtype; computing, for each new domain tuple of the one or more new domain tuples generated for the first alternative subtype, a respective key using each element belonging to the new domain tuple; determining, for each key computed for each new domain tuple, whether the key for the new domain tuple has been previously generated; for each key that had been previously generated, obtaining an identifier previously generated for the key and adding a new identifier tuple to the relation for the first alternative subtype, the new identifier tuple comprising the identifier and each element belonging to the new domain tuple; and for each key that had not been previously generated, generating a new identifier for the key and adding a new identifier tuple to the relation for the first alternative subtype, the new identifier tuple comprising the new identifier and each element belonging to the new domain tuple.