Previous Topic: User-Defined DomainsNext Topic: Multi-Valued Attributes


Composite Attributes

A composite attribute is one that is made up of other attributes.

Attributes of the sort so far covered in this chapter are sometimes named elementary attributes to distinguish them from composite attributes.

An example of a composite attribute is the attribute Phone Number of the entity type CUSTOMER, as shown in the following table.

Entity Type CUSTOMER

Composite Attribute Phone Number

Elementary Attribute Area Code Elementary Attribute Exchange Elementary Attribute Station

Decomposing Phone Number into its elements is unnecessary in most business situations. If, however, the business happens to be a telephone company, there would be a need for Phone Number to be a composite attribute. This allows Phone Number to be treated as a single attribute in some cases, while still making it possible to inspect and modify its elements individually whenever necessary.

CA Gen does support the concept of composite attributes. This is achieved indirectly. The composite attribute can easily be simulated by defining three attributes and using a derivation algorithm to assemble the complete Phone Number.