Docsity

Data Modeling Standards: ER Data Modeling with Peter Chen Notation, Study Guides, Projects, Research of Deductive Database Systems

Toggle sidebar
bg1
D
Da
at
ta
a
M
Mo
od
de
el
li
in
ng
g
S
St
ta
an
nd
da
ar
rd
ds
s
Data Modeling Standards.doc Page 1 September 25, 2007
L
Lo
og
gi
ic
ca
al
l
d
da
at
ta
a
m
mo
od
de
el
l
In order to facilitate integrated and consistent logical data models across the project, we will
be establishing data modeling conventions. We will be using the ER Data Modeling notation
first documented by Peter Chen.[1] The actual implementation of the ER notation we will be
using will vary based on the tool we select. We will update these conventions once the tool
selection is made. The conventions now follow.
E
En
nt
ti
it
ty
y
t
ty
yp
pe
es
s
Entity Type Names:
• Entity type names should have meaning in the domain of the application. They represent
real-world objects such as persons, places and things.
• Entity type names should be globally unique throughout the data model.
• The Entity name should be a singular noun, starting with a capital letter.
• If the name contains several words, use the _ symbol between words, and
capitalize the first letter of each word.
• Limit names to at most 40 characters.
• The example on the right, Cross_Cutting_Theme is a singular noun made up of 3 words
each capitalized and separated by “_”.
• Entity keys will be labeled with “_OID” followed by “(PK)” if it is a primary key.
Super-types:
• Super-types should be used when several entity types share common properties or
attributes. In the example on the right,
an Employee entity type might have
sub-types Hourly_Employee,
Salaried_Employee, and Consultant.
• Only the parent entity type should have
an OID (in this case Employee_OID) and
the child entity types will inherit the
OID of the parent entity type.
• In addition, you must specify whether
the sub-types are exclusive or inclusive.
o Exclusive sub-types are disjoint
in that an entity instance can be an instance of only one sub-type.
o Inclusive sub-types are overlapping in that an entity instance can be an instance
of two or more sub-types.
o To denote this, using a dashed line across the super-sub-type connectors with
either {disjoint} for Exclusive sub-types, or {overlapping} for Inclusive sub-types.
In the example we note {disjoint}, indicating the sub-types are exclusive.
pf3
pf4
pf5

Partial preview of the text

Download Data Modeling Standards: ER Data Modeling with Peter Chen Notation and more Study Guides, Projects, Research Deductive Database Systems in PDF only on Docsity!

D

L

L

o

o g

g i

i c

c a

a l

l d

d a

a t

t a

a m

m o

o d

d e

e l

l

In order to facilitate integrated and consistent logical data models across the project, we will

be establishing data modeling conventions. We will be using the ER Data Modeling notation

first documented by Peter Chen.[1] The actual implementation of the ER notation we will be

using will vary based on the tool we select. We will update these conventions once the tool

selection is made. The conventions now follow.

E

E

n

n t

t i

i t

t y

y t

t y

y p

p e

e s

s

Entity Type Names:

  • Entity type names should have meaning in the domain of the application. They represent

real-world objects such as persons, places and things.

  • Entity type names should be globally unique throughout the data model.
  • The Entity name should be a singular noun, starting with a capital letter.
  • If the name contains several words, use the _ symbol between words, and

capitalize the first letter of each word.

  • Limit names to at most 40 characters.
  • The example on the right, Cross_Cutting_Theme is a singular noun made up of 3 words

each capitalized and separated by “_”.

  • Entity keys will be labeled with “_OID” followed by “(PK)” if it is a primary key.

Super-types:

  • Super-types should be used when several entity types share common properties or

attributes. In the example on the right,

an Employee entity type might have

sub-types Hourly_Employee,

Salaried_Employee, and Consultant.

  • Only the parent entity type should have

an OID (in this case Employee_OID) and

the child entity types will inherit the

OID of the parent entity type.

  • In addition, you must specify whether

the sub-types are exclusive or inclusive.

o Exclusive sub-types are disjoint

in that an entity instance can be an instance of only one sub-type.

o Inclusive sub-types are overlapping in that an entity instance can be an instance

of two or more sub-types.

o To denote this, using a dashed line across the super-sub-type connectors with

either {disjoint} for Exclusive sub-types, or {overlapping} for Inclusive sub-types.

In the example we note {disjoint}, indicating the sub-types are exclusive.

D

R

R

e

e l

l a

a t

t i

i o

o n

n s

s h

h i

i p

p t

t y

y p

p e

e s

s

Relationship types represent named associations between entity types.

Relationship Type Names

  • Relationship type names should be globally

unique throughout the data model.

  • The names should be action-oriented and reflect

the nature of the underlying relationship.

  • The first letter of each word in the relationship

name should be in upper case.

  • If the name contains several words, use the _

symbol between words.

  • Capitalize the first letter of each word in the

relationship type name.

  • Limit names to no more than 40 characters.
  • Use a triangle pointing the reading direction of the name.
  • In the example shown, Manages is the relationship name which reads from Office to

Programme.

Cardinality and Mandatory / Optional:

  • Cardinality indicates how many instances of a given entity type may be related to

instances of another entity type.

  • The notation for cardinality of a relationship will be < Lower Bound> ... < Upper Bound> ,

where Lower Bound and Upper Bound are integers, with Lower Bound being less than or

equal to Upper Bound.

  • The < Lower Bound> on cardinality is the minimum number of outgoing relationship

instances of type R from any instance of an entity type with R as an outgoing

relationship type.

  • The < Upper Bound> is the maximum number of outgoing relationship instances of type R

from any instance of an entity type with R as an outgoing relationship type.

  • The table below shows the options for cardinality and the meaning of each.

Cardinality Lower

Bound

Upper

Bound

Mandatory(M)

Optional (O)

0 … 1 0 1 O

1 1 1 M

1 ... * 1 Any # M

  • 0 Any # O

0 ... m 0 m** O

n … m n* m** M

* n is an integer greater than 0

** m is an integer greater than or equal to n. m can also be * as in “5 … *”

  • A < Lower Bound> of 0 indicates an optional relationship and a < Lower Bound> of 1 or n

indicates a mandatory relationship.

  • In the example shown above, the Office may have 0 or many Programmes it manages.

Any given Programme is managed by 1 and only 1 Office. A Programme does not exist if

it isn’t managed by an Office.

D

A

A

t

t t

t r

r i

i b

b u

u t

t e

e t

t y

y p

p e

e s

s

Attribute types represent descriptive primitive values associated with an entity or relationship

type. Attribute types represent atomic information and not composite information.

Attribute Type Names:

  • Attribute type names should be descriptive of the real-world property they represent.
  • Attribute type names should be unique within an entity type, but may be the same

across entity types.

  • The names should be a noun, with the first letter of each word in upper case.
  • If the name contains several words, use the _ symbol between words.
  • Capitalize the first letter of each word in the entity type name.
  • Limit names to no more than 40 characters.

Derived Attribute Types:

  • Derived attributes obtain their value by performing operations on other attributes (e.g.,

age). Note that the values of derived attributes are not stored in the database but

computed on-demand.

  • The convention we will use for derived attribute types is to include the phrase "(Derived)"

at the end of the attribute name.

  • The calculation used to compute the value of the derived attribute will be defined in the

data dictionary entry for the derived attribute type.

Composite Attribute Types:

  • Do not define composite attribute types as part of an entity or relationship type. Be sure

attribute types represent atomic information.

B

B

u

u s

s i

i n

n e

e s

s s

s r

r u

u l

l e

e s

s

Business rules are additional constraints on data model that cannot be represented in

standard ER data models. Such constraints should be documented in a data dictionary.

Constraints between Data Model

Elements:

  • Constraints between elements of the

data model can be defined as

business rules. For example, one

relationship type might be a subset

of another relationship type. The

value of one attribute might need to

be less than the value of another

attribute.

  • All such business constraints should

be defined as free-form text associated with the appropriate model element in the data

dictionary.

D

D

D

a

a t

t a

a d

d i

i c

c t

t i

i o

o n

n a

a r

r y

y

A data dictionary is a separate .html document in the style defined by <URL: Devin: design a

standard .html format to be used by all teams for data model> that more fully defines the

entity, relationship and attribute types defined in the ER data model. Data dictionary entries

should be grouped together alphabetically by entity type. For each entity type, list and define

the entity type, followed by the associated attribute types and then the relationship types.

Each entry in the data dictionary should contain the following items:

  • Type Name: List the name of the type being defined, organized alphabetically by entity

type name.

  • Type: List if the type being defined is an entity type, attribute type or relationship type.
  • Description: A 1-3 sentence description of the data type.
  • LEAP References: URL links to LEAP reference documentation about the concept being

defined in the data dictionary.

  • Business Rules: Any additional business rule constraints defined for the data type.

M Miisscceellllaanneeoouuss

Integration with base data model:

  • Any additions or changes to the LEAP data model must be integrated into the then

current version of the integrated LEAP data model. Such changes must be made both in

the data model and in the associated data dictionary. Specific attention should be paid to

integrating with existing data model constructs (entity types, relationship types, etc.) and

not creating redundant data model constructs. The existing LEAP data model and

dictionary can be found on the development server.

Data Model Quality Assurance:

  • When assessing the quality of a data model, the following areas must be taken into

consideration.

o Completeness: Does the data model represent all of the database requirements?

Are all database requirements traceable and satisfied by the ER data model?

o Minimal: Are all requirements represented only once in the ER data model?

o Understandability: Does the ER data model represent requirements in such a way

as to be easily understood?

o Readability/Aesthetics: Is the ER data model easy to read in terms of graphic

layout (line crossings minimized, etc.)? Is the ER data model easy to understand

and intuitive?

o Extensibility: Does the ER data model accommodate anticipated changes in the

database requirements so that such changes are easy to support when eventually

needed?

o Correctness: Does the ER data model properly use the ER data model constructs?

ƒ Use of entity type instead of attribute type

ƒ Use of attribute type instead of entity type

ƒ Proper cardinality constraints

ƒ Use of an entity type instead of a relationship type

ƒ Use of attribute type instead of relationship type

D

C

C

o

o n

n s

s i

i d

d e

e r

r a

a t

t i

i o

o n

n s

s

  • Editing environment to support standard ER data modeling notation, including full

cardinality

  • Output: printer, html or equivalent for web-rendering
  • Integration with MySQL
  • Automatic generation of MySQL tables from the ER data models
  • Automatic importing of MySQL tables to an editable ER data model
  • Multi-user: ability for multiple users to use the tool complete with ACLs
  • Open source: strong preference to an open source tool
  • Intuitive: tool needs to be intuitive to use
  • Style Enforcement: especially for cardinality