UNARY RELATIONSHIP - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

UNARY RELATIONSHIP

Description:

GERUNDS. A gerund (sometimes called a composite entity) is a many-to-many relationship ... GERUNDS. Cardinalities in Relationships ... – PowerPoint PPT presentation

Number of Views:142
Avg rating:3.0/5.0
Slides: 19
Provided by: michaelmf
Category:

less

Transcript and Presenter's Notes

Title: UNARY RELATIONSHIP


1
UNARY RELATIONSHIP
Manages
Is Married to
EMPLOYEE
PERSON
One-to-One
One-to-Many
2
BINARY RELATIONSHIP
Is Assigned
EMPLOYEE
PARKING PLACE
One-to-one
Contains
PRODUCT LINE
PRODUCT
One-to-many
Registers for
STUDENT
COURSE
Many-to-many
3
TERNARY RELATIONSHIP
PART
Ships
VENDOR
WAREHOUSE
QUANTITY
4
GERUNDS
  • A gerund (sometimes called a composite entity) is
    a many-to-many relationship that the data modeler
    chooses to model as an entity type with several
    associated one-to-many relationships.
  • Example

5
GERUNDS
VENDOR
PART
SHIPMENT NO.
QUANTITY
SHIPMENT
WAREHOUSE
6
Cardinalities in Relationships
  • The cardinality of a relationship is the number
    of instances of entity B that can (or must) be
    associated with each instance of entity A.
  • Example

Is Stocked as
MOVIE COPY
MOVIE
7
Minimum and Maximum Cardinalities
  • The minimum cardinality of a relationship is the
    minimum number of instances of entity B that may
    be associated with each instance of entity A.
  • The maximum cardinality of a relationship is the
    maximum number of instances.
  • Example

8
Has
PATIENT
PATIENT HISTORY
a) Mandatory cardinalities
Is Assigned to
EMPLOYEE
PROJECT
b) One optional, one mandatory cardinality
Is Married to
PERSON
c) Optional cardinalities
9
Existence Dependency and Weak Entity
  • Existence dependency means that an instance of
    one entity cannot exist without the existence of
    an instance of some other (related) entity.
  • A weak entity is an entity type that has an
    existence dependency.

10
Identifying Relationship
  • An identifying relationship is one in which the
    primary key of the parent entity is used as part
    of the primary key of the dependent entity.
  • Two benefits of an Identifying Relationship
  • Data Integrity. Existence dependencies are
    enforced since the primary is shared.
  • Ease of access of the dependent entity.
  • Example

11
MOVIE NO.
MOVIE NAME
COPY NO.
MOVIE NO.
Is Stocked as
MOVIE
MOVIE COPY
Identifying Relationships
12
Summary of Symbols Used in E-R Notation
  • Basic Symbols

ATTRIBUTE
ENTITY
PRIMARY KEY
RELATIONSHIP
MULTIVALUED ATTRIBUTE
GERUND
13
RELATIONSHIP DEGREE
Unary
TERNARY
Is Assigned
EMPLOYEE
PARKING PLACE
Binary
14
Relationship Cardinality
Mandatory 1 cardinality
Many (M) cardinality (1,2, many)
Optional 0 or 1 cardinality
Optional zero-many cardinality (0,1,2,,many)
15
Class-subclass relationship
ISA
Exclusive relationship
16
Alternative E-R Notation
17
Alternative E-R Notation (contd.)
18
Alternative E-R Notation (contd.)
Write a Comment
User Comments (0)
About PowerShow.com