Вы находитесь на странице: 1из 14

Arcs

Copyright 2011, Oracle. All rights reserved.

Arcs

What Will I Learn?


Objectives In this lesson, you will learn to: Define the term "constraint" as it applies to data modeling Identify an exclusive OR relationship in a business scenario Diagram an arc constraint to represent an exclusive OR relationship Distinguish between the use of an arc and a subtype in the data model

Copyright 2010, Oracle. All rights reserved.

Arcs

Why Learn It?


Purpose Arcs in data modeling help designers clarify an exclusive OR across relationships. The more explicitly you can define the client's requirements, the more accurate your final implementation will be.

Copyright 2010, Oracle. All rights reserved.

Arcs

Tell Me / Show Me
What is a Constraint? Every business has restrictions on which attribute values and which relationships are allowed. These restrictions are called constraints. They may refer to a single attribute of an entity, or to relationships between entities. We already know about several kinds of constraint, for example: every EMPLOYEE must work in one and only one DEPARTMENT. In this lesson we will see another kind of constraint: an exclusive OR constraint.

Copyright 2010, Oracle. All rights reserved.

Arcs

Tell Me / Show Me
Exclusive OR Relationships Mutually exclusive relationships (sometimes called exclusive OR relationships) often exist. For example: A billboard is an advertising space that can feature a movie, a product, or a public announcement. It may contain advertising about only one of these at a time. Each feature has its own characteristics or attributes.
BILLBOARD # number * size * location feature featured on MOVIE # title o opening date

feature

PRODUCT ADVERTISEMENT featured # name on

feature

PUBLIC ANNOUNCEMENT featured # message on

Copyright 2010, Oracle. All rights reserved.

Arcs

Tell Me / Show Me
DJs on Demand Business Scenario The DJ business has a mutually exclusive relationship between EVENT and VENUE.

sdm_s07_l03_a01

Copyright 2010, Oracle. All rights reserved.

Arcs

Tell Me / Show Me
Representing Exclusive OR Relationships in the ERD Arcs are a way to represent mutually exclusive relationships in the ERD. The arc represents the exclusive OR relationship -each EVENT must be held at one PRIVATE HOME or must be held at one PUBLIC SPACE, but not both.
EVENT # id * cost * name * date o description

held at

held at

the venue for PRIVATE HOME # id * address o comments

the venue for PUBLIC SPACE # id * address * rental fee o comments

Copyright 2010, Oracle. All rights reserved.

Arcs

Tell Me / Show Me
Arcs
An arc always belongs to one entity. Arcs can include more than two relationships. Not all relationships of an entity need to be included in an arc. An entity may have several arcs. An arc should always consist of relationships of the same optionality: All relationships in an arc must be mandatory or all must be optional. Relationships in an arc may be of different degree, although this is rare.
USER

LIST

is referred to
container of is referred to

referring to LIST ITEM

contained in

referring to

Copyright 2010, Oracle. All rights reserved.

Arcs

Tell Me / Show Me
Arcs (continued) Examine the following example.

Copyright 2010, Oracle. All rights reserved.

Arcs

Tell Me / Show Me
Arcs, Supertypes, and Subtypes Arcs can sometimes be drawn as supertypes or subtypes.
EVENT # id * cost * name * date o description

held at

the venue for

VENUE # id * address o comments

PRIVATE HOME o accessibility feature?

PUBLIC SPACE * rental fee

Copyright 2010, Oracle. All rights reserved.

10

Arcs

Tell Me / Show Me
Arcs, Supertypes, and Subtypes (continued) Supertypes and subtypes can sometimes be drawn as arcs. The supertype PARTNER in the DJ model is represented as an arc in this diagram.

Copyright 2010, Oracle. All rights reserved.

11

Arcs

Tell Me / Show Me
Terminology Key terms used in this lesson include: Arc Constraint Exclusive OR relationship Mutually exclusive relationship

Copyright 2010, Oracle. All rights reserved.

12

Arcs

Summary
Objectives Summarized In this lesson, you have learned how to: Define the term "constraint" as it applies to data modeling Identify an exclusive OR relationship in a business scenario Diagram an arc constraint to represent an exclusive OR relationship Distinguish between the use of an arc and a subtype in the data model

Copyright 2010, Oracle. All rights reserved.

13

Arcs

Summary
Practice Guide The link for the lesson practice guide can be found in the course resources in Section 0.

Copyright 2010, Oracle. All rights reserved.

14

Вам также может понравиться