119 1NF
The type system distinguishes between entity types and value types. That distinction is discussed in 9 Types, but normalisation uses a more general point: both kinds of type define domains with attributes, and both kinds can participate in dependencies between attributes. Recursive decomposition lets a model replace misplaced dependencies with smaller, more explicit domains. In a decomposed model, each type can remain simpler rather than accumulating facts that belong to another domain.
Attributes of an entity are unary predicates over its domain; attributes of a value type are unary predicates over the value itself. Types may also have mathematically derived attributes, but normalisation is concerned with a broader notion of dependency: constraints on which database states are possible. For example, if a manufacturer is assumed to exist in exactly one country, then manufacturer determines country even when country is not computed from the manufacturer name. Recursive decomposition of both entity and value types yields a hierarchy of domains in which facts are attached to the domains they describe, usually producing simpler types.
This perspective clarifies the intent behind Codd's First Normal Form, or 1NF. Rather than treating "atomic" as a vague prohibition on internal structure, it is better to separate Codd's original formulation from the Predica version. Codd required types to be simple and have no internal structure. Predica does not make that requirement. Codd's notion of atomicity depends on an informal judgement about whether a type is simple. Predica replaces that judgement with a syntactic and semantic distinction: structure is allowed inside a type, but multiplicity belongs to the extension of an attribute, not to the attribute's declared type. Predica therefore preserves the part of 1NF concerned with avoiding nested tuple values, relation values, repeating groups, and collections stored as single attribute values. A declared type may itself have structure, but each reached attribute value is still one value of that type. What violates Predica's version of 1NF is treating a repeating group or collection as one attribute value instead of using an attribute extension with the appropriate cardinality.
In this way, recursive decomposition using both entity and value types gives a Predica interpretation of Codd's concern for atomicity: normalisation is not merely an external process applied to tables, but a natural consequence of expressing the world as a network of well-defined domains, each with its own type, definition, and attributes.
Example which violates 1NF
The following example violates Predica's version of 1NF:
entity Person
{
String name;
Set<String> emails;
key {name};
}
The attribute emails has a collection type, so the collection of email addresses is being stored as
one attribute value.
Fixing the violation
The violation is apparent in both the plural attribute name emails and its collection type
Set<String>. The fix is to make both the attribute and its type singular, and to relax the
cardinality constraint on the attribute's extension:
entity Person
{
String name;
String email*;
key {name};
}
Here email has the singular type String. The * cardinality says that the predicate may hold for
zero or more email values, so multiplicity is represented by the extension of the attribute rather than
by a set-valued attribute value.