Vous êtes sur la page 1sur 20

Database Design

Drawing Conventions for Readability

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Objectives
This lesson covers the following objectives: Apply the Oracle drawing conventions to a datamodel diagram Identify high volume entities in a datamodel diagram and explain their significance to the business Redraw a given datamodel diagram to increase clarity and readability Recognize the usefulness of dividing a complex ERD into a number of functional sub-diagrams

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Purpose
What if all shoemakers made up their own sizes?
What if every architect used a different system to draw plans for a building? Following the same conventions makes it easier to work as part of a team. Watch the video clip. How easy is it to understand the ERD at the end?
3 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Large ERD Drawing Conventions


The bigger and more complicated an ERD gets, the more challenging it becomes to lay out the pieces in a clear and readable format.

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Large ERD Drawing Conventions (cont.)


Following the convention that crows fly south and east places the high volume entities on the upper left portion of the ERD.

JOB ASSIGNMENT

PARTNER

EVENT

CLIENT

PRIVATE SPACE

PUBLIC SPACE

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Large ERD Drawing Conventions (cont.)


High volume entities are those that would contain the highest number of instances (the child entities) compared to other entities.

JOB ASSIGNMENT

PARTNER

EVENT

CLIENT

PRIVATE SPACE

PUBLIC SPACE

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Large ERD Drawing Conventions (cont.)


PRIVATE SPACE PUBLIC SPACE

Following the convention that crows fly north and west places the high volume entities on the lower right portion of the ERD.

CLIENT

EVENT

PARTNER

JOB ASSIGNMENT

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Large ERD Drawing Conventions (cont.)


High volume entities are often the central or more important entities in an ERD. They will have the highest number of relationships to other entities, and most of the business functions will affect the data stored in these entities.
8 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

PRIVATE SPACE

PUBLIC SPACE

CLIENT

EVENT

PARTNER

JOB ASSIGNMENT

Drawing Conventions for Readability

Clarity is Key
Often you will have a mix, depending on the amount of space you have and your EVENT own preference. Clarity and readability are the main PUBLIC SPACE PRIVATE SPACE criteria.
9 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

CLIENT

JOB ASSIGNMENT

PARTNER

Drawing Conventions for Readability

Clarity is Key (cont.)


The high volume entities are not always the most important. Which of these entities would have the highest volume?
Which entity is the most important? Again, clarity and readability are the main criteria.
CLASS

ENROLLMENT

STUDENT

TEACHER

10

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Space is Needed
Readability takes space and is subject to taste. The use of white space helps clarify an ERD.
A B C E C E B

F
D F

11

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Use Sub-Diagrams
When you have a very large diagram, it may also help to break it up into smaller diagrams of functionally related entities.
JOB ASSIGNMENT * status # date EVENT # id * cost * name * date description

PARTNER # id * first name * last name DJ * specialty

EVENT PLANNER

OTHER

MANAGER o authorized expense limit

CLIENT # number * first name * last name * phone number email address

12

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Use Sub-Diagrams (cont.)


You could use the smaller subdiagrams when presenting to different groups within the customers company.
JOB ASSIGNMENT * status # date EVENT # id * cost * name * date description

PARTNER # id * first name * last name DJ * specialty

EVENT PLANNER

OTHER

MANAGER o authorized expense limit

CLIENT # number * first name * last name * phone number email address

13

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Use Sub-Diagrams (cont.)


These are the entities that the project manager would mainly be interested in.
JOB ASSIGNMENT * status # date EVENT # id * cost * name * date description

PARTNER # id * first name * last name DJ * specialty

EVENT PLANNER

OTHER

MANAGER o authorized expense limit

CLIENT # number * first name * last name * phone number email address

14

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Sub-Diagram Example
These are the entities that the event manager would mainly be concerned with.
EVENT # id * cost * name * date o description CLIENT # number * first name * last name * phone number o email address

THEME # code * description

PRIVATE HOME # id * address o comments

PUBLIC SPACE # id * address * rental fee o comments

15

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Sub-Diagram Strategy
PLAY LIST ITEM o comments
TRACK LISTING * track

Often multiple developers build the applications that access a single database.

CD # number * title * producer * year

EVENT # id * name * date * cost o description

SONG # id * title o duration o artist

THEME # code * description


16 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

TYPE # code * description

Drawing Conventions for Readability

Sub-Diagram Strategy (cont.)


PLAY LIST ITEM o comments
TRACK LISTING * track

Each application developer could use a smaller diagram that contains the entities that he or she will build screens, forms, and reports for.

CD # number * title * producer * year

EVENT # id * name * date * cost o description

SONG # id * title o duration o artist

THEME # code * description


17 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

TYPE # code * description

Drawing Conventions for Readability

Sub-Diagram Strategy (cont.)


PLAY LIST ITEM o comments
TRACK LISTING * track

These are the entities that the DJ, or someone building an application for the DJ, would mainly be interested in.

CD # number * title * producer * year

EVENT # id * name * date * cost o description

SONG # id * title o duration o artist

THEME # code * description


18 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

TYPE # code * description

Drawing Conventions for Readability

Terminology
Key terms used in this lesson included: High volume entity White space

19

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Drawing Conventions for Readability

Summary
In this lesson, you should have learned how to: Apply the Oracle drawing conventions to a datamodel diagram Identify high volume entities in a datamodel diagram and explain their significance to the business Redraw a given datamodel diagram to increase clarity and readability Recognize the usefulness of dividing a complex ERD into a number of functional sub-diagrams

20

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Vous aimerez peut-être aussi