Emtity Attributes
Emtity Attributes
Entities
An entity is a person, a place, an object, an event, or a
concept in the user environment about which the
organization wishes to maintain data.
• The entity name should be descriptive and distinct from all other
entity type names within that organization.
– For example, a PURCHASE ORDER for orders placed with
suppliers is distinct from a CUSTOMER ORDER for orders placed
with a company by its customers.
– Both of these entity types cannot be named ORDER.
Naming and Defining entity
• Event entity should be named for the result of the event, not
the activity or process of the event.
– For example, the event of a project manager assigning an
employee to work on a project results in an ASSIGNMENT
.
What Should an Entity Be?
SHOULD BE:
An object that will have many instances in the
database
An object that will be composed of multiple
attributes
An object that we are trying to model
SHOULD NOT BE:
A user of the database system
An output of the database system (e.g., a
report)
7
entity versus system input, output or user
24
SINGLE VALUED ATTRIBUTE VS
MULTIVALUED ATTRIBUTE
EXAMPLE OF MULTIVALUED ATTRIBUTE
Multivalued
an employee can have
more than one skill e.g
php programmer, c++
programmer
26
DERIVED ATTRIBUTE VS STORED ATTRIBUTE
Derived attribute EXAMPLE
If users need to know how many years a person has been employed, that value can be
calculated using Date Employed and today’s date.
derived attribute (Years_Employed)
Derived
from date
employed and current
date
30
IDENTIFIER ATTRIBUTE
An identifier is an attribute (or combination of attributes) whose
value distinguishes individual instances of an entity type.
No two instances of the entity type may have the same value for
the identifier attribute.
However, two (or more) attributes used in combination i.e. a composite attribute may
serve as the identifier.