Professional Documents
Culture Documents
Entity Name
Verb phrase
EntityName
List of Attributes
Acceptable
Basic Element of ERD
Chen Notation
Person, place, object, event or concept Association between the named property or
about which data is to be maintained instances of one or more characteristic of an
entity types
entity
Entity
Represents a set or collection of objects in the real world that share same
properties
Person, place, object event or concept about which data is to be
maintained.
Examples of entities:
Person : EMPLOYEE, STUDENT, PATIENT
Place : STORE, WAREHOUSE
Object : MACHINE, PRODUCT, CAR
Event : SALE, REGISTRATION, RENEWAL
Concept : ACCOUNT, COURSE
Entity
Guidelines for naming and defining entity types:
An entity type name is a singular noun
An entity type should be descriptive and specific
An entity name should be concise
Event entity types should be named for the result of the event, not the activity
or process of the event.
Entity
A person, place or thing about STUDENT
which the data is collected. Student_id
Name
In this case, it is the Year
Department
entity of “STUDENT” College
Entity
Composite Entity
Used to ‘bridge’ between M:N relationships.
Bridge entities composed of primary keys of each entity needing connection.
May also contain additional attributes that play no role in the connective
process.
Entity
Composite Entity
Entity
Composite Entity
Attributes
Attribute is named property or characteristic of an entity.
Each type of entity can always be described in terms of attributes, and these
attributes will apply to all occurrences of that given entity type.
Example of entity types and associated attributes:
Composite Attribute
An attribute that can be further subdivided to additional attributes
Example:
An address comprises of city, postcode and state
Attributes
Multivalue Attribute
An attribute that have more than one value
Example:
A staff may have 2 tel_no which are home tel_no and mobile tel_no
Derived Attribute
An attribute where the values can be calculated from related attribute.
Example:
Age can be known from Date_of_Birth
Relationships
Relationships is association between the instances of one or more entity types
that is of interest.
Entities in database model are related each other and this constitutes
relationships.
Verb usually used to described relationships. Examples: Students take Courses –
Students and Courses are entities, and take is the relationship.
Relationships are one-to-one, one-to-many, many-to-many.
Relationships
Associations between instances of one or more entity types that is of interest
Given a name that describes its function.
• relationship name is an active or a passive verb.
Author Book
Repeat process until designers and users agree E-R Diagram complete
Example
A company has several departments. Each department has a supervisor
and at least one employee. Employees must be assigned to at least one
department. Projects will be given to the employee and it will be done in
a group. At least one employee is assigned to one project or more. The
important data fields are the names of the departments, projects,
supervisors and employees, as well as the supervisor and employee
number, department code and a unique project number.
Solution
Exercise 1
Each of the Swinby Corporation’s divisions is composed of many
departments. Each of the departments has many employees assigned to
it, but each employee works for only one department. Each department
is managed by one managers, and each of these managers can manage
only one department at a time
Exercise 2
A Doctor can be scheduled for many appointments, but may not have any
scheduled at all. Each appointment is scheduled with exactly 1 doctor. A
patient can schedule 1 or more appointments. One appointment is scheduled
with exactly 1 patient. An appointment must generate exactly 1 bill, a bill is
generated by only 1 appointment. One payment is applied to exactly 1 bill,
and 1 bill can be paid off over time by several payments. A bill can be
outstanding, or having nothing yet to be paid at all. One patient can make
many payments, but a single payment made by only 1 patient.
Exercise 3
STUDENT (StudentNo, StudentName, CreditHour, Grade, TutorNo)
TUTOR (TutorNo, TutorName)
COURSE (CourseNo, CourseName, CreditHour)
GRADE (StudentNo, CourseNo, Grade)