SlideShare una empresa de Scribd logo
1 de 2
Descargar para leer sin conexión
Una agencia de viajes en internet ha diseñado su base de datos para la gestión de las compras de
paquetes turísticos, con las siguientes entidades (aquéllas que tienen identificador, éste va marcado
en negrita; nótese que algunas entidades no tienen identificador, son especializaciones):

PAÍS (nombre)
CIUDAD (nombre)
LUGAR_INTERÉS (nombre, dirección, horario)
TIPO_LUGAR (descripción)
PERSONA (número, DNI, nombre)
CLIENTE (email, dirección, tlf)
ACOMPAÑANTE ()
VIAJE (id, del, al, preciounit)
COMPRA (número, fecha, numTarjeta)
CANCELACIÓN (fecha, importeDevolución)
SEGURO (tipo, cobertura, precio)
BILLETEAVIÓN (localizador, fecha, aeropSalida, aeropLlegada)
FACTURA (número, fechas, numTarjeta, concepto, importe, impuestos)
TARJETA (compañía)

Relaciones:

Card(CIUDAD, del) = (1, 1)                       Card(COMPRA, el) = (0, 1)
Card(PAÍS, del) = (0, N)                         Card(VIAJE, el) = (0, 1)
Card(LUGAR_INTERÉS, está_en) = (1, 1)            Card(VIAJE, visita) = (1, N)
Card(CIUDAD, está_en) = (0, N)                   Card(CIUDAD, visita) = (0, N)
Card(LUGAR_INTERÉS, es_de) = (0, 1)              Card(COMPRA, con) = (1, 1)
Card(TIPO, es_de) = (0, N)                       Card(TARJETA, con) = (0, N)
Card(PERSONA, subtipo1) = (0, 1)                 Card(FACTURA, paga) = (1, 1)
Card(CLIENTE, subtipo1) = (1, 1)                 Card(COMPRA, paga) = (0, 1)
Card(PERSONA, subtipo2) = (0, 1)                 Card(COMPRA, subtipo3) = (0, 1)
Card(ACOMPAÑANTE, subtipo2) = (1, 1)             Card(CANCELACIÓN, subtipo3) = (1, 1)
Card(CLIENTE, realiza) = (0, N)                  Card(CLIENTE, prefiere) = (0, N)
Card(COMPRA, realiza) = (1, 1)                   Card(CIUDAD, prefiere) = (0, N)
                                                 Card(TIPO_LUGAR, prefiere) = (0, N)
Card(ACOMPAÑANTE, acompaña) = (1, 1)
                                                 Card( (CLIENTE, CIUDAD), prefiere) = (0, N)
Card(COMPRA, acompaña) = (0, N)
                                                 Card( (CLIENTE, TIPO_LUGAR), prefiere) = (0, 1)
Card(COMPRA, incluye) = (0, N)                   Card( (CIUDAD, TIPO_LUGAR), prefiere) = (0, 1)
Card(SEGURO, incluye ) = (0, N)
Card(COMPRA, emite) = (0, N)
Card(BILLETEAVIÓN, emite) = (1, N)

Además, los viajes visitan las ciudades en un determinado orden (1, 2, 3, ...) y con un modo de
transporte (cadena de caracteres descriptiva); ambos atributos carecen de restricciones aparte de las
de dominio

CONFECCIONA EL ESQUEMA LÓGICO DE ESTA BASE DE DATOS RELACIONAL
PAÍS (nombre) CP (nombre)
CIUDAD (país, nombre) CP (país, nombre) CAj (país) → PAÍS1
LUGAR_INTERÉS (país, ciudad, nombre, dirección, horario, tipo_lugar)
CP (país, ciudad, nombre) CAj (país, ciudad) → CIUDAD CAj (tipo_lugar) → TIPO
TIPO (descripción) CP (descripción)
PERSONA (número, DNI, nombre) CP (número)
CLIENTE (número, email, tlf) CP (número) CAj (número) → PERSONA
ACOMPAÑANTE (número, compra)
CP (número)
CAj (número) → PERSONA
CAj (compra) → COMPRA VNN
COMPRA (número, fecha, numTarjeta, cliente, tarjeta)
CP (número)
CAj (cliente) → CLIENTE VNN
CAj (tarjeta) → TARJETA VNN
CANCELACIÓN (compra, fecha, importeDevolución)
CP (compra)
CAj (compra) → COMPRA
SEGURO (tipo, cobertura, precio) CP (tipo)
INCLUYE (compra, seguro)
CP (compra, seguro)
CAj (compra) → COMPRA
CAj (seguro) → SEGURO
BILLETEAVIÓN (localizador, fecha, aeropSalida, aeropLlegada) CP (localizador)
EMITE (compra, billetea)
CP (compra, billetea)2
CAj (compra) → COMPRA
CAj (billetea) → BILLETEAVIÓN
VIAJE (id, del, al, preciounit) CP (id)
EL (compra, viaje)
CP (compra)
CAlt (viaje)3
CAj (compra) → COMPRA
CAj (viaje) → VIAJE
VISITA (país, ciudad, viaje)
CP (país, ciudad, viaje, orden, modotransporte)
CAj (país, ciudad) → CIUDAD
CAj (viaje) → VIAJE
TARJETA (compañía) CP (compañía)
FACTURA (número, fechas, numTarjeta, concepto, importe, impuestos, compra)
CP (número)
CAlt (compra)
CAj (compra) → COMPRA
PREFIERE (país, ciudad, cliente, tipo_lugar)
CP (país, ciudad, tipo_lugar)
CAlt (cliente, tipo_lugar)
CAj (tipo_lugar) → TIPO
CAj (cliente) → CLIENTE
CAj (país, ciudad) → CIUDAD



1
  Hemos decidido, por nuestra cuenta, representar una dependencia de identificador. También en LUGAR_INTERÉS.
2
  En el modelo relacional no se puede representar (1,N)
3
  Las correspondencias entre VIAJE y COMPRA son erróneas, o se está introduciendo redundancia de datos en VIAJE (necesita
normalización), o un cliente suele comprar aviones enteros, o el negocio es ruinoso.

Más contenido relacionado

Último

tics en la vida cotidiana prepa en linea modulo 1.pptx
tics en la vida cotidiana prepa en linea modulo 1.pptxtics en la vida cotidiana prepa en linea modulo 1.pptx
tics en la vida cotidiana prepa en linea modulo 1.pptxazmysanros90
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfsoporteupcology
 
dokumen.tips_36274588-sistema-heui-eui.ppt
dokumen.tips_36274588-sistema-heui-eui.pptdokumen.tips_36274588-sistema-heui-eui.ppt
dokumen.tips_36274588-sistema-heui-eui.pptMiguelAtencio10
 
El uso delas tic en la vida cotidiana MFEL
El uso delas tic en la vida cotidiana MFELEl uso delas tic en la vida cotidiana MFEL
El uso delas tic en la vida cotidiana MFELmaryfer27m
 
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...FacuMeza2
 
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptx
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptxCrear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptx
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptxNombre Apellidos
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdfIsabellaMontaomurill
 
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptxMedidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptxaylincamaho
 
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...JaquelineJuarez15
 
Hernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptxHernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptxJOSEMANUELHERNANDEZH11
 
ejercicios pseint para aprogramacion sof
ejercicios pseint para aprogramacion sofejercicios pseint para aprogramacion sof
ejercicios pseint para aprogramacion sofJuancarlosHuertasNio1
 
Presentación inteligencia artificial en la actualidad
Presentación inteligencia artificial en la actualidadPresentación inteligencia artificial en la actualidad
Presentación inteligencia artificial en la actualidadMiguelAngelVillanuev48
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesFundación YOD YOD
 
El uso de las TIC's en la vida cotidiana.
El uso de las TIC's en la vida cotidiana.El uso de las TIC's en la vida cotidiana.
El uso de las TIC's en la vida cotidiana.241514949
 
Actividad integradora 6 CREAR UN RECURSO MULTIMEDIA
Actividad integradora 6    CREAR UN RECURSO MULTIMEDIAActividad integradora 6    CREAR UN RECURSO MULTIMEDIA
Actividad integradora 6 CREAR UN RECURSO MULTIMEDIA241531640
 
definicion segun autores de matemáticas educativa
definicion segun autores de matemáticas  educativadefinicion segun autores de matemáticas  educativa
definicion segun autores de matemáticas educativaAdrianaMartnez618894
 
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfPARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfSergioMendoza354770
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)GDGSucre
 
SalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersSalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersIván López Martín
 
Plan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docxPlan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docxpabonheidy28
 

Último (20)

tics en la vida cotidiana prepa en linea modulo 1.pptx
tics en la vida cotidiana prepa en linea modulo 1.pptxtics en la vida cotidiana prepa en linea modulo 1.pptx
tics en la vida cotidiana prepa en linea modulo 1.pptx
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdf
 
dokumen.tips_36274588-sistema-heui-eui.ppt
dokumen.tips_36274588-sistema-heui-eui.pptdokumen.tips_36274588-sistema-heui-eui.ppt
dokumen.tips_36274588-sistema-heui-eui.ppt
 
El uso delas tic en la vida cotidiana MFEL
El uso delas tic en la vida cotidiana MFELEl uso delas tic en la vida cotidiana MFEL
El uso delas tic en la vida cotidiana MFEL
 
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
 
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptx
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptxCrear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptx
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptx
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdf
 
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptxMedidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
 
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...
 
Hernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptxHernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptx
 
ejercicios pseint para aprogramacion sof
ejercicios pseint para aprogramacion sofejercicios pseint para aprogramacion sof
ejercicios pseint para aprogramacion sof
 
Presentación inteligencia artificial en la actualidad
Presentación inteligencia artificial en la actualidadPresentación inteligencia artificial en la actualidad
Presentación inteligencia artificial en la actualidad
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento Protégeles
 
El uso de las TIC's en la vida cotidiana.
El uso de las TIC's en la vida cotidiana.El uso de las TIC's en la vida cotidiana.
El uso de las TIC's en la vida cotidiana.
 
Actividad integradora 6 CREAR UN RECURSO MULTIMEDIA
Actividad integradora 6    CREAR UN RECURSO MULTIMEDIAActividad integradora 6    CREAR UN RECURSO MULTIMEDIA
Actividad integradora 6 CREAR UN RECURSO MULTIMEDIA
 
definicion segun autores de matemáticas educativa
definicion segun autores de matemáticas  educativadefinicion segun autores de matemáticas  educativa
definicion segun autores de matemáticas educativa
 
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfPARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)
 
SalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersSalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 Testcontainers
 
Plan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docxPlan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docx
 

Destacado

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Destacado (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Sesión16.bd viajes

  • 1. Una agencia de viajes en internet ha diseñado su base de datos para la gestión de las compras de paquetes turísticos, con las siguientes entidades (aquéllas que tienen identificador, éste va marcado en negrita; nótese que algunas entidades no tienen identificador, son especializaciones): PAÍS (nombre) CIUDAD (nombre) LUGAR_INTERÉS (nombre, dirección, horario) TIPO_LUGAR (descripción) PERSONA (número, DNI, nombre) CLIENTE (email, dirección, tlf) ACOMPAÑANTE () VIAJE (id, del, al, preciounit) COMPRA (número, fecha, numTarjeta) CANCELACIÓN (fecha, importeDevolución) SEGURO (tipo, cobertura, precio) BILLETEAVIÓN (localizador, fecha, aeropSalida, aeropLlegada) FACTURA (número, fechas, numTarjeta, concepto, importe, impuestos) TARJETA (compañía) Relaciones: Card(CIUDAD, del) = (1, 1) Card(COMPRA, el) = (0, 1) Card(PAÍS, del) = (0, N) Card(VIAJE, el) = (0, 1) Card(LUGAR_INTERÉS, está_en) = (1, 1) Card(VIAJE, visita) = (1, N) Card(CIUDAD, está_en) = (0, N) Card(CIUDAD, visita) = (0, N) Card(LUGAR_INTERÉS, es_de) = (0, 1) Card(COMPRA, con) = (1, 1) Card(TIPO, es_de) = (0, N) Card(TARJETA, con) = (0, N) Card(PERSONA, subtipo1) = (0, 1) Card(FACTURA, paga) = (1, 1) Card(CLIENTE, subtipo1) = (1, 1) Card(COMPRA, paga) = (0, 1) Card(PERSONA, subtipo2) = (0, 1) Card(COMPRA, subtipo3) = (0, 1) Card(ACOMPAÑANTE, subtipo2) = (1, 1) Card(CANCELACIÓN, subtipo3) = (1, 1) Card(CLIENTE, realiza) = (0, N) Card(CLIENTE, prefiere) = (0, N) Card(COMPRA, realiza) = (1, 1) Card(CIUDAD, prefiere) = (0, N) Card(TIPO_LUGAR, prefiere) = (0, N) Card(ACOMPAÑANTE, acompaña) = (1, 1) Card( (CLIENTE, CIUDAD), prefiere) = (0, N) Card(COMPRA, acompaña) = (0, N) Card( (CLIENTE, TIPO_LUGAR), prefiere) = (0, 1) Card(COMPRA, incluye) = (0, N) Card( (CIUDAD, TIPO_LUGAR), prefiere) = (0, 1) Card(SEGURO, incluye ) = (0, N) Card(COMPRA, emite) = (0, N) Card(BILLETEAVIÓN, emite) = (1, N) Además, los viajes visitan las ciudades en un determinado orden (1, 2, 3, ...) y con un modo de transporte (cadena de caracteres descriptiva); ambos atributos carecen de restricciones aparte de las de dominio CONFECCIONA EL ESQUEMA LÓGICO DE ESTA BASE DE DATOS RELACIONAL
  • 2. PAÍS (nombre) CP (nombre) CIUDAD (país, nombre) CP (país, nombre) CAj (país) → PAÍS1 LUGAR_INTERÉS (país, ciudad, nombre, dirección, horario, tipo_lugar) CP (país, ciudad, nombre) CAj (país, ciudad) → CIUDAD CAj (tipo_lugar) → TIPO TIPO (descripción) CP (descripción) PERSONA (número, DNI, nombre) CP (número) CLIENTE (número, email, tlf) CP (número) CAj (número) → PERSONA ACOMPAÑANTE (número, compra) CP (número) CAj (número) → PERSONA CAj (compra) → COMPRA VNN COMPRA (número, fecha, numTarjeta, cliente, tarjeta) CP (número) CAj (cliente) → CLIENTE VNN CAj (tarjeta) → TARJETA VNN CANCELACIÓN (compra, fecha, importeDevolución) CP (compra) CAj (compra) → COMPRA SEGURO (tipo, cobertura, precio) CP (tipo) INCLUYE (compra, seguro) CP (compra, seguro) CAj (compra) → COMPRA CAj (seguro) → SEGURO BILLETEAVIÓN (localizador, fecha, aeropSalida, aeropLlegada) CP (localizador) EMITE (compra, billetea) CP (compra, billetea)2 CAj (compra) → COMPRA CAj (billetea) → BILLETEAVIÓN VIAJE (id, del, al, preciounit) CP (id) EL (compra, viaje) CP (compra) CAlt (viaje)3 CAj (compra) → COMPRA CAj (viaje) → VIAJE VISITA (país, ciudad, viaje) CP (país, ciudad, viaje, orden, modotransporte) CAj (país, ciudad) → CIUDAD CAj (viaje) → VIAJE TARJETA (compañía) CP (compañía) FACTURA (número, fechas, numTarjeta, concepto, importe, impuestos, compra) CP (número) CAlt (compra) CAj (compra) → COMPRA PREFIERE (país, ciudad, cliente, tipo_lugar) CP (país, ciudad, tipo_lugar) CAlt (cliente, tipo_lugar) CAj (tipo_lugar) → TIPO CAj (cliente) → CLIENTE CAj (país, ciudad) → CIUDAD 1 Hemos decidido, por nuestra cuenta, representar una dependencia de identificador. También en LUGAR_INTERÉS. 2 En el modelo relacional no se puede representar (1,N) 3 Las correspondencias entre VIAJE y COMPRA son erróneas, o se está introduciendo redundancia de datos en VIAJE (necesita normalización), o un cliente suele comprar aviones enteros, o el negocio es ruinoso.