bdoo parte1 ingles

19
Área de Computación e Informática Bases de Datos B Object Oriented Databases Dra. Sandra Edith Nava Muñoz [email protected]

Upload: jose-alcantar

Post on 24-Dec-2015

220 views

Category:

Documents


1 download

DESCRIPTION

Base de datos

TRANSCRIPT

Page 1: BDOO Parte1 Ingles

Área de Computación e Informática

Bases de Datos B

Object Oriented Databases

Dra. Sandra Edith Nava Muñoz [email protected]

Page 2: BDOO Parte1 Ingles

Review of Object-Oriented Concepts

Ø ¿What is a class?

Ø ¿What is an object?

Ø ¿What is a method?

Ø ¿What is inheritance?

Ø ¿What is polymorphism?

Page 3: BDOO Parte1 Ingles

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.

Page 4: BDOO Parte1 Ingles

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.

Page 5: BDOO Parte1 Ingles

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.

Page 6: BDOO Parte1 Ingles

Clases v  Agrupa objetos con similar comportamiento.

v  Contiene el código para procesar mensajes recibidos por objetos del grupo. Un procedimiento que responde a un mensaje recibe el nombre de método.

v  Las clases están dispuestas en una jerarquía. El diseñador crea subclases por especialización, lo cual especifica atributos y métodos adicionales para una clase existente.

Page 7: BDOO Parte1 Ingles

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-account- number, };

Class Hierarchies

Page 8: BDOO Parte1 Ingles

Class Design Creating Class

Person

+pers_id: int;

Person(pers_id:int)

Diagram in UML

Code class Person {

public:

int pers_id;

Person(int id) {

pers_id = id; }

};

Page 9: BDOO Parte1 Ingles

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

Page 10: BDOO Parte1 Ingles

OODB Benefits •  EXTENSIBILITY •  INHERITANCE •  TYPE CHECKING •  IMPROVES THE PRODUCTIVITY OF

DEVELOPERS •  HIGH LEVEL ACCESS •  INTEGRITY •  SECURITY

Page 11: BDOO Parte1 Ingles

ODMG Object Data Management Group

Estandar ODMG 2.0

•  Object Model

•  Object Definition Language (ODL)

•  Object Query Language (OQL)

•  Constraints

Page 12: BDOO Parte1 Ingles

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{ ... };

ODMG Notation

Page 13: BDOO Parte1 Ingles
Page 14: BDOO Parte1 Ingles
Page 15: BDOO Parte1 Ingles

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;

};

Page 16: BDOO Parte1 Ingles

Lecturas Complementarias

•  Creación de una base de datos de jurisprudencia constitucional, orientada a objetos http://hess-cr.blogspot.mx/2008/08/creacin-de-una-base-de-datos-de.html

•  Artículos de Bases de Datos Orientadas a Objetos http://www.service-architecture.com/object-oriented-databases/articles/

index.html •  Introducción a los SGBDOO

http://di002.edv.uniovi.es/ioos/publications/oodbms/oviedo96-2.pdf

Page 17: BDOO Parte1 Ingles

Posibles plataformas a utilizar •  PostgreSQL http://www.postgresql.org/ •  Db4o http://www.db4o.com/ •  Sav ZBase 8.0 http://downloads.yahoo.com/software/windows-office-productivity-sav-zbase-s32883 Informix http://www-01.ibm.com/software/data/informix/

+ encontradas

Page 18: BDOO Parte1 Ingles

Bibliografía

•  Procesamiento de Bases de Datos David Kroenke 8a. Edición Pearson •  Database Systems Peter Rob, Carlos Coronel 5th. Edition Thomson Learning

Page 19: BDOO Parte1 Ingles

Bibliografía

•  Fundamentos de Sistemas de Bases de Datos Elmasri, Navathe 3a. Edición Addison Wesley • Database Systems Garcia-Molina, Ullman, Widom 2002 Prentice Hall