Está en la página 1de 8

Unidad de Aprendizaje: Proyecto informático

Fecha: 22 de marzo de 2023

Número de práctica 10

Nombre de la práctica: Fase de Diseño (Diseño de la Base de Datos


del Proyecto)

Objetivo de la práctica: Diseñar la base de datos de nuestro proyecto

Desarrollo:_____________________________________________

Código: Pantalla de salida:

CREATE DATABASE IF NOT EXISTS `estadosilvestre` /*!40100


DEFAULT CHARACTER SET utf8mb4 COLLATE
utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `estadosilvestre`;
-- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64)
--
-- Host: localhost Database: estadosilvestre
-- ------------------------------------------------------
-- Server version 8.0.31
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE,
SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `clase`
--

DROP TABLE IF EXISTS `clase`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `clase` (
`idclase` int NOT NULL AUTO_INCREMENT,
`habilidades` varchar(45) NOT NULL,
`tipo` varchar(45) NOT NULL,
`atributos` varchar(45) NOT NULL,
PRIMARY KEY (`idclase`),
UNIQUE KEY `idclase_UNIQUE` (`idclase`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `clase`
--

LOCK TABLES `clase` WRITE;


/*!40000 ALTER TABLE `clase` DISABLE KEYS */;
/*!40000 ALTER TABLE `clase` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `escenario`
--

DROP TABLE IF EXISTS `escenario`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `escenario` (
`idescenario` int NOT NULL AUTO_INCREMENT,
`id_mision` int DEFAULT NULL,
PRIMARY KEY (`idescenario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `escenario`
--

LOCK TABLES `escenario` WRITE;


/*!40000 ALTER TABLE `escenario` DISABLE KEYS */;
/*!40000 ALTER TABLE `escenario` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `jugador`
--

DROP TABLE IF EXISTS `jugador`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jugador` (
`id_jugador` int NOT NULL AUTO_INCREMENT,
`nivel` varchar(45) NOT NULL,
`habilidades` varchar(45) NOT NULL,
`objetos` varchar(45) NOT NULL,
`tiempo_jugado` varchar(45) NOT NULL,
PRIMARY KEY (`id_jugador`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `jugador`
--

LOCK TABLES `jugador` WRITE;


/*!40000 ALTER TABLE `jugador` DISABLE KEYS */;
/*!40000 ALTER TABLE `jugador` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `mision`
--

DROP TABLE IF EXISTS `mision`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mision` (
`idmision` int NOT NULL AUTO_INCREMENT,
`id_personaje` int NOT NULL,
`nombre_mision` varchar(45) NOT NULL,
`recompensa` varchar(45) NOT NULL,
`objetivo` varchar(45) NOT NULL,
`objetos_Requeridos` varchar(45) NOT NULL,
PRIMARY KEY (`idmision`),
KEY `mision_idx` (`id_personaje`),
CONSTRAINT `mision` FOREIGN KEY (`id_personaje`) REFERENCES `personaje`
(`idpersonaje`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `mision`
--

LOCK TABLES `mision` WRITE;


/*!40000 ALTER TABLE `mision` DISABLE KEYS */;
/*!40000 ALTER TABLE `mision` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `partida`
--

DROP TABLE IF EXISTS `partida`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `partida` (
`id_partida` int NOT NULL AUTO_INCREMENT,
`id_escenario_actual` int NOT NULL,
`id_sesion_utilizada` int NOT NULL,
PRIMARY KEY (`id_partida`),
KEY `numero1_idx` (`id_sesion_utilizada`),
KEY `numero2_idx` (`id_escenario_actual`),
CONSTRAINT `numero1` FOREIGN KEY (`id_sesion_utilizada`) REFERENCES
`sesiondejuego` (`id_sesion`),
CONSTRAINT `numero2` FOREIGN KEY (`id_escenario_actual`) REFERENCES
`escenario` (`idescenario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `partida`
--

LOCK TABLES `partida` WRITE;


/*!40000 ALTER TABLE `partida` DISABLE KEYS */;
/*!40000 ALTER TABLE `partida` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `personaje`
--

DROP TABLE IF EXISTS `personaje`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `personaje` (
`idpersonaje` int NOT NULL AUTO_INCREMENT,
`nombre` varchar(45) NOT NULL,
`id_clase` int NOT NULL,
`nombre_personaje` varchar(45) NOT NULL,
PRIMARY KEY (`idpersonaje`),
UNIQUE KEY `idpersonaje_UNIQUE` (`idpersonaje`),
KEY `clases_idx` (`id_clase`),
CONSTRAINT `clases` FOREIGN KEY (`id_clase`) REFERENCES `clase` (`idclase`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `personaje`
--

LOCK TABLES `personaje` WRITE;


/*!40000 ALTER TABLE `personaje` DISABLE KEYS */;
/*!40000 ALTER TABLE `personaje` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sesiondejuego`
--

DROP TABLE IF EXISTS `sesiondejuego`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sesiondejuego` (
`id_sesion` int NOT NULL AUTO_INCREMENT,
`tiempo_sesion` varchar(45) NOT NULL,
`id_jugador` int NOT NULL,
`fecha` varchar(45) NOT NULL,
PRIMARY KEY (`id_sesion`),
KEY `sesion_idx` (`id_jugador`),
CONSTRAINT `sesion` FOREIGN KEY (`id_jugador`) REFERENCES `jugador`
(`id_jugador`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sesiondejuego`
--

LOCK TABLES `sesiondejuego` WRITE;


/*!40000 ALTER TABLE `sesiondejuego` DISABLE KEYS */;
/*!40000 ALTER TABLE `sesiondejuego` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;


/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2023-03-21 21:47:54


Realizo: Reviso:

______________________ __________________________
Rodríguez Guerra Dominick Profra. Gabriela Orozco Magallón

También podría gustarte