Database Management - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Database Management

Description:

Car Rental Agency Example. CUSTOMER. custid. custname ... Problem: where does car rental information belong? A ternary relationship... (Watson, Chapter 7) ... – PowerPoint PPT presentation

Number of Views:109
Avg rating:3.0/5.0
Slides: 16
Provided by: Nei7
Category:

less

Transcript and Presenter's Notes

Title: Database Management


1
Database Management Fall 2003 Ternary
relationships and subtyping
2
Degree of relationship unary vs. binary vs.
ternary
3
Car Rental Agency Example
CUSTOMER
custid
custname
custaddress
4
Car Rental Agency Example
Problem where does car rental information belong?
5
A ternary relationship
(here, an associative entity implements a
ternary relationship)
(Watson, Chapter 7)
6
A non-ternary alternative
LEASE
AUTOMOBILE
AGENT
autoid (FK)
agentid
autoid
custid (FK)
. . .
leasedate (FK)
. . .
agentid
. . .
(this allows for the recording of a lease without
an agent more realistic)
Customer
custid
. . .
(Watson, Chapter 7)
7
Data modeling
  • A technique for modeling data
  • A graphical representation of a database
  • The goal is to identify the facts to be stored in
    the database
  • Data modeling is a partnership between the client
    and analyst

8
The building blocks
  • Entity
  • Attribute
  • Relationship
  • Identifier

9
Entity types
  • Independent
  • Dependent
  • Associative
  • Aggregate
  • Subordinate

10
Independent
  • Often a starting point
  • Prominent in the client's mind
  • Often related to other independent entities
  • Can exist on their own

11
Dependent
  • Relies on another entity for its existence and
    identification
  • Can become independent if given an arbitrary
    identifier

REGION
CITY
regname
cityname
regname
regpop
regarea
citypop
cityarea


12
Associative
  • A by-product of an mm relationship
  • Typically between independent entities
  • Can store current or historical data
  • Can become independent if given an arbitrary
    identifier

13
Aggregate
  • Created from several different entities that have
    a common prefix or suffix
  • Commonly used with addresses or names

14
Subordinate
  • An entity with data that can vary among instances
  • Map with one table for each entity
  • For each of the subtype entities the primary key
    is that of the supertype entity
  • You must also make this column a foreign key so
    that a subtype cannot be inserted without the
    presence of the matching supertype

15
Generalization, specialization, or subtyping
Watson shows
But well use
(Watson, Chapter 7)
Write a Comment
User Comments (0)
About PowerShow.com