Docsity

Data Modeling - Database Management - Lecture Slides, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Data Modeling - Database Management - Lecture Slides and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Data Modeling

Objectives

  • Explain the concept and practical use of data modeling.
  • Recognize which relationships in the business environment are unary, binary, and ternary relationships.
  • Describe one-to-one, one-to-many, and many-to- many unary, binary, and ternary relationships.

Essence of Data Modeling

  • Exploring the different ways that entities can relate to each other as they always do in the real world
  • Devising a way of recording, of diagramming, the entities and the ways in which they interrelate in the business environment

Entity-Relationship (E-R) Model

  • A diagramming technique
  • Diagrams entities (with attributes) and the relationship between the entities.
  • There are many variations of E-R diagrams in use.

E-R Model Entity (and its attributes)

  • Entity type’s attributes are shown below the separator line.
  • An asterisk denotes attribute(s) that constitute the entity type’s unique identifier.

Relationships

  • Associations between entities
  • Different kinds:
    • Binary relationships
    • Unary relationships
    • Ternary relationships

Cardinality

  • Represents the maximum number of entities that can be involved in a particular relationship. - One-to-One Binary Relationship - One-to-Many Binary Relationship - Many-to-Many Binary Relationship

One-to-One Binary Relationship

  • A single occurrence of one entity type can be associated with a single occurrence of the other entity type and vice versa.

Many-to-Many Binary Relationship

• M-M

  • “many” can be either an exact number or have a known maximum.

Cardinality

Cardinality & Modality

Intersection Data

  • Describes the relationship between two entities.
  • Used with many-to-many relationships.
  • Represented on E-R diagram in a special five-sided intersection data box, which is attached to the relationship diamond between the two entity boxes.

Associative Entity

  • Entities can have attributes; many-to-many relationships can have attributes.
  • Many-to-many relationship may be treated similarly to entities in an E-R diagram.

Associative Entity

  • Should you diagram as associative entity or many-to-many relationship? - personal taste - follow company standards
  • The unique identifier of the associative entity is usually the combination of the unique identifiers of the two entities in the many-to- many relationship.