Page 247 - DCAP405_SOFTWARE_ENGINEERING
P. 247
Software Engineering
Notes
Figure 14.4 The parts of a Relationship in an Entity-Relationship Diagram
Self Assessment
Fill in the blanks:
8. Most data-modeling methods provide some way to ……………………….. display the
entities and relationships.
9. Create a logical design of the database that can be translated into a ……………………..
schema.
14.3 Attribute
An attribute is a characteristic property of an entity. Each entity of the system under consideration
has a number of different attributes highlighting different aspect of the entity. Thus, Name,
Address, Date of birth, Date of opening account etc.; and Name, Address, Employee number,
Date of joining etc.; are a few attributes of the Account holder and Branch manager entities
respectively. Similarly, Account number, Branch code, etc., are a few attributes of the cheque
book entity.
An entity is represented by the set of attributes it has. Every entity is described by a set of
(attribute, data value) pair. Thus, the Account holder and Branch manager entities can be
represented as follows:
AccountHolder(Name=”Eknath”, Address=”A-45, Tagore Garden”, DateOfBirth=”13/11/1966",
DateOfOpeningAccount= ”12/10/2005")
BranchManager(Name=”Vibhor Kasliwal”,Address=”B-46,Naraina”,Employee Number=
”BM008", DateOfJoining=”01/07/2006")
An attribute may be restricted to take values from a set of values called domain of the attribute.
Attributes can be classified in a number of different ways. According to atomicity an attribute
can be Simple or Composite. A simple attribute is atomic and cannot be broken further down
into simpler components where as a composite attribute is composed of simpler values. For
instance, while age is a simple attribute of a student entity, date of birth is a composite attribute
because it can be still broken into three simpler values – day, month and year.
On the basis of whether an attribute must take a value for an instance of a given entity or not,
attributes can be either Null-valued or Non-Null-valued. A null attribute may not take a value
in which case it is said to have missing value. A non-null attribute must not have missing value.
Note that missing value is not same as zero. Thus, the PhoneNumber attribute is a null-valued
because an entity may or may not have a phone number. Attributes which are not null type must
not accept a missing value.
On the basis of the multiplicity of values taken attributes can be classified either as Single-
valued or Multi-valued. A single-valued attribute takes only one value for a given entity while
a multi-valued attribute can take more than one value for a given entity. For instance, for the
ongoing banking system, the attribute BranchManagerId is a single-valued while PhoneNumber
240 LOVELY PROFESSIONAL UNIVERSITY