Está en la página 1de 7

INFORME DE TRABAJO Nro.

2
DE DIAGRAMA CONCEPTUAL DE
ELABORACION
BASES DE DATOS ORIENTADO A OBJETOS
Edwin Callejas Pinto

BASE DE DATOS PARA UNA


EMPRESA DE CADENA DE
HOTELES
1.

ESQUEMA CONCEPTUAL

Se ha tomado como ejemplo la elaboracion de una base de datos para una cadena de hoteles,
cuyo diagrama conceptual es:

Figura 1: Diagrama conceptual de la BDOO de la cadena de hoteles

T2. Bases de datos Orientado a Objetos

2.

Edwin Callejas Pinto

DIAGRAMA DE CLASE
El diagrama de clase es:

Figura 2: Diagrama de clase de la BDOO de la cadena de hoteles

3.

DE LA BASE DE DATOS
DISENO

3.1

DE TIPOS DE DATOS
DEFINICION

define data type Direccion: tuple[calle: string, zona: string, ciudad:


string, numero:integer]
define data type Telefonos: set(integer)
define data type Fecha:tuple[a~
no:integer, mes:integer, dia:integer];

T2. Bases de datos Orientado a Objetos

3.2

Edwin Callejas Pinto

DE TIPOS DE OBJETOS
DEFINICION

Define object type Hotel extent Hoteles


type
tuple [ nombre: string,
nit: integer,
gerente:string,
nro_habitaciones: integer,
direccion: Direccion,
telefono: Telefonos
habitaciones set(Habitacion) inverse Habitacion:hot
]
operations
crear_nuevo_hotel: Hotel,
destruir_hotel(): Boolean,
a~
nadir_habitacion(h: Habitacion): boolean,
quitar_habitacion(h:Habitacion):boolean;

define object type Habitacion extent Las_Habitaciones


type
tuple [ numero: integer,
costo: real,
estado: boolean,
tipo: string,
nrocamas: integer,
nropiso:integer,
servicios: set(string)
hot: Hotel inverse Hotel: habitaciones
reservahab: Reserva inverse Reserva: listahabitaciones
]
operations
crear_nueva_habitacion: Habitacion,
destruir:habitaci
on(): boolean,
devolverEstado():boolean,
devolverNrocamas():integer,
devolverCosto(): real,
establecerEstado(),
establecerNrocamas(),
establecerCosto(),
mostrarServicios() ;
define object type Suit inherit Habitacion extent Suits
type
Tuple[ nombre: string,
telefono: integer
]

T2. Bases de datos Orientado a Objetos

Edwin Callejas Pinto

operations
crear_nueva_suit: Suit,
destruir_suit(): boolean;

define object type Huesped extent Huespedes


type
Tuple[
apellido_paterno: string,
apellido_materno:string,
nombres:string,
documento: string,
nrodocumento: string,
reservahab: Reserva inverse Reserva huespedTitular,
domicilio: Direccion,
tel
efono: Telefonos
]
operations
crear_nuevo_huesped: Huesped,
destruir_huesped(): boolean;
tiempo_de_estancia(): integer;
define objet type Nacional inherit Huesped extent Nacionales
type
nit: string
operations
crear_nuevo_huespedNacional: Nacional,
destruir_huespedNacional(): boolean;
define object type Extranjero inherit Huesped extent Extranjeros
type
tuple[
pais: string,
visa: boolean,
vencimiento: Fecha
]
operations
crear_nuevo_huespedExtranjero: Nacional,
destruir_huespedExtranjero(): boolean;
define object type Reserva
type
tuple[fechaReserva: Fecha,
fechaEntrada: Fecha,
fechaSalida: Fecha,

extent Reservas

T2. Bases de datos Orientado a Objetos

Edwin Callejas Pinto

huespedTitular: Huesped inverse Huesped: reservahab,


listahuespedes: set(Huesped),
listahabitaciones: set(Habitacion) inverse Habitacion: reservahab;
facturarelacionada: Factura inverse Factura: reser
montoReserva: Real
]
operations
crear_nueva_reserva: Reserva,
destruir_reserva(): boolean,
adicionarHuesped(h: Huesped):boolean,
eliminarHuesped(h: Huesped):boolean,
cancelarReserva(r: Reserva): boolean
define object type Factura extent Facturas
type
tuple[
nroFactura: Integer
fechaEmision: Fecha
total: Real
descripcion: set(string)
reser: Reserva inverse Reserva: facturarelacionada
operations
crear_nueva_factura: Reserva,
destruir_factura(): boolean;

Bibliografa
[1] Aguilar R. Base de datos orientado a objetos. Modulo II. Curso de Doctorado. Universidad
Nacional de Siglo XX. 2015.
[2] Elmarsi and Navathe. Fundamentos de Sistemas de bases de datos.Pearson Education. 2007.
[3] Mannino M. Administraci
on de bases de datos: dise
no y desarrollo de aplicaciones. McGrawHill. 3ra Ed. 2007.
[4] Silverschatz et.al. Fundamentos de bases de datos. McGrawHill. 5ta Ed. 2006.

También podría gustarte