Data%20Models:%20Degrees%20of%20Data%20Abstraction - PowerPoint PPT Presentation

About This Presentation
Title:

Data%20Models:%20Degrees%20of%20Data%20Abstraction

Description:

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel ... Address into street, city, zip. Single-valued. Occurs only once for each ... – PowerPoint PPT presentation

Number of Views:200
Avg rating:3.0/5.0
Slides: 18
Provided by: roger261
Category:

less

Transcript and Presenter's Notes

Title: Data%20Models:%20Degrees%20of%20Data%20Abstraction


1
Data Models Degrees of Data Abstraction
  • Modified ANSI/SPARC Framework

2
Data Models
  • Conceptual
  • Relatively simple representation of complex
    real-world data structures
  • Global view of data
  • Basis for identification and description of main
    data items
  • ERD used to represent conceptual data model
  • Hardware and software independent
  • Internal
  • Representation of database as seen by DBMS
  • Adapts conceptual model to specific DBMS
  • Software dependent

3
Data Models (cont.)
  • External
  • Users views of data environment
  • Provides subsets of internal view
  • Makes application program development easier
  • Facilitates designers tasks
  • Provides a reality check for the conceptual
    model
  • Ensures security constraints in design
  • Physical
  • Lowest level of abstraction
  • Software and hardware dependent
  • Requires definition of physical storage devices
    and access methods

4
The Entity Relationship (E-R) Model
  • Represents conceptual view
  • Main Components
  • Entities
  • Correspond to entire tables, not rows
  • Technically, known as entity types
  • Represented by rectangles
  • Attributes
  • Relationships

5
Attributes
  • Characteristics of entities
  • Domain is set of possible values
  • Primary keys underlined

Figure 3.6
6
Attributes (cont.)
  • Simple
  • Cannot be subdivided
  • Age, sex, marital status
  • Composite
  • Can be subdivided into additional attributes
  • Address into street, city, zip
  • Single-valued
  • Occurs only once for each instance
  • Person has one social security number
  • Multi-valued
  • Multiple values possible for each instance of an
    entity
  • Person may have several college degrees
  • Derived
  • Can be derived with algorithm
  • May or may not be stored
  • Age can be derived from date of birth

7
Relationships
  • Associations between entities
  • Connected entities are called participants
  • Operate in both directions
  • Relationship classification
  • Degree binary, ternary (unusual), unary
    (recursive)
  • 11, 1M, MN (connectivity (?), cardinality
    (?))
  • Number of entity instances associated with one
    occurrence of related entity
  • Relationships may have attibutes

8
Relationship Degree
  • Indicates number of associated entities
  • Unary
  • Single entity
  • Recursive
  • Exists between occurrences of same entity set
  • Binary
  • Two entities associated
  • Ternary
  • Three entities associated

9
Three Types of Relationships
Figure 3.21
10
Another Ternary Relationship
Leases
Staff
Property
Renter
11
Connectivity and Cardinality in an ERD
Figure 3.12
12
Relationship with Attribute
HoursWorked
WorksAt
Staff
Branch
13
Relationship Strength
  • Existence dependence
  • Entitys existence depends on existence of
    related entities
  • Existence-independent entities can exist apart
    from related entities
  • EMPLOYEE claims DEPENDENT
  • Weak (non-identifying)
  • One entity is existence-independent on another
  • PK of related entity doesnt contain PK component
    of parent entity
  • Strong (identifying)
  • One entity is existence-dependent on another
  • PK of related entity contains PK component of
    parent entity

14
Relationship Participation
  • Optional
  • Entity occurrence does not require a
    corresponding occurrence in related entity
  • Shown by drawing a small circle on side of
    optional entity on ERD
  • Mandatory
  • Entity occurrence requires corresponding
    occurrence in related entity
  • If no optionality symbol is shown on ERD, it is
    mandatory

15
Weak Entity
  • Existence-dependent on another entity
  • Has primary key that is partially or totally
  • derived from parent entity

Figure 3.19
16
Composite Entities
  • Used to bridge between MN relationships
  • Bridge entities composed of primary keys of each
    entity needing connection

Figure 3.30
17
Composite Entities (cont.)
Figure 3.31
Write a Comment
User Comments (0)
About PowerShow.com