Skip to content

Instantly share code, notes, and snippets.

@codigoconjuan
Last active August 30, 2025 22:00
Show Gist options
  • Select an option

  • Save codigoconjuan/d78666526c0d7a0e553e0f3fc0766e5f to your computer and use it in GitHub Desktop.

Select an option

Save codigoconjuan/d78666526c0d7a0e553e0f3fc0766e5f to your computer and use it in GitHub Desktop.
Estructura de la base de datos para Eventos
CREATE TABLE `eventos` (
`id` int NOT NULL AUTO_INCREMENT,
`nombre` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`descripcion` text,
`disponibles` int DEFAULT NULL,
`categoria_id` int NOT NULL,
`dia_id` int NOT NULL,
`hora_id` int NOT NULL,
`ponente_id` int NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_eventos_categorias_idx` (`categoria_id`),
KEY `fk_eventos_dias1_idx` (`dia_id`),
KEY `fk_eventos_horas1_idx` (`hora_id`),
KEY `fk_eventos_ponentes1_idx` (`ponente_id`),
CONSTRAINT `fk_eventos_categorias` FOREIGN KEY (`categoria_id`) REFERENCES `categorias` (`id`),
CONSTRAINT `fk_eventos_dias1` FOREIGN KEY (`dia_id`) REFERENCES `dias` (`id`),
CONSTRAINT `fk_eventos_horas1` FOREIGN KEY (`hora_id`) REFERENCES `horas` (`id`),
CONSTRAINT `fk_eventos_ponentes1` FOREIGN KEY (`ponente_id`) REFERENCES `ponentes` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment