DB Lec 11

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

1

Database Systems
Lecture 11

Refining the ER design for the company


Database Management Systems
database, ER diagrams, naming
conventions, Alternative Notations for ER
diagrams and designs Issues, Examples of
other Notations
2

Database Management S
ystems

Today’s agenda
• Refining the ER Diagram
• Proper Naming for Schema Constructs
• Alternative Notation for ER Diagram
• UML Class Diagram for Company Database
3

Database Management S
ystems

Refining the ER Diagram for Company


Database
• 1. MANAGES, a 1:1 relationship type between
EMPLOYEE and DEPARTMENT. EMPLOYEE
participation is partial. DEPARTMENT participation is
not clear from the requirements. We question the users,
who say that a department must have a manager at all
times, which implies total participation. The attribute
StartDate is assigned to this relationship type.

• 2. WORKS_FOR, a 1: N relationship type between


DEPARTMENT and EMPLOYEE. Both participations
are total.
4

Database Management S
ystems

Refining the ER Diagram for Company


Database
• 3. CONTROLS, a 1:N relationship type between
DEPARTMENT and PROJECT. The participation of
PROJECT is total, whereas that of DEPARTMENT is
determined to be partial, after consultation with the users
indicates that some departments may control no projects.

• 4. SUPERVISION, a 1:N relationship type between


EMPLOYEE (in the supervisor role) and EMPLOYEE (in
the supervisee role). Both participations are determined to
be partial, after the users indicate that not every employee
is a supervisor and not every employee has a supervisor.
5

Database Management S
ystems

Refining the ER Diagram for Company


Database
• 5. WORKS_ON, determined to be an M:N
relationship type with attribute Hours, after the
users indicate that a project can have several
employees working on it. Both participations are
determined to be total.

• 6. DEPENDENTS_OF, a l:N relationship type


between EMPLOYEE and DEPENDENT, which is
also the identifying relationship for the weak entity
type DEPENDENT. The participation of EMPLOYEE
is partial, whereas that of DEPENDENT is total.
6

Database Management S
ystems
7

Database Management S
ystems

Proper Naming of Schema Constructs


• The choice of names for entity types, attributes,
relationship types, and (particularly) roles is not
always straightforward.
▫ Singular names for entity types,
▫ Entity type and relationship type names are in
uppercase letters,
▫ Attribute names have their initial letter capitalized,
▫ Role names are in lowercase letters
▫ Entity type as noun
▫ Relationship type as verb
▫ Additional noun for attributes names
8

Database Management S
ystems

Alternative Notations for ER Diagram


• Alternative ER notation for specifying structural
constraints on relationships
• This notation involves associating a pair of
integer numbers (min, max) with each
participation of an entity type E in a
relationship type R, where 0 <= min <= max
and max >= 1
• In this method, min = 0 implies partial
participation, whereas min > 0 implies total
participation.
9

Database Management S
ystems

ER diagrams for the COMPANY schema, with


structural constraints specific using (min, max)
notation.
10

Database Management S
ystems

The COMPANY conceptual scheme in UML


class diagram notation
11

Database Management S
ystems

Data Modeling Tools


A number of popular tools that cover conceptual
modeling and mapping into relational schema
design. Examples: ERWin, S- Designer
(Enterprise Application Suite), ER- Studio, etc.
POSITIVES: serves as documentation of
application requirements, easy user interface -
mostly graphics editor support
12

Database Management S
ystems
Some of the Currently Available Automated Database
Design Tools
COMPANY TOOL FUNCTIONALITY
Embarcadero ER Studio Database Modeling in ER and IDEF1X
Technologies
DB Artisan Database administration and space and security
management
Oracle Developer 2000 and Database modeling, application development
Designer 2000
Popkin Software System Architect 2001 Data modeling, object modeling, process modeling,
structured analysis/design
Platinum Platinum Enterprice Data, process, and business component modeling
Technology Modeling Suite: Erwin,
BPWin, Paradigm Plus
Persistence Inc. Pwertier Mapping from O-O to relational model

Rational Rational Rose Modeling in UML and application generation in C++


and JAVA
Rogue Ware RW Metro Mapping from O-O to relational model

Resolution Ltd. Xcase Conceptual modeling up to code maintenance

Sybase Enterprise Application Suite Data modeling, business logic modeling


Visio Visio Enterprise Data modeling, design and reengineering Visual Basic
and Visual C++

You might also like