SlideShare ist ein Scribd-Unternehmen logo
1 von 52
VIS201D Visio Database Digramming 1
An introduction to Visio database diagramming
for analysts and IT professionals
P.O. Box 6142
Laguna Niguel, CA 92607
949-489-1472
http://www.ocdatabases.com
Welcome to VIS201D – Visio
Database Diagramming
Bookstore2
VIS201D Visio Database Digramming 2
Visio Database Diagramming
• Introduction (s)
• Facilities
• Course Packet (contents may vary)
– Student questionnaire
– Collaterals (Maps, Catalogs, Etc.)
– PowerPoint handouts
– Evaluation form
– Training certificate
Bookstore2
Bookstore2 VIS201D Visio Database Digramming 3
VIS201D Contact Information
P.O. Box 6142
Laguna Niguel, CA 92607
949-489-1472
http://www.ocdatabases.com
slides.1@ocdatabases.com
Copyright 2017. All rights reserved.
VIS201D Resources
• Bookstore database scripts found on
box.net at
http://tinyurl.com/SQLScripts
• Slides can be viewed on SlideShare…
http://www.slideshare.net/OCDatabases
• Follow up questions?
support@ocdatabases.com
Bookstore2 VIS201D Visio Database Digramming 4
Visio Database Diagramming
• Entity Relationship Diagrams (ERD’s)
• Relational Databases
• Entities
• Attributes
• Relationships
– 1 to many
– Many to many
– 1 to 1
– Recursive
– IS-a (subtypes)
Bookstore2 VIS201D Visio Database
Digramming
5
VIS201D Visio Database Digramming 6
Visio Database Diagramming
• Course focus is using Visio to create an
ERD (Entity Relationship Diagram)
• Widely used for:
– Database development
– Database administration
• ERD’s are a foundation skill for work in
the Database field much like SQL
Bookstore2
VIS201D Visio Database Digramming 7
Visio Database Diagramming
• A basic knowledge of relational databases,
perhaps via MS Access, or some
programming knowledge, is desirable
Bookstore2
VIS201D Approach
• Create a complete ERD
– In this class using Visio; another class uses
Lucidchart on-line tool
• Step-by-step
• Use same bookstore database used in our
SQL classes
VIS201D Visio Database
Digramming
8Bookstore2
VIS201D Visio Database Digramming 9
Relational Database Evolution
• Based on Codd’s paper
• Early commercial efforts focused on Unix
• First mainframe implementation by IBM -
precursor to today’s DB2
• First PC implementation in early 80’s by
Oracle
Bookstore2
VIS201D Visio Database Digramming 10
Relational Database
Bookstore2
Database Design Models
(Entity Relationship Diagrams)
VIS201D Visio Database Digramming 11
We will start here
Bookstore2
Logical ERD Development
• Create entities
– Add attributes (fields)
– Set attribute properties (PK, FK, required)
• Draw the relationships from the parent
tables to the child tables
VIS201D Visio Database Digramming 12Bookstore2
ERD Development
• We will use the bookstore database used in our
SQL classes for our examples
• At this time we will just create two tables
– Customers
– Orders
• Although a little odd we will stick with the field
names used by the author
• These two tables are in a one-to-many
relationship
VIS201D Visio Database Digramming 13Bookstore2
VIS201D Visio Database Digramming 14
ERD Drawing Tools
• Embarcadero
• ER-WIN
• Visio (used in this class)
• Oracle Designer
• Many others
(Note: most tools use the crows-foot or similar model.)
Bookstore2
Customer Entity
• CUSTOMERS
• Attributes (fields):
– Customer_numb
– Customer_first_name
– Customer_last_name
– Customer_street
– Customer_city
– Customer_state
– Customer_zip
– Customer_phone
– Customer_email
VIS201D Visio Database Digramming 15Bookstore2
Start the Visio Drawing
• Start Visio and
select software
and databases
• Use the crow’s
foot notation
• Save your
drawing
VIS201D Visio Database Digramming 16Bookstore2
Initialize the Customer Entity
• Drag an entity
shape to the
drawing surface
• Zoom in to give
yourself some
working room
• Note by default
it set the 1st
attribute as the
primary key
VIS201D Visio Database Digramming 17Bookstore2
VIS201D Visio Database Digramming 18
Attributes
Customer entity
Customer
_numb
Customer_first_name Customer_last_name
12 Al Le
13 Bobby Jones
14 Carol Gomez
15 Hank Tartanian
166 Mary Park
167 Nancy Bocage
attributes
values
Bookstore2
Add remaining attributes
• Drag an
attribute shape
to the drawing
surface, or
• Click insert
attribute
VIS201D Visio Database Digramming 19Bookstore2
VIS201D Visio Database Digramming 20
Keys
• Derived from entity identifier
• One or more attributes (more = composite key)
• Uniquely determine a row
• Functionally determine an entire row’s
attributes
Bookstore2
Set attribute properties
• Mark any
attribute
properties such
as required or
primary key
• In our example
we only have
one required
field. This may
or may not be
realistic for
your databases.
VIS201D Visio Database Digramming 21Bookstore2
Add Orders Entity
• Conventions
used:
– Entity name in
caps
– Underline pk’s
– Italicize fk’s
– Bold required
fields
• Not necessary,
really, but can
be used to
create a sort of
text ERD
VIS201D Visio Database Digramming 22
• ORDERS
• Attributes (fields):
– Order_numb
– Customer_numb
– Order_date
– Credit_card_numb
– Order_filled
– Credit_card_exp_date
Bookstore2
Orders Entity
• Follow steps
used for
customers entity
• Note
customer_numb
marked as FK
(foreign key)
VIS201D Visio Database Digramming 23Bookstore2
Relationship Properties
VIS201D Visio Database Digramming 24
Has /
Belongs toEmployee Dependents
1 N
Degree
Cardinality
Optionality
Bookstore2
Relationship Types (after David Kroenke)
VIS201D Visio Database Digramming 25Bookstore2
Create initial relationship
• Pin one side to
customers
• Drag crows foot
to orders
VIS201D Visio Database Digramming 26Bookstore2
Create relationship
• Adjust
relationship
properties
– End size
– End symbols
– Line thickness
• Add titles,
colors, etc.
• This completes
the logical ERD
VIS201D Visio Database Digramming 27Bookstore2
Annotate relationship
• Annotate the
relationship if
desired
• Use two
phrases, one for
each direction
VIS201D Visio Database Digramming 28Bookstore2
VIS201D Visio Database Digramming 29
Physical Database Design
• Expand logical model with attribute
properties
• Translate model to the Database
– Entities -> tables
– Establish primary & foreign keys, indexes
– Many-to-many relations ->Junction tables
– Business rules -> triggers, constraints, etc.
• Typically done with a “CASE” tool
Bookstore2
Add attribute properties column
• Right click on
the table
• Select show
attributes to add
an attribute
properties
column
VIS201D Visio Database Digramming 30Bookstore2
Data Types
• int – whole number
• char (n) – fixed number of characters
• varchar (n) – variable number of characters
• float (m, d) – floating point with m digits, d after the
decimal point
• decimal (p, s) - fixed point with precision p, scale s
• datetime – date and time
• bit (n) – binary value with n bits
VIS201D Visio Database Digramming 31
See the documentation for your specific database for exact
details plus other supported data types
Bookstore2
Customers Physical Design
• Set properties
for all fields
VIS201D Visio Database Digramming 32Bookstore2
Orders Physical Design
• Set properties
for all fields
• Note optional
text boxes IX
for indexed
field with
duplicates
allowed, and
UX for unique
VIS201D Visio Database Digramming 33Bookstore2
VIS201D Visio Database Digramming 34
Database Design
MakesMfgr
One-to-many
Mfgr #
1 N
Equipment
PK=EqptID, FK=Mfgr#
Bookstore2
VIS201D Visio Database Digramming 35
Database Design
HasInvoice
One-to-many (w/ ID Dependency)
Inv #
1 N
Line Item
PK = inv#, item#
Bookstore2
Bookstore Database Physical
Design (1st
two tables)
• Final physical
design
• This would be
basis for
implementing
the tables
VIS201D Visio Database Digramming 36Bookstore2
Add Books Entity
• Conventions
used:
– Entity name in
caps
– Underline pk’s
– Italicize fk’s
– Bold required
fields
• Not necessary,
really, but can
be used to
create a sort of
text ERD
VIS201D Visio Database Digramming 37
• BOOKS
• Attributes (fields):
– isbn
– title
– publisher_name
– Publication_year
– binding
– source_numb
– retail_price
– number_on_hand
Bookstore2
Books Physical Design
• Set properties
for all fields
• Note optional
text boxes IX
for indexed
field with
duplicates
allowed, and
UX for unique
VIS201D Visio Database Digramming 38Bookstore2
Connect Books to Orders NXM
• Create relationship
between books and
orders
• Note this is a many
to many
relationship
• It may be OK on an
ERD but cannot be
implemented
directly in a
relational database
VIS201D Visio Database Digramming 39Bookstore2
VIS201D Visio Database Digramming 40
Database Design
Mfgr
Many-to-many
Mfgr_Eqpt
Equipment
M N
Mfg # Eqpt ID
Bookstore2
Add Orderlines Entity
• Conventions
used:
– Entity name in
caps
– Underline pk’s
– Italicize fk’s
– Bold required
fields
• Not necessary,
really, but can
be used to
create a sort of
text ERD
VIS201D Visio Database Digramming 41
• ORDERLINES
• Attributes (fields):
– order_numb
– isbn
– quantity
– cost_each
– cost_line
– shipped
Bookstore2
Orderlines Entity
• Set properties for
all fields
• Note order_numb
and isbn form a
single, composite
PK. Both columns
are in the PK.
VIS201D Visio Database Digramming 42Bookstore2
Bookstore 4 Table ERD
• This is a very
typical design
pattern
• All relationships are
now 1 to many
• Note intersection
table between
orders and books
VIS201D Visio Database Digramming 43Bookstore2
VIS201D Visio Database Digramming 44
Database Design
HasEmployee
Auto #
One-to-one
1
Auto
Emp #
1
Bookstore2
One-to-one demonstration
• There are no one-to-one relationships in
the bookstore database
• Instructor will demonstrate example
• Requires an FK with a unique index on it
VIS201D Visio Database
Digramming
45Bookstore2
VIS201D Visio Database Digramming 46
Recursive Relationships
Customer referrals
Customer_numb Customer_last_nam
e
Referred_by
12 Le 15
13 Jones 12
14 Gomez 13
15 Tartanian 166
166 Wang <null>
167 Park 166
Bookstore2
VIS201D Visio Database Digramming 47
Database Design
Referred byMember
Recursive
Member #
1
M
Bookstore2
Add referred_by to Customers
Entity
• Referred_by is the
customer that
referred this one
• The referred_by
field is a FK which
points back to the
PK in the same
customers table.
VIS201D Visio Database Digramming 48Bookstore2
Final Bookstore 4 Table ERD
• This is a very
typical design
pattern
• All relationships are
now 1 to many
• Note intersection
table between
orders and books
• There is a recursive
relationship
between customers
and itself
VIS201D Visio Database Digramming 49Bookstore2
VIS201D Visio Database Digramming 50
Database Design
Member
IS-A relationship (Subscriptions)
Print Online
Member#
Bookstore2
IS-A Relationships
• There are no IS-A relationships in the
bookstore database
• PK’s in child and parent tables are the
same
• Instructor will demonstrate
VIS201D Visio Database
Digramming
51Bookstore2
Bookstore2 VIS201D Visio Database Digramming 52
VIS201D
End of Course
P.O. Box 6142
Laguna Niguel, CA 92607
949-489-1472
http://www.ocdatabases.com
Please fill out and turn in your
end-of-course evaluations.

Weitere ähnliche Inhalte

Ähnlich wie VIS201d Visio Database Diagramming

Automating Data Quality Processes at Reckitt
Automating Data Quality Processes at ReckittAutomating Data Quality Processes at Reckitt
Automating Data Quality Processes at Reckitt
Databricks
 
Microsoft Cloud BI Update 2012 for SQL Saturday Philly
Microsoft Cloud BI Update 2012 for SQL Saturday PhillyMicrosoft Cloud BI Update 2012 for SQL Saturday Philly
Microsoft Cloud BI Update 2012 for SQL Saturday Philly
Mark Kromer
 
Resume_sukanta_updated
Resume_sukanta_updatedResume_sukanta_updated
Resume_sukanta_updated
Sukanta Saha
 
Resume_APRIL_updated
Resume_APRIL_updatedResume_APRIL_updated
Resume_APRIL_updated
Sukanta Saha
 
L’architettura di classe enterprise di nuova generazione
L’architettura di classe enterprise di nuova generazioneL’architettura di classe enterprise di nuova generazione
L’architettura di classe enterprise di nuova generazione
MongoDB
 

Ähnlich wie VIS201d Visio Database Diagramming (20)

Sp biz conf - using office graph api
Sp biz conf - using office graph apiSp biz conf - using office graph api
Sp biz conf - using office graph api
 
Automating Data Quality Processes at Reckitt
Automating Data Quality Processes at ReckittAutomating Data Quality Processes at Reckitt
Automating Data Quality Processes at Reckitt
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)
 
New Features in Solidworks 2017 for Solidworks 2016 Users
New Features in Solidworks 2017 for Solidworks 2016 UsersNew Features in Solidworks 2017 for Solidworks 2016 Users
New Features in Solidworks 2017 for Solidworks 2016 Users
 
MAC Furniture by Sonu Vishwakarma
MAC Furniture by Sonu VishwakarmaMAC Furniture by Sonu Vishwakarma
MAC Furniture by Sonu Vishwakarma
 
BOBJ
BOBJBOBJ
BOBJ
 
OTN EMEA TOUR 2016 - OBIEE12c New Features for End-Users, Developers and Sys...
OTN EMEA TOUR 2016  - OBIEE12c New Features for End-Users, Developers and Sys...OTN EMEA TOUR 2016  - OBIEE12c New Features for End-Users, Developers and Sys...
OTN EMEA TOUR 2016 - OBIEE12c New Features for End-Users, Developers and Sys...
 
SharePoint Saturday Louisville 2012
SharePoint Saturday Louisville 2012SharePoint Saturday Louisville 2012
SharePoint Saturday Louisville 2012
 
Microsoft Cloud BI Update 2012 for SQL Saturday Philly
Microsoft Cloud BI Update 2012 for SQL Saturday PhillyMicrosoft Cloud BI Update 2012 for SQL Saturday Philly
Microsoft Cloud BI Update 2012 for SQL Saturday Philly
 
Cincom Roadmap ESUG2014
Cincom Roadmap ESUG2014Cincom Roadmap ESUG2014
Cincom Roadmap ESUG2014
 
Resume
ResumeResume
Resume
 
Resume_sukanta_updated
Resume_sukanta_updatedResume_sukanta_updated
Resume_sukanta_updated
 
Resume_APRIL_updated
Resume_APRIL_updatedResume_APRIL_updated
Resume_APRIL_updated
 
Resume april updated
Resume april updatedResume april updated
Resume april updated
 
SQL201S Accelerated Introduction to MySQL Queries
SQL201S Accelerated Introduction to MySQL QueriesSQL201S Accelerated Introduction to MySQL Queries
SQL201S Accelerated Introduction to MySQL Queries
 
SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The Move
 
L’architettura di classe enterprise di nuova generazione
L’architettura di classe enterprise di nuova generazioneL’architettura di classe enterprise di nuova generazione
L’architettura di classe enterprise di nuova generazione
 
SAP BO and Teradata best practices
SAP BO and Teradata best practicesSAP BO and Teradata best practices
SAP BO and Teradata best practices
 
OrientDB - the 2nd generation of (Multi-Model) NoSQL - Codemotion Warsaw 2016
OrientDB - the 2nd generation of (Multi-Model) NoSQL - Codemotion Warsaw 2016OrientDB - the 2nd generation of (Multi-Model) NoSQL - Codemotion Warsaw 2016
OrientDB - the 2nd generation of (Multi-Model) NoSQL - Codemotion Warsaw 2016
 
Practical Medium Data Analytics with Python (10 Things I Hate About pandas, P...
Practical Medium Data Analytics with Python (10 Things I Hate About pandas, P...Practical Medium Data Analytics with Python (10 Things I Hate About pandas, P...
Practical Medium Data Analytics with Python (10 Things I Hate About pandas, P...
 

Mehr von Dan D'Urso

Course Catalog
Course CatalogCourse Catalog
Course Catalog
Dan D'Urso
 

Mehr von Dan D'Urso (20)

Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
PRJ101a Project 2013 Accelerated
PRJ101a Project 2013 AcceleratedPRJ101a Project 2013 Accelerated
PRJ101a Project 2013 Accelerated
 
PRJ101xl Project Libre Basic Training
PRJ101xl Project Libre Basic TrainingPRJ101xl Project Libre Basic Training
PRJ101xl Project Libre Basic Training
 
Introduction to coding using Python
Introduction to coding using PythonIntroduction to coding using Python
Introduction to coding using Python
 
Stem conference
Stem conferenceStem conference
Stem conference
 
SQL200A Microsoft Access SQL Design
SQL200A Microsoft Access SQL DesignSQL200A Microsoft Access SQL Design
SQL200A Microsoft Access SQL Design
 
Microsoft access self joins
Microsoft access self joinsMicrosoft access self joins
Microsoft access self joins
 
SQL302 Intermediate SQL
SQL302 Intermediate SQLSQL302 Intermediate SQL
SQL302 Intermediate SQL
 
AIN106 Access Reporting and Analysis
AIN106 Access Reporting and AnalysisAIN106 Access Reporting and Analysis
AIN106 Access Reporting and Analysis
 
SQL302 Intermediate SQL Workshop 3
SQL302 Intermediate SQL Workshop 3SQL302 Intermediate SQL Workshop 3
SQL302 Intermediate SQL Workshop 3
 
SQL302 Intermediate SQL Workshop 2
SQL302 Intermediate SQL Workshop 2SQL302 Intermediate SQL Workshop 2
SQL302 Intermediate SQL Workshop 2
 
Course Catalog
Course CatalogCourse Catalog
Course Catalog
 
SQL302 Intermediate SQL Workshop 1
SQL302 Intermediate SQL Workshop 1SQL302 Intermediate SQL Workshop 1
SQL302 Intermediate SQL Workshop 1
 
SQL212 Oracle SQL Manual
SQL212 Oracle SQL ManualSQL212 Oracle SQL Manual
SQL212 Oracle SQL Manual
 
SQL201W MySQL SQL Manual
SQL201W MySQL SQL ManualSQL201W MySQL SQL Manual
SQL201W MySQL SQL Manual
 
AIN100
AIN100AIN100
AIN100
 
SQL206 SQL Median
SQL206 SQL MedianSQL206 SQL Median
SQL206 SQL Median
 
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
 
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
 
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
 

Kürzlich hochgeladen

CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
amitlee9823
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
amitlee9823
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
amitlee9823
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
amitlee9823
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
amitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 

Kürzlich hochgeladen (20)

CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics Program
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 

VIS201d Visio Database Diagramming

  • 1. VIS201D Visio Database Digramming 1 An introduction to Visio database diagramming for analysts and IT professionals P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.ocdatabases.com Welcome to VIS201D – Visio Database Diagramming Bookstore2
  • 2. VIS201D Visio Database Digramming 2 Visio Database Diagramming • Introduction (s) • Facilities • Course Packet (contents may vary) – Student questionnaire – Collaterals (Maps, Catalogs, Etc.) – PowerPoint handouts – Evaluation form – Training certificate Bookstore2
  • 3. Bookstore2 VIS201D Visio Database Digramming 3 VIS201D Contact Information P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.ocdatabases.com slides.1@ocdatabases.com Copyright 2017. All rights reserved.
  • 4. VIS201D Resources • Bookstore database scripts found on box.net at http://tinyurl.com/SQLScripts • Slides can be viewed on SlideShare… http://www.slideshare.net/OCDatabases • Follow up questions? support@ocdatabases.com Bookstore2 VIS201D Visio Database Digramming 4
  • 5. Visio Database Diagramming • Entity Relationship Diagrams (ERD’s) • Relational Databases • Entities • Attributes • Relationships – 1 to many – Many to many – 1 to 1 – Recursive – IS-a (subtypes) Bookstore2 VIS201D Visio Database Digramming 5
  • 6. VIS201D Visio Database Digramming 6 Visio Database Diagramming • Course focus is using Visio to create an ERD (Entity Relationship Diagram) • Widely used for: – Database development – Database administration • ERD’s are a foundation skill for work in the Database field much like SQL Bookstore2
  • 7. VIS201D Visio Database Digramming 7 Visio Database Diagramming • A basic knowledge of relational databases, perhaps via MS Access, or some programming knowledge, is desirable Bookstore2
  • 8. VIS201D Approach • Create a complete ERD – In this class using Visio; another class uses Lucidchart on-line tool • Step-by-step • Use same bookstore database used in our SQL classes VIS201D Visio Database Digramming 8Bookstore2
  • 9. VIS201D Visio Database Digramming 9 Relational Database Evolution • Based on Codd’s paper • Early commercial efforts focused on Unix • First mainframe implementation by IBM - precursor to today’s DB2 • First PC implementation in early 80’s by Oracle Bookstore2
  • 10. VIS201D Visio Database Digramming 10 Relational Database Bookstore2
  • 11. Database Design Models (Entity Relationship Diagrams) VIS201D Visio Database Digramming 11 We will start here Bookstore2
  • 12. Logical ERD Development • Create entities – Add attributes (fields) – Set attribute properties (PK, FK, required) • Draw the relationships from the parent tables to the child tables VIS201D Visio Database Digramming 12Bookstore2
  • 13. ERD Development • We will use the bookstore database used in our SQL classes for our examples • At this time we will just create two tables – Customers – Orders • Although a little odd we will stick with the field names used by the author • These two tables are in a one-to-many relationship VIS201D Visio Database Digramming 13Bookstore2
  • 14. VIS201D Visio Database Digramming 14 ERD Drawing Tools • Embarcadero • ER-WIN • Visio (used in this class) • Oracle Designer • Many others (Note: most tools use the crows-foot or similar model.) Bookstore2
  • 15. Customer Entity • CUSTOMERS • Attributes (fields): – Customer_numb – Customer_first_name – Customer_last_name – Customer_street – Customer_city – Customer_state – Customer_zip – Customer_phone – Customer_email VIS201D Visio Database Digramming 15Bookstore2
  • 16. Start the Visio Drawing • Start Visio and select software and databases • Use the crow’s foot notation • Save your drawing VIS201D Visio Database Digramming 16Bookstore2
  • 17. Initialize the Customer Entity • Drag an entity shape to the drawing surface • Zoom in to give yourself some working room • Note by default it set the 1st attribute as the primary key VIS201D Visio Database Digramming 17Bookstore2
  • 18. VIS201D Visio Database Digramming 18 Attributes Customer entity Customer _numb Customer_first_name Customer_last_name 12 Al Le 13 Bobby Jones 14 Carol Gomez 15 Hank Tartanian 166 Mary Park 167 Nancy Bocage attributes values Bookstore2
  • 19. Add remaining attributes • Drag an attribute shape to the drawing surface, or • Click insert attribute VIS201D Visio Database Digramming 19Bookstore2
  • 20. VIS201D Visio Database Digramming 20 Keys • Derived from entity identifier • One or more attributes (more = composite key) • Uniquely determine a row • Functionally determine an entire row’s attributes Bookstore2
  • 21. Set attribute properties • Mark any attribute properties such as required or primary key • In our example we only have one required field. This may or may not be realistic for your databases. VIS201D Visio Database Digramming 21Bookstore2
  • 22. Add Orders Entity • Conventions used: – Entity name in caps – Underline pk’s – Italicize fk’s – Bold required fields • Not necessary, really, but can be used to create a sort of text ERD VIS201D Visio Database Digramming 22 • ORDERS • Attributes (fields): – Order_numb – Customer_numb – Order_date – Credit_card_numb – Order_filled – Credit_card_exp_date Bookstore2
  • 23. Orders Entity • Follow steps used for customers entity • Note customer_numb marked as FK (foreign key) VIS201D Visio Database Digramming 23Bookstore2
  • 24. Relationship Properties VIS201D Visio Database Digramming 24 Has / Belongs toEmployee Dependents 1 N Degree Cardinality Optionality Bookstore2
  • 25. Relationship Types (after David Kroenke) VIS201D Visio Database Digramming 25Bookstore2
  • 26. Create initial relationship • Pin one side to customers • Drag crows foot to orders VIS201D Visio Database Digramming 26Bookstore2
  • 27. Create relationship • Adjust relationship properties – End size – End symbols – Line thickness • Add titles, colors, etc. • This completes the logical ERD VIS201D Visio Database Digramming 27Bookstore2
  • 28. Annotate relationship • Annotate the relationship if desired • Use two phrases, one for each direction VIS201D Visio Database Digramming 28Bookstore2
  • 29. VIS201D Visio Database Digramming 29 Physical Database Design • Expand logical model with attribute properties • Translate model to the Database – Entities -> tables – Establish primary & foreign keys, indexes – Many-to-many relations ->Junction tables – Business rules -> triggers, constraints, etc. • Typically done with a “CASE” tool Bookstore2
  • 30. Add attribute properties column • Right click on the table • Select show attributes to add an attribute properties column VIS201D Visio Database Digramming 30Bookstore2
  • 31. Data Types • int – whole number • char (n) – fixed number of characters • varchar (n) – variable number of characters • float (m, d) – floating point with m digits, d after the decimal point • decimal (p, s) - fixed point with precision p, scale s • datetime – date and time • bit (n) – binary value with n bits VIS201D Visio Database Digramming 31 See the documentation for your specific database for exact details plus other supported data types Bookstore2
  • 32. Customers Physical Design • Set properties for all fields VIS201D Visio Database Digramming 32Bookstore2
  • 33. Orders Physical Design • Set properties for all fields • Note optional text boxes IX for indexed field with duplicates allowed, and UX for unique VIS201D Visio Database Digramming 33Bookstore2
  • 34. VIS201D Visio Database Digramming 34 Database Design MakesMfgr One-to-many Mfgr # 1 N Equipment PK=EqptID, FK=Mfgr# Bookstore2
  • 35. VIS201D Visio Database Digramming 35 Database Design HasInvoice One-to-many (w/ ID Dependency) Inv # 1 N Line Item PK = inv#, item# Bookstore2
  • 36. Bookstore Database Physical Design (1st two tables) • Final physical design • This would be basis for implementing the tables VIS201D Visio Database Digramming 36Bookstore2
  • 37. Add Books Entity • Conventions used: – Entity name in caps – Underline pk’s – Italicize fk’s – Bold required fields • Not necessary, really, but can be used to create a sort of text ERD VIS201D Visio Database Digramming 37 • BOOKS • Attributes (fields): – isbn – title – publisher_name – Publication_year – binding – source_numb – retail_price – number_on_hand Bookstore2
  • 38. Books Physical Design • Set properties for all fields • Note optional text boxes IX for indexed field with duplicates allowed, and UX for unique VIS201D Visio Database Digramming 38Bookstore2
  • 39. Connect Books to Orders NXM • Create relationship between books and orders • Note this is a many to many relationship • It may be OK on an ERD but cannot be implemented directly in a relational database VIS201D Visio Database Digramming 39Bookstore2
  • 40. VIS201D Visio Database Digramming 40 Database Design Mfgr Many-to-many Mfgr_Eqpt Equipment M N Mfg # Eqpt ID Bookstore2
  • 41. Add Orderlines Entity • Conventions used: – Entity name in caps – Underline pk’s – Italicize fk’s – Bold required fields • Not necessary, really, but can be used to create a sort of text ERD VIS201D Visio Database Digramming 41 • ORDERLINES • Attributes (fields): – order_numb – isbn – quantity – cost_each – cost_line – shipped Bookstore2
  • 42. Orderlines Entity • Set properties for all fields • Note order_numb and isbn form a single, composite PK. Both columns are in the PK. VIS201D Visio Database Digramming 42Bookstore2
  • 43. Bookstore 4 Table ERD • This is a very typical design pattern • All relationships are now 1 to many • Note intersection table between orders and books VIS201D Visio Database Digramming 43Bookstore2
  • 44. VIS201D Visio Database Digramming 44 Database Design HasEmployee Auto # One-to-one 1 Auto Emp # 1 Bookstore2
  • 45. One-to-one demonstration • There are no one-to-one relationships in the bookstore database • Instructor will demonstrate example • Requires an FK with a unique index on it VIS201D Visio Database Digramming 45Bookstore2
  • 46. VIS201D Visio Database Digramming 46 Recursive Relationships Customer referrals Customer_numb Customer_last_nam e Referred_by 12 Le 15 13 Jones 12 14 Gomez 13 15 Tartanian 166 166 Wang <null> 167 Park 166 Bookstore2
  • 47. VIS201D Visio Database Digramming 47 Database Design Referred byMember Recursive Member # 1 M Bookstore2
  • 48. Add referred_by to Customers Entity • Referred_by is the customer that referred this one • The referred_by field is a FK which points back to the PK in the same customers table. VIS201D Visio Database Digramming 48Bookstore2
  • 49. Final Bookstore 4 Table ERD • This is a very typical design pattern • All relationships are now 1 to many • Note intersection table between orders and books • There is a recursive relationship between customers and itself VIS201D Visio Database Digramming 49Bookstore2
  • 50. VIS201D Visio Database Digramming 50 Database Design Member IS-A relationship (Subscriptions) Print Online Member# Bookstore2
  • 51. IS-A Relationships • There are no IS-A relationships in the bookstore database • PK’s in child and parent tables are the same • Instructor will demonstrate VIS201D Visio Database Digramming 51Bookstore2
  • 52. Bookstore2 VIS201D Visio Database Digramming 52 VIS201D End of Course P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.ocdatabases.com Please fill out and turn in your end-of-course evaluations.

Hinweis der Redaktion

  1. Follow with student exercise to develop a database.