0% found this document useful (0 votes)
35 views17 pages

Lecture 03

Uploaded by

liu001shin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views17 pages

Lecture 03

Uploaded by

liu001shin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 17

Database Design – Lecture 3

Conceptual Database Design


Lecture Objectives
 Conceptual Database Design

2
Conceptual Database Design
 Create the conceptual model
 A model which is the result of conceptual
design
 Model will show the following:
 Entity – something about which someone
wants to store data; typically a person, a
place, a thing, a concept, or an event
 Attribute – a characteristic of an entity. It
has a name and a data type

3
Conceptual Database Design
 Model will show the following:
 Relationship – an associate between
entities. Has multiplicity (1:1, 1:M, M:N)

4
Discovering Entities
 Generally, nouns translate into entities
 Verbs translate into relationships among
entities
 Relationships are bi-directional

Plan Client

5
Discovering Attributes
 Will be discovered when identifying
entities
 They will describe an entity

Client
Plan

Name
Title
Address
Description
Phone

6
Identifying Primary Keys
 If an existing attribute seems like a
good candidate for the Primary Key, use
it; otherwise create a new attribute
 PK is an attribute (or a combination of
attributes) that will uniquely identify any
given entity
Plan Client
PK PlanID PK ClientNum

Title Name
Description Address
Phone

7
Discovering Relationships
 Verbs translate into relationships among
entities
 Relationships are bi-directional
 Need to know the following:
 Optionality
 Cardinality
Plan Client

PK PlanID PK ClientNum

Title Name
Description Address
Phone
FK1 PlanID
8
The Entity Relationship Model
 Widely accepted and adapted graphical tool
for data modeling
 Introduced by Chen in 1976
 Graphical representation of entities and their
relationships in a database structure

9
The Entity Relationship Model

10
The Entity Relationship Model

11
In Summary
 Steps to create a conceptual model
 Identify entities and attributes
 Identify primary keys
 Identify relationships between entities
taking into consideration the business rules

12
Discovering Business Rules
 Constrain some part of the business
 For example:
 An employee can only choose one benefit
plan
 An employee may or may not have
dependents
 An employee may opt out of a benefit

13
Discovering Business Rules
 Sources of Business Rules:
 Company managers
 Policy makers
 Department managers
 Written documentation
 Procedures

 Standards

 Operations manuals

 Direct interviews with end users

14
Create an ERD for the following:
 A department employs many employees, but
each employee is employed by one
department.
 A division operates many departments, but
each department is operated by one division.
 An employee may be assigned to many
projects, and a project may have many
employees assigned to it.

15
Create an ERD for the following:
 Identify the entities, attributes and primary keys
 Draw the ERD showing relationships

A Librarian wishes to make inquiries about


borrowing activity within a library. The librarian
can inquire about specific books borrowed by a
customer using either their account or name. An
inquiry can also be made by book category (such
as fantasy, children’s, reference, etc) or an inquiry
can be made that will look at the titles of a specific
book.

16
Discovering Business Rules
 Identify the entities, attributes and primary keys
 Draw the ERD showing relationships

Multiple Real Estate Listing Service (MRELS) is a company that has


offices throughout Southern Ontario. These offices have a number
of Real Estate agents working for them. MRELS deals in both
residential and commercial real estate. Agents work with
customers to get a listing or to find a listing for a customer. A
listing will include the address and the type of property (residential
or commercial), square footage, annual taxes and closing date. If
it is a residential property, it will include number of bedrooms,
number of bathrooms, special features (central air, heated by gas
or oil, radiators or forced air, for instance). For a commercial
property, it will include number of offices as well as number of
docking bays (where trucks back up to be loaded/unloaded).

17

You might also like