Wednesday, December 30, 2009

Entity, attribute, attribute value, relationship instance, composite attribute, multivalued attribute, derived attribute, complex attribute,.......

Entity: An entity is a thing in the real world. It may be an object with a physical existence or an object with a conceptual existence. For example, a man, a building, a company, a school etc.

Attribute: Attribute is a property of an object or an entity. For example, a car has a color, a brand name, a model number, an owner’s name, type etc.

Attribute value: Attribute value is the real data of a particular entity for each of its attributes. In other word, associated with each real world entities are certain attributes that describe that entity; value of these attributes for any entity is called attribute value. For example, attribute value of first_name of attribute of student_name can be Gyanendra.

Relationship instance: Each relationship instance ri in R is an association of entities, where the association includes exactly one entity from each participating entity type. Each such relationship instance ri represent the fact that the entities participating in ri are related in some way in the corresponding miniworld situation. For example, in relationship type WORKS_FOR associates one EMPLOYEE and DEPARTMENT, which associates each employee with the department for which the employee works. Each relationship instance in the relationship set WORKS_FOR associates one EMPLOYEE and one DEPARTMENT.

Composite attribute: Composite attribute is an attribute that can be divided into smaller subparts, which represent more basic attributes with dependent meanings, is called a composite attribute. For example, the Address attribute consists of several domains such as house number, street number, city, country, etc.

Multivalued attribute: A multi-valued attribute can have more than one value at one time. For example, address of a person is a multi-valued attribute since a person can have more than one address such as Present and Permanent address. Upper and lower bounds may be placed on the number of values in a multi-valued attribute. For example, a bank may limit the number of addresses recorded for a single customer to two.

Derived attribute: If an attribute’s value can be determined from the values of other attributes, then the attribute is derivable, and is said to be a derived attribute. Example: consider attributes for an employee: birth date, current age; here, age is derivable by subtracting the birth date from the current date.

Complex attribute: Composite and multivalued attribute can be nested arbitrarily. Arbitrary nesting can be represented by grouping components of a composite attribute between parenthesis and separating the components with commas and by displaying multivalued attributes between braces. Such attributes are called composite attributes. For example, if a person has more than one address and each residence has multiple phones and address_phone attribute can be specifies as:
{AddressPhone( (Phone{AreaCode,PhoneNumber)},Address(StreetAddress(Number, Street, ApartmentNumber), City, State, Zip) ) }

Key attribute: Each real world entity is unique in itself. There are certain attributes whose value is different for all similar type of entities. Those attributes are called key attributes. These attributes are used to specify uniqueness constraint in relation. For example, a house has a registration number. This is a key of all entity of house.

Value set (domain): There is a range of values from which a particular attribute can take value for a attribute of a real world entity. For example, salary attribute of an employee must have value, let, from $2000 to $12000, and then all integers in range $2000 to $12000 are domain of attribute salary.

3 comments:

Anonymous said...

Very informative blog post, gave me much needed help in understanding the basic features within DBMS. Thank you

이재혁 said...

It was a great help for me to study chatper 7 of DBMS, i was confused about the concept of those basic meanings and also i found onw typo error here at last paragraph "which a particular attriute can take"

GP Joshi said...

Hi 이재혁,
Thank you for your comment. I have corrected the typo.
감사합니다.