Upload
holly-case
View
29
Download
2
Tags:
Embed Size (px)
DESCRIPTION
Overview of Database Development. Data Modeling and Relational Database Design. Objectives. Describe the phases of the database development process Describe the phases of the application development process Explain conceptual data modeling and database design. Strategy and Analysis. - PowerPoint PPT Presentation
Citation preview
Overview of Database Development
Data Modeling and Relational Database Design
Objectives
Describe the phases of the database development process
Describe the phases of the application development process
Explain conceptual data modeling and database design
SYSTEM DEVELOPMENT LIFE CYCLE
StrategyandAnalysis
Design
BuildandDocument
Transition
Production
Database Development Process
Function Modeling
Application Design
Application Build
ER model,entity definition
Business Requirements
ConceptualData Modeling
Database Design
Database Build
Table, index,view
Function hierarchy, function definition
Module (screen, report, menu, program design)
ApplicationDatabase
Information Process
Cross-checking
Cross-checking
Operational System
Database Development ProcessBusiness Information Requirements
Operational Database
Conceptual Data Modeling
Logical Database Design
Physical Database Build
Business view
Systems view
TerminologyLOGICALCONCEPTUAL
DESIGN
ENTITY
RELATIONSHIP
ATTRIBUTE
TABLE
FOREIGN KEY
COLUMN
(Business view) (Systems view)
ANALYSIS
UNIQUE IDENTIFIER
PRIMARY KEY
UNIQUE KEY
Information Models
Organize thought processes
Accurately model business data
Communicate with stakeholders
Analyze the scope
Provide sound basis for system design
Goals of Conceptual Data Modeling
Robust syntax
User communication
Ease of development
Definition of scope
Integration of multiple applications
Modeling Basic Entities and Attributes
Overview
Why conceptual modeling?
Introduction of the Key role players:EntitiesAttributesRelationships
Why Create a Conceptual Model?
It describes exactly the information needs of the business
It facilitates discussion
It helps to prevent mistakes, misunderstanding
It forms important “ideal system” documentation
It forms a sound basis for physical database design
It is a very good practice with many practitioners
Conceptual Model Between Dream and Reality...
Entity Relationship Modeling
• Models business,not implementation
• Is a well-established technique
• Has a robust syntax
• Results in easy-to-read diagrams…
...although they maylook rather complex at first sight
SUP PLIE R# SUPPL IER COD Eo EMAIL* APPROV ED* RE FERENC E
OTHER ORGAN IZATION
ORGAN IZ ATIONo E MAIL* N AMEo POS T A L CODEo REGI ONo STR E ETo TOWNo TELEP HONE NUMBERo CONTACT NAM Eo CON T ACT E XT E NSION
MEMBERSHIP T YPE# C OD E* DESCR IPTION* DISCOUN T PE R CE N T AGEo STA N DAR D F E E
MEMBERSHIP P E RIOD# ST A R T DATEo ACTU AL FEE PA ID
MEMBERS HIP# NUMBERo TERM INATION R EASONo TERMI NATION DAT E
EMPLOYEE* POSITION* LAST NAMEo FIRST NAMEo OTHER I NI T IALSo E M A IL
BOOK I N G* BOO K DA T Eo EXPIRE DA TEo NOT IF Y D ATEo RESERVE DATEo STA F F REMARK S
RENTAL ITEM# LINE NO* RENTAL PERIOD* PRICE PAIDo RETURN D ATEo STAF F REMARKS
RENT AL* RE N T AL DATEo ST A F F REMARKSo COMP LETED
COPY* ACQUIR E DATE* PURCHAS E CO S T* SHELF CO DEo CO ND ITIO No C USTO M ER REMARKS...
REVIEW# SEQ U ENC E* ARTI CLE* HO To AUTHO Ro URL
PUBLICATION# REFERENCE* T ITLEo VOLUMEo I SSUEo PUBLISH DATE
CUS TOMERo EMAIL* DE S IG NATION* FIRST N A ME* LAS T NA M Eo OTHER INI T IALS* STRE ET* TO W N* POSTAL CODE* REGIONo HO ME PHO N Eo WORK EX T ENSIONo WOR K PHONEo PHOT OGRAPHo STAF F REMAR KS
CATALOG# REFERENCEo CATALOG DATEo DESCRIPTION
MOVIE* CATEGORYo AGE RATING* DURA TION* MONO CHROMEo AUDIOo PREVIEW
GAME* CATEGORY* MEDIUMo MINI MUM MEM OR Y
TITLE# PR O DU CT CODE* TITLEo DESCRIPTION
PRICE L EV E L# CODE* DESCRIPTION
PRICE HISTORY# EFFECTIVE DATE* PRIC E* DEFA ULT DAY S* OVERD UE RATE
for
us ed f or
of
re newed for
of
the ty p e of
held b y
the hold er of
hel d by
the h ol d er of
av ailablefrom
thedistribut o r for
requestedagain st the
requestorof
authorized by
respon s i b l efor
the rese rvation f o r
reserved on
for
on
cance l le d by
the canc e ll o r of
appro ve d by
responsi ble for
of
reviewed in
at
applie d to
the rent al for
fulfilled as
par t of
compo se d of
for
r e n ted on
approv e d b y
respo n si blefor
par t o f
parent org a ni za tion of
acqui re d from
the source of
of
available as
for
d ef ined by
m a na ged b y
the m anager of
in
the sour c e o f
in
the so u rce of
Goals of Entity Relationship Modeling
Capture all required information
Information appears only once
Model no information that is derivable from other information already modeled
Information is in a predictable, logical place
CONCEPTUAL DATA MODELS
Model of systemin client’s mind
Entity model ofclient’s model
Table modelof entity model
Tables on disk
Server
Database Types
HierarchicalRelational
Network
ER Model
ENTITY RELATIONSHIP MODEL
EMPLOYEE#* number* nameo job title
DEPARTMENT#* number* nameo location
assigned toassigned to
composed ofcomposed of
Create an entity relationship diagram from business specifications or narratives
Scenario– “. . . Assign one or more employees to a department . . .”– “. . . Some departments do not yet have assigned employees .
. .”
Entity
An Entity is:“Something” of significance to the business about which data must be known.A name for the things that you can list.Usually a noun.
Examples: objects, events
Entities have instances.
Identify and Model Entities
Identify a nounIs it significant?Is there information about it that the business needs to keep?Is it a group or an instance?
Name the entity
Write a description of it
Identify a few attributes
Draw a soft box for it
Entity Instances
EMPLOYEE DEPARTMENT
Personnel Finance Sales
Head office
Identifying a Unique Instance
EMPLOYEE
badge numbernamedate of birthsalary
Entities and Instances
PERSON
PRODUCT
PRODUCT TYPE
EMPLOYMENT CONTRACT
JOB
SKILL LEVEL
TICKET RESERVATION
PURCHASE
ELECTION
PRINTER PREFERENCE
DOCUMENT VERSION
Mahatma Gandhi
2.5 x 3.5 mm copper nail
Nail
My previous contract
Violinist
Fluent
Tonight: Hamlet in the Royal
The CD I bought yesterday
For parliament next fall
…
…
Entities and Sets
dish washer
JOB
waiter
cookwaitress
manager
financial controllerporter
piano player
• An entity represents a set of instances that are of interest to a particular business.
Attribute
Also represents something of significance to the business
Is a single valued property detail of an entity
Is a specific piece of information that: DescribesQuantifiesQualifies Classifies Specifies
an entity.
Attribute Examples
Entity
EMPLOYEE
CAR
ORDER
JOB
TRANSACTION
EMPLOYMENT CONTRACT
Attribute
Family Name, Age, Shoe Size, City, Email, …
Model, Weight, Catalog Price, …
Order Date, Ship Date, …
Title, Description, ...
Amount, Transaction Date, …
Start Date, Salary, ...
Entity Representation in Diagram
Drawn as a “softbox”
Name singular
Name inside
Neither size, nor position has a special meaning
EMPLOYEE
TICKETRESERVATION
JOB ASSIGNMENT
JOB
ORDERE
LEC
TIO
N
During design, entities usually lead to tables.
Attributes in Diagrams
*o
EMPLOYEE* family Name address birth Dateo shoe Sizeo email
JOB titleo description
During design, attributes lead to columns.
*
Mandatory attribute, that is, known and available for every instance
Optional attribute, that is, unknown or unimportant to know for some instances
o
*
ENTITY RELATIONSHIP MODELING CONVENTIONS
EntitySoft boxSingular, unique nameUppercaseSynonym in parentheses
AttributeSingular nameLowercaseMandatory marked with “*”Optional marked with “o”
Unique Identifier (UID)Primary marked with “#”Secondary marked with “(#)”
EMPLOYEE#* number* nameo job title
DEPARTMENT#* number* nameo location
assigned to
composed of