1. What are key sets and how do they relate to candidate keys in the relational model of data?
Key sets are a generalization of Codd's rule for entity integrity in the relational model of data. They were introduced by Thalheim as a way to study combinatorial problems associated with unary key sets. Key sets are distinguished from candidate keys, which are sets of attributes that uniquely identify tuples in a relation. While candidate keys are singleton key sets, key sets offer different alternatives of being complete and unique for different pairs of tuples in a relation. Key sets were not extensively studied in previous research, and the implication problem for key sets remains an open problem for future work. Key sets were also generalized by Levene/Loizou to Codd's rule for referential integrity. Additionally, the notions of possible and certain keys were proposed, which are defined for relations with null marker occurrences interpreted as 'no information'. Possible keys hold on some possible worlds of an incomplete relation, while certain keys hold on every possible world of an incomplete relation. The current paper investigates a computationally-friendly fragment of key sets, which subsumes the class of certain keys as the special case of unary key sets. Future work could explore combining key sets and contextual keys into a unifying notion.
read more
2. What is a relation schema?
A relation schema is a finite non-empty set of attributes, usually denoted by R. It represents the column names of database tables. Each tuple in the relation schema maps each attribute to its domain, which is the unique null marker. For example, in the relation schema Ward={room,name,address,injury,time}, each attribute comes with a domain, representing possible values for that attribute. The tuples in the relation schema form a database instance, where each tuple represents a row of the table. The tuples can be X-total if t(A) = for all A in X, indicating that there is no missing information for that tuple on the specified attributes.
read more
3. What is a key set in a relation schema?
A key set is a finite, non-empty collection X of subsets of a given relation schema R. It satisfies the key set X if for all distinct t, t r there is some X X such that t and t are X-total and t(X) = t (X). Each element of a key set is called a key. If all keys of a key set are singletons, it is called a unary key set. Key sets and attribute sets are denoted by X, Y, Z, etc. Singleton sets are denoted by A. The number of keys in a key set is denoted by |K|, and the total number of attribute occurrences in K is denoted by K. For example, in Example 1, the relation satisfies key sets X1, X2, and X. It also satisfies the unary key set {{room}, {time}}, but not the singleton key set {{room, time}}. The implication problem for key sets involves deciding whether an arbitrary relation schema R and an arbitrary set S of key sets over R imply a particular key set ph. A relation over R satisfies all key sets in S if and only if it satisfies the key set ph. Solutions to the implication problem of key sets can facilitate efficient query and update processing.
read more
4. How does the validation problem for key sets work?
The validation problem for key sets takes a key set and a given relation as input. It checks if the key set satisfies the relation and returns 'yes' if it does, and 'no' otherwise. This problem is fundamental for automating integrity control management, allowing computers to quickly determine if data is compliant with business rules. In the provided example, the relation is checked against a key set, and it is found that the relation satisfies the key set. This means that for every pair of different tuples, there is a key set that makes them complete and different, ensuring data integrity.
read more