FOR FREE MATERIALS

Various types of Attributes

 

# Composite vs. Simple attributes

# Single valued vs. Multi-valued attributes

# Stored vs. Derived attributes

# Complex Attributes

 

Composite vs. Simple attributes

Single attributes are those which are not decomposed further in other subparts (attributes), whereas, Composite attributes can be further decomposed into other attributes.

 

Example:

Simple attribute: Designation (it is not decomposed further)

Composite attributeAddress: it can be decomposed into StateCityStreetLane, and Pin Code

 

Single valued vs. Multi-valued attributes

Single-valued attributes do not possess more than one value at an instance in time. 

 

For example, attribute Student-id will refer to the particular student. 

 

Multi-valued attributes: There may be instances where an attribute possesses more than one value for a specific entity. 

 

For example, Phone Number attribute of an Employee Entity set may comprise zero, one, or more phone numbers. In fact, each employee will have different numbers of phone numbers.

 

Stored vs. Derived attributes

It is observed that some attributes of an entity set are related to each other. 

 

For example, the Employee entity may have the attribute Date of Birth, from which we can derive Age of that Employee. Hence, Age is a derived attributeand Date of Birth is Stored or base Attribute

 

Age is computed, i.e., derived but not stored.

 

 

Complex attributes:  If one attribute is of two types composite and multi-valued.

 

Example: Ph (STD, Code, Number) – Complex attribute.

Phone number is multi-valued and as well as composite attribute. 

 

Note: Another important point is that an attribute may contain Null valuesFor example, attribute Phone Number may contain NULL value if a particular person does not have Phone number. Using Null values is appropriate if the value is unknown or missing.