Upload
lenguyet
View
225
Download
0
Embed Size (px)
Citation preview
Object-‐Rela+on Features
Sarajane Marques Peres, Ph.D. – University of São Paulo
www.each.usp.br/sarajane
Based on PostgreeSQL Documentation
Implementa)on -‐ PostgreSQL
• Inheritance
Object-‐rela)onal database management system -‐ ORDBMS
Inheritance
• Without inheritance
Inheritance • With inheritance
Inheritance
Inheritance
Inheritance
Inheritance
Inheritance
Inheritance
Inheritance
Inheritance
Inheritance -‐ Caveats • Commands that do database tunning typically only work on individual,
physical tables and do not support recursing over inheritance hierarchies (see vacuum and analyze)
Inheritance
ER Model Relational Model
ER Model
Relational Model
Complex types
Complex types
Complex types
Complex types
Methods (Oracle)
Methods (Oracle)
Example
Estúdios
rua cid.
rua cid.
rua cid.
ender. nome
vozes
Atores_2
arma
Mistérios
Desenhos
Filmes
salário
RefilmagemOriginal
refilmagem
gerência Presidentes
ender. nome
nome ender. tipo
duração
ano
título
produção
atuação Atores_1
Example
Relationa Model
Script (partial)
Example
Example
} Inser)ng tuples ….
Example
Without herança!
With herança!
Trabalhando com herança
Example
Example ...