SlideShare une entreprise Scribd logo
1  sur  16
INSTITUTO TECNOLGICO SUPERIOR DE ACATLAN DE OSORIOCreación de la Base de Datos  en MySql de:PESCA DEPORTIVAMateria: Fundamentos de Bases de DatosIntegrantes del equipo:Cariño Michaca RosarioEspinosa Clemente  MaricelaGil Martínez NancyLujan Guzmán MarielaMendoza Arellano IrisTapia Ortiz Ma. IsabelCarrera: Licenciatura en  InformáticaAsesor: Lic. Eloy Martínez Parra
Pesca deportiva
DEFINICIÓN DEL PROBLEMA: Es una asociación deportiva en la cual se lleva acabo en aguas dulces, dedicado a informatizar su gestión de socios, eventos y concursos. La asociación también denominada  “FISHERMEN TEAM”, cuenta con un conjunto de afiliados que participan en competiciones deportivas de pesca, ya que pueden ser organizadas por otras organizaciones privadas, publicas o del mismo tipo, o por ella misma. En cada competición debe conocerse la información de los afiliados participantes en dicho deporte.
	En este problema es necesario considerar, los siguientes puntos:  ,[object Object]
 Cada evento debe tener un nombre único.
 La asociación siempre debe tener la información de los lugares donde se lleva dicha practica o se ha practicado .,[object Object]
fecha Datos-personales afiliados licencias Fecha-evento licencia Fecha-pesca Fecha-evento Hora-pesca Nombre-pez Captura-solos peces Captura-eventos Od_pez cantidad peso nombre eventos capturas fecha Od_lugar comunidad nombre Od_evento Od_cause causes lugares
DIAGRAMA  DE TABLAS
CREACIÓN DE LA  BASE DE DATOS
mysql>createdatabasePesca_Deportiva; mysql> use Pesca_Deportiva; mysql> createtable Afiliados(Ficha int, Nombre_afiliadochar(50), Apellidos_afiliadochar(50), Direccion_afiliadochar(50), Telf_afiliadochar(30), Sexo_afiliadochar(20), Nacimiento_afiliado date, Od_afiliadochar(50), primarykey(Ficha)); mysql> create table Cauces(Cauce char(50), Od_Cauce char(50), primary key(Cauce)); mysql> create table Peces(Pez char(50), Od_pez char(50), primary key(Pez)); mysql> createtable Licencias(Licencia char(50), primarykey(Licencia)); mysql> createtable Lugares(Lugar char(50), Comunidad char(50), Cauce char(50),Od_lugarchar(50), primarykey(Lugar), constraintllaveforaneaforeignkey(Cauce) references Cauces(Cauce) ondeletecascade); mysql> createtable Eventos(Evento char(50), Fecha_evento date, Lugar char(50), Od_eventochar(50), primarykey(Evento), constraint llaveforanea1 foreignkey(Lugar) references Lugares(Lugar) ondeletecascade);
mysql> createtable Concursos(Evento char(50), Pez char(50), Tallaminchar(50), Numemaxchar(50), primarykey(Evento), constraint llaveforanea2 foreignkey(Evento) references Eventos(Evento) ondeletecascade,constraint llaveforanea3 foreignkey(Pez) references Peces(Pez) ondeletecascade); mysql> createtable Permisos(Ficha int, Licencia char(50), primarykey(Ficha), constraint llaveforanea4 foreignkey(Ficha) references Afiliados(Ficha) ondeletecascade,constraint llaveforanea5 foreignkey(Licencia) references Licencias(Licencia) ondeletecascade); mysql> createtable Faunas(Lugar char(50), Pez char(50), Tallamaxchar(50), Pesomaxchar(50),Numemaxchar(50), Tallaminchar(50), Veda date, primarykey(Lugar), constraint llaveforanea6 foreignkey(Lugar) references Lugares(Lugar) ondeletecascade, constraint llaveforanea7 foreignkey(Pez) references Peces(Pez) ondeletecascade); mysql> createtable Participaciones(Ficha int, Evento char(50), Posicionchar(10),Trofeo char(50), primarykey(Ficha), constraint llaveforanea8 foreignkey(Ficha) references Afiliados(Ficha) ondeletecascade, constraint llaveforanea9 foreignkey(Evento) references Eventos(Evento) ondeletecascade);
mysql> createtableCapturaSolos(Ficha int, Pez char(50), Lugar char(50), Fecha_pescachar(50), Hora_pescachar(50), Peso float, Talla int, primarykey(Ficha), constraint llaveforanea10 foreignkey(Ficha) references Afiliados(Ficha) ondeletecascade, constraint llaveforanea11 foreignkey(Pez) references Peces(Pez) ondeletecascade, constraint llaveforanea12 foreignkey(Lugar) references Lugares(Lugar) ondeletecascade); mysql> createtableCapturaEventos(Ficha int, Pez char(50), Evento char(50), Fecha_pescachar(50), Hora_pescachar(50), Peso float, Talla int, Puntos int, primarykey(Ficha), constraint llaveforanea13 foreignkey(Ficha) references Afiliados(Ficha) ondeletecascade, constraint llaveforanea14 foreignkey(Pez) references Peces(Pez) ondeletecascade, constraint llaveforanea15 foreignkey(Evento) references Eventos(Evento) ondeletecascade); mysql> insertinto afiliados values(250,'Dave','Johnson','Venustiano Carranza', 98634454,'masculino','18-08-83','Ha tenido mas de tres medallas'); mysql> insertinto peces values('trucha','es muy grande'); mysql> insertinto cauces values('rio magdalena', 'cauce de mayor extencion'); mysql> insertinto lugares values('playa palmilla', 'san jose del cabo', 'rio magdalena', 'convertido para convivir'); mysql> insertinto eventos values('1er torneo internacional P','15-06-2010','pla ya palmilla','se dan a conocer los competidores');
mysql> insertinto licencias values('CRFL'); mysql> insertinto permisos values(250,'CRFL'); mysql> insertinto participaciones values(250,'1er torneo internacional P','1erlugar','Copa gobernador'); mysql> insertinto Concursos values('1er torneo internacional P','trucha','50',21); mysql> insertinto Faunas values('playa palmilla','trucha','30',15.0,'21',28,'1 al 31 de mayo'); mysql> insertintocapturasolosvalues(250,'trucha', 'playa palmilla', ' 21-03-2010','7:00 am',15.0,60); mysql> insertintocapturaeventosvalues(250,'trucha','1er torneo internacional P','21-03-2010','7:00 am',15.0,28,'100'); mysql> create view fichita as select * from afiliados where ficha>600; mysql> createviewtam as select * from  faunas whereTallamax<30; mysql> createviewtrobomas select * from participaciones where Trofeo='$20000';
mysql> createviewpuntos as select * fromcapturaeventoswhere Puntos>=300; mysql> createviewHoraPez as select * fromcapturasoloswhereHora_pesca>='10:00 am'; MySql Navicat
CONCLUSIÓN   	Al crear esta base de datos aprendimos como resolver un problema mediante la elaboración de diagramas, la comparación E-R.  Así mismo fuimos introduciendo los    datos en cada tabla y diagrama para identificar  cual va hacer  nuestra llave primaria y las  llaves foráneas.

Contenu connexe

Dernier

Desarrollo Web Moderno con Svelte 2024.pdf
Desarrollo Web Moderno con Svelte 2024.pdfDesarrollo Web Moderno con Svelte 2024.pdf
Desarrollo Web Moderno con Svelte 2024.pdfJulian Lamprea
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx241521559
 
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
 
EPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveEPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveFagnerLisboa3
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricKeyla Dolores Méndez
 
Trabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíaTrabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíassuserf18419
 
Presentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxPresentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxLolaBunny11
 
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...silviayucra2
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan JosephBRAYANJOSEPHPEREZGOM
 
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
 
pruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITpruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITMaricarmen Sánchez Ruiz
 
9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudianteAndreaHuertas24
 
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIAWilbisVega
 

Dernier (13)

Desarrollo Web Moderno con Svelte 2024.pdf
Desarrollo Web Moderno con Svelte 2024.pdfDesarrollo Web Moderno con Svelte 2024.pdf
Desarrollo Web Moderno con Svelte 2024.pdf
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx
 
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)
 
EPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveEPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial Uninove
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
 
Trabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíaTrabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnología
 
Presentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxPresentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptx
 
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Joseph
 
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
 
pruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITpruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNIT
 
9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante
 
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
 

En vedette

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
 

En vedette (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...
 

Base de datos Pesca Deportiva

  • 1. INSTITUTO TECNOLGICO SUPERIOR DE ACATLAN DE OSORIOCreación de la Base de Datos en MySql de:PESCA DEPORTIVAMateria: Fundamentos de Bases de DatosIntegrantes del equipo:Cariño Michaca RosarioEspinosa Clemente MaricelaGil Martínez NancyLujan Guzmán MarielaMendoza Arellano IrisTapia Ortiz Ma. IsabelCarrera: Licenciatura en InformáticaAsesor: Lic. Eloy Martínez Parra
  • 3. DEFINICIÓN DEL PROBLEMA: Es una asociación deportiva en la cual se lleva acabo en aguas dulces, dedicado a informatizar su gestión de socios, eventos y concursos. La asociación también denominada “FISHERMEN TEAM”, cuenta con un conjunto de afiliados que participan en competiciones deportivas de pesca, ya que pueden ser organizadas por otras organizaciones privadas, publicas o del mismo tipo, o por ella misma. En cada competición debe conocerse la información de los afiliados participantes en dicho deporte.
  • 4.
  • 5. Cada evento debe tener un nombre único.
  • 6.
  • 7. fecha Datos-personales afiliados licencias Fecha-evento licencia Fecha-pesca Fecha-evento Hora-pesca Nombre-pez Captura-solos peces Captura-eventos Od_pez cantidad peso nombre eventos capturas fecha Od_lugar comunidad nombre Od_evento Od_cause causes lugares
  • 8. DIAGRAMA DE TABLAS
  • 9.
  • 10. CREACIÓN DE LA BASE DE DATOS
  • 11. mysql>createdatabasePesca_Deportiva; mysql> use Pesca_Deportiva; mysql> createtable Afiliados(Ficha int, Nombre_afiliadochar(50), Apellidos_afiliadochar(50), Direccion_afiliadochar(50), Telf_afiliadochar(30), Sexo_afiliadochar(20), Nacimiento_afiliado date, Od_afiliadochar(50), primarykey(Ficha)); mysql> create table Cauces(Cauce char(50), Od_Cauce char(50), primary key(Cauce)); mysql> create table Peces(Pez char(50), Od_pez char(50), primary key(Pez)); mysql> createtable Licencias(Licencia char(50), primarykey(Licencia)); mysql> createtable Lugares(Lugar char(50), Comunidad char(50), Cauce char(50),Od_lugarchar(50), primarykey(Lugar), constraintllaveforaneaforeignkey(Cauce) references Cauces(Cauce) ondeletecascade); mysql> createtable Eventos(Evento char(50), Fecha_evento date, Lugar char(50), Od_eventochar(50), primarykey(Evento), constraint llaveforanea1 foreignkey(Lugar) references Lugares(Lugar) ondeletecascade);
  • 12. mysql> createtable Concursos(Evento char(50), Pez char(50), Tallaminchar(50), Numemaxchar(50), primarykey(Evento), constraint llaveforanea2 foreignkey(Evento) references Eventos(Evento) ondeletecascade,constraint llaveforanea3 foreignkey(Pez) references Peces(Pez) ondeletecascade); mysql> createtable Permisos(Ficha int, Licencia char(50), primarykey(Ficha), constraint llaveforanea4 foreignkey(Ficha) references Afiliados(Ficha) ondeletecascade,constraint llaveforanea5 foreignkey(Licencia) references Licencias(Licencia) ondeletecascade); mysql> createtable Faunas(Lugar char(50), Pez char(50), Tallamaxchar(50), Pesomaxchar(50),Numemaxchar(50), Tallaminchar(50), Veda date, primarykey(Lugar), constraint llaveforanea6 foreignkey(Lugar) references Lugares(Lugar) ondeletecascade, constraint llaveforanea7 foreignkey(Pez) references Peces(Pez) ondeletecascade); mysql> createtable Participaciones(Ficha int, Evento char(50), Posicionchar(10),Trofeo char(50), primarykey(Ficha), constraint llaveforanea8 foreignkey(Ficha) references Afiliados(Ficha) ondeletecascade, constraint llaveforanea9 foreignkey(Evento) references Eventos(Evento) ondeletecascade);
  • 13. mysql> createtableCapturaSolos(Ficha int, Pez char(50), Lugar char(50), Fecha_pescachar(50), Hora_pescachar(50), Peso float, Talla int, primarykey(Ficha), constraint llaveforanea10 foreignkey(Ficha) references Afiliados(Ficha) ondeletecascade, constraint llaveforanea11 foreignkey(Pez) references Peces(Pez) ondeletecascade, constraint llaveforanea12 foreignkey(Lugar) references Lugares(Lugar) ondeletecascade); mysql> createtableCapturaEventos(Ficha int, Pez char(50), Evento char(50), Fecha_pescachar(50), Hora_pescachar(50), Peso float, Talla int, Puntos int, primarykey(Ficha), constraint llaveforanea13 foreignkey(Ficha) references Afiliados(Ficha) ondeletecascade, constraint llaveforanea14 foreignkey(Pez) references Peces(Pez) ondeletecascade, constraint llaveforanea15 foreignkey(Evento) references Eventos(Evento) ondeletecascade); mysql> insertinto afiliados values(250,'Dave','Johnson','Venustiano Carranza', 98634454,'masculino','18-08-83','Ha tenido mas de tres medallas'); mysql> insertinto peces values('trucha','es muy grande'); mysql> insertinto cauces values('rio magdalena', 'cauce de mayor extencion'); mysql> insertinto lugares values('playa palmilla', 'san jose del cabo', 'rio magdalena', 'convertido para convivir'); mysql> insertinto eventos values('1er torneo internacional P','15-06-2010','pla ya palmilla','se dan a conocer los competidores');
  • 14. mysql> insertinto licencias values('CRFL'); mysql> insertinto permisos values(250,'CRFL'); mysql> insertinto participaciones values(250,'1er torneo internacional P','1erlugar','Copa gobernador'); mysql> insertinto Concursos values('1er torneo internacional P','trucha','50',21); mysql> insertinto Faunas values('playa palmilla','trucha','30',15.0,'21',28,'1 al 31 de mayo'); mysql> insertintocapturasolosvalues(250,'trucha', 'playa palmilla', ' 21-03-2010','7:00 am',15.0,60); mysql> insertintocapturaeventosvalues(250,'trucha','1er torneo internacional P','21-03-2010','7:00 am',15.0,28,'100'); mysql> create view fichita as select * from afiliados where ficha>600; mysql> createviewtam as select * from faunas whereTallamax<30; mysql> createviewtrobomas select * from participaciones where Trofeo='$20000';
  • 15. mysql> createviewpuntos as select * fromcapturaeventoswhere Puntos>=300; mysql> createviewHoraPez as select * fromcapturasoloswhereHora_pesca>='10:00 am'; MySql Navicat
  • 16. CONCLUSIÓN Al crear esta base de datos aprendimos como resolver un problema mediante la elaboración de diagramas, la comparación E-R. Así mismo fuimos introduciendo los datos en cada tabla y diagrama para identificar cual va hacer nuestra llave primaria y las llaves foráneas.
  • 17. BIBLIOGRAFÍA Base de Datos Desde Chen hasta Codd con ORACLE Autores: Irene Luque Ruiz Miguel Ángel Gómez-Nieto Enrique López Espinosa Gonzalo Cerruela García Editorial: Alfaomega Ra-Ma