rea de Computacin e
Informtica
Bases de Datos B
Object Oriented Databases
Dra. Sandra Edith Nava Muoz
senavam@uaslp.mx
Review of Object-Oriented
Concepts
What is a class?
What is an object?
What is a method?
What is inheritance?
What is polymorphism?
Exercise
Create the classes (with attributes) necessaries to the
next information:
We want to have information about films (title,
year of production, duration and type (black &
white or color). Each movie has many actors, of
which stores your name and address. An actor
can also participate in many movies.
Additionally we want to store the name and
address of the production studio as well as the
films that it is producing.
OODB
Its goal is to maintain a direct correspondence
between real-world objects and the database. So
these objects do not lose their integrity and identity,
and can easily identify and manipulate.
Objects can be temporary or persistent.
ODBMS objective is to provide a persistent object
storage. An object consists of data and methods.
Objects
A OODBMS provides unique identity to each
object stored in the database.
Object Identity (OID)
The main property is to be inmutable.
A type characterizes the behavior of its instances by the set of
operations associated with the type.
The state of an object is the set of values and relatioships of that
object.
Clases
v Agrupa objetos con similar comportamiento.
v Contiene el cdigo para procesar mensajes
recibidos por objetos del grupo. Un procedimiento
que responde a un mensaje recibe el nombre de
mtodo.
v Las clases estn dispuestas en una jerarqua. El
diseador crea subclases por especializacin, lo
cual especifica atributos y mtodos adicionales
para una clase existente.
Class Hierarchies
class person{
string name;
string address:
};
class customer isa person {
int credit-rating;
};
class employee isa person {
date start-date;
int salary;
};
class officer isa employee {
int office-number,
int expense-accountnumber,
};
Class Design
Creating Class
Code
Diagram in UML
class Person
Person
+pers_id: int;
{
public:
int pers_id;
Person(pers_id:int)
Person(int id) {
pers_id = id; }
};
Application areas
Computer Aided Design and Manufacturing
(CAD/CAM)
Computer Integrated Manufacturing (CIM)
Computer Aided Software Engineering (CASE)
Geographic Information Systems (GIS)
Science and Medicine
Document Storage and Retrieval
OODB Benefits
EXTENSIBILITY
INHERITANCE
TYPE CHECKING
IMPROVES THE PRODUCTIVITY OF
DEVELOPERS
HIGH LEVEL ACCESS
INTEGRITY
SECURITY
ODMG
Object Data Management Group
Estandar ODMG 2.0
Object Model
Object Definition Language (ODL)
Object Query Language (OQL)
Constraints
ODMG Notation
interface Time: Object{
unsigned short hour;
unsigned short minute;
unsigned short second;
unsigned short millisecond;
boolean is_equal (in Time other_Time);
Time add_interval (in Interval some_Interval);
};
interface Interval: Object{
...
};
A relationship in ODMG (ODL) may be
represented by inverse relationships, specifies by the
keyword relationship.
Class Empleado{
attribute string nombre;
attribute string nss;
...
relationship Departamento trabaja_para
inverse Departamento::tiene_emps;
};
Class Departamento{
attribute string nombred;
...
relationship set<Empleado> tiene_emps
inverse Empleado::trabaja_para;
};
Lecturas Complementarias
Creacin de una base de datos de jurisprudencia
constitucional, orientada a objetos
http://hess-cr.blogspot.mx/2008/08/creacin-de-una-base-de-datosde.html
Artculos de Bases de Datos Orientadas a Objetos
http://www.service-architecture.com/object-oriented-databases/articles/
index.html
Introduccin a los SGBDOO
http://di002.edv.uniovi.es/ioos/publications/oodbms/oviedo96-2.pdf
Posibles plataformas a utilizar
PostgreSQL
http://www.postgresql.org/
Db4o
http://www.db4o.com/
Sav ZBase 8.0
http://downloads.yahoo.com/software/windows-officeproductivity-sav-zbase-s32883
Informix
http://www-01.ibm.com/software/data/informix/
+ encontradas
Bibliografa
Procesamiento de Bases de Datos
David Kroenke
8a. Edicin
Pearson
Database Systems
Peter Rob, Carlos Coronel
5th. Edition
Thomson Learning
Bibliografa
Fundamentos de Sistemas
de Bases de Datos
Elmasri, Navathe
3a. Edicin
Addison Wesley
Database Systems
Garcia-Molina, Ullman, Widom
2002
Prentice Hall