OO RDBMS - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

OO RDBMS

Description:

OO RDBMS. Database Management Systems. Permanent self-descriptive ... Bury foreign key in table for many class. Advantages. Fewer tables. Better performance ... – PowerPoint PPT presentation

Number of Views:75
Avg rating:3.0/5.0
Slides: 22
Provided by: dickg
Category:
Tags: rdbms | bury

less

Transcript and Presenter's Notes

Title: OO RDBMS


1
OO ? RDBMS
2
Database Management Systems
  • Permanent self-descriptive repository of data
  • Motivations
  • Crash recovery
  • Sharing between users
  • Sharing between applications
  • Security
  • Integrity
  • Extensibility
  • Data distribution

3
Three Schema Architecture
4
Relational Database Concepts 1
  • Data represented as tables
  • Specific number of columns (attributes)
  • Arbitrary number of rows (tuples)
  • Operators
  • SQL set oriented
  • View
  • Virtual table that is dynamically computed as
    needed

5
Relational Database Concepts 2
  • Integrity
  • Entity integrity
  • Each table has exactly 1 primary key (combination
    of 1 or more attributes whose value unambiguously
    locates each row in a table)
  • Referential integrity
  • Each foreign key (primary key of 1 table embedded
    in another table) kept consistent with primary
    key
  • Normal forms
  • Rules developed to avoid logical inconsistencies
    from table update operations

6
Extended 3 Schema Architecture for Object Models
7
Object Ids
  • Possible to assign a unique id to each tuple in a
    table
  • Advantage
  • Independent of changes in data physical
    location
  • Disadvantages
  • Undermines RDBMS theory that says that data
    should be located manipulated based strictly on
    its attribute values

8
Mapping Classes to Tables
  • Each class maps to 1 or more tables
  • Objects in class may be partitioned
    horizontally (use multiple tables separation
    based on efficiency) or verically (writing 1
    tuple as multiple tuples)

9
Horizontal Partitioning
10
Vertical Partitioning
11
Mapping Binary Associations to Tables 1
  • Association may or may not map to a table
  • Many-to-many associations
  • Always map to a distinct table (satisfy third
    normal form)
  • Primary keys for both classes any link
    attributes become attributes of this new table

12
(No Transcript)
13
One to Many Associations 1
  • Distinct table for each association

14
One to Many Associations 2
  • Bury foreign key in table for many class
  • Advantages
  • Fewer tables
  • Better performance
  • Disadvantages
  • Lose design concept of an association
  • More complexity
  • Reduced reusability

15
(No Transcript)
16
One to Many Associations 3
  • Collapse both classes association into a single
    table
  • Least desirable alternative

17
One to One Associations
  • Same alternatives as 1 - many

18
Mapping Generalizations to Tables
  • Each class own table
  • Add field to parent class to denote which child
  • Each child class contains primary key of parent
  • Table for each child class
  • Copy attributes of parent class to each child
    class
  • One table for parent children
  • Each record only uses pertinent attributes

19
(No Transcript)
20
(No Transcript)
21
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com