Attributes define the properties of a data object of entity. For example if student is an entity, his ID, name, address, date of birth, class are its attributes.
Simple attributes are attributes that are drawn from the atomic value domains, which cannot be divided further.
Simple Attribute | Composite Attribute |
---|---|
The attribute which cannot further split into its components is a simple attribute. | The file system provides the details of data representation and storage of data. |
Example: The marks of a student, the age of an employee etc. | Example: Name of the student can split into first, middle and last name. |
Single valued attributes are those attributes which can take only one value for a given entity from an entity set. Single-value attributes contain single value. For example − age, gender etc.,.
Multi valued attributes are those attributes which can take more than one value for a given entity from an entity set. Multi-value attributes may contain more than one values. For example, a person know more than one Languages, hobbies etc.
Single-Valued Attribute | Multi-Valued Attribute |
---|---|
The attribute which has a single value for each entity instance is known as single-valued attribute. There is no alternative of this value. | The attribute which takes up more than one value for each entity instance is known as multi valued attribute. |
Example: The RollNo, DOB, Gender of a student will always be a single value. | Example: A person know more than one Languages, and there hobbies |
Derived attributes are those attributes which can be derived from other attribute(s).
Derived attributes are the attributes that do not exist in the physical database, but their values are derived from other attributes present in the database. For example, age of the student should not be saved directly in the database, instead it can be derived from Date of Birth.
Stored Attribute | Derived Attributes |
---|---|
An attribute which cannot derive from other attributes and it is mandatory to be stored in the database. | An attribute which is determine the value from other attributes is a derived attribute and it is not mandatory to be stored in the database. |
Example: The value which is fixed like Date of Birth. | Example: Age of student can be derived from DOB. |
Key attributes are those attributes which can identify an entity uniquely in an entity set.
Key is an attribute or collection of attributes that uniquely identifies an entity among entity set. For example, the roll_number of a student makes him/her identifiable among students.