CREATE DATABASE  IF NOT EXISTS `red_inventario` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `red_inventario`;
-- MySQL dump 10.13  Distrib 8.0.43, for Win64 (x86_64)
--
-- Host: 127.0.0.1    Database: red_inventario
-- ------------------------------------------------------
-- Server version	8.0.43

/*!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 `Luis_equipo`
--

DROP TABLE IF EXISTS `Luis_equipo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Luis_equipo` (
  `id_equipo` int NOT NULL AUTO_INCREMENT,
  `hostname` varchar(50) DEFAULT NULL,
  `macaddress` char(17) DEFAULT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `fecha_equipo` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_equipo`),
  UNIQUE KEY `uk_hostname` (`hostname`),
  UNIQUE KEY `uk_mac` (`macaddress`),
  UNIQUE KEY `uk_ip` (`ip`),
  KEY `idx_ip` (`ip`)
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Luis_equipo`
--

LOCK TABLES `Luis_equipo` WRITE;
/*!40000 ALTER TABLE `Luis_equipo` DISABLE KEYS */;
INSERT INTO `Luis_equipo` VALUES (29,NULL,NULL,'192.168.11.1','2025-10-06 08:12:20'),(30,NULL,NULL,'192.168.11.2','2025-10-06 08:12:27'),(31,NULL,NULL,'192.168.11.3','2025-10-06 08:12:34'),(32,'EC04',NULL,'192.168.11.4','2025-10-06 08:12:39'),(33,'EC05',NULL,'192.168.11.5','2025-10-06 08:12:44'),(34,'EC06',NULL,'192.168.11.6','2025-10-06 08:12:49'),(35,'EC07',NULL,'192.168.11.7','2025-10-06 08:12:54'),(36,'EC08',NULL,'192.168.11.8','2025-10-06 08:13:00'),(37,'EC09',NULL,'192.168.11.9','2025-10-06 08:13:06'),(38,'EC10',NULL,'192.168.11.10','2025-10-06 08:13:11');
/*!40000 ALTER TABLE `Luis_equipo` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `Luis_protocolo`
--

DROP TABLE IF EXISTS `Luis_protocolo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Luis_protocolo` (
  `id_protocolo` int NOT NULL AUTO_INCREMENT,
  `numero` int NOT NULL,
  `nombre` varchar(30) NOT NULL,
  `detalle` varchar(120) DEFAULT NULL,
  PRIMARY KEY (`id_protocolo`),
  UNIQUE KEY `uk_puerto` (`numero`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Luis_protocolo`
--

LOCK TABLES `Luis_protocolo` WRITE;
/*!40000 ALTER TABLE `Luis_protocolo` DISABLE KEYS */;
INSERT INTO `Luis_protocolo` VALUES (1,22,'SSH','Secure Shell'),(2,23,'TELNET','Telnet'),(3,53,'DNS','Domain Name System'),(4,80,'HTTP','HyperText Transfer Protocol'),(5,135,'RPC','Microsoft RPC Endpoint Mapper'),(6,139,'NETBIOS','NetBIOS Session Service'),(7,443,'HTTPS','HTTP over TLS/SSL'),(8,445,'SMB','Microsoft-DS / SMB'),(9,3306,'MYSQL','MySQL Database Server'),(10,3389,'RDP','Remote Desktop Protocol'),(11,8080,'HTTP-ALT','HTTP alternativo / proxy');
/*!40000 ALTER TABLE `Luis_protocolo` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `Luis_protocolo_usado`
--

DROP TABLE IF EXISTS `Luis_protocolo_usado`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Luis_protocolo_usado` (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_equipo` int NOT NULL,
  `id_protocolo` int NOT NULL,
  `fecha_protocolo` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_equipo_protocolo` (`id_equipo`,`id_protocolo`),
  KEY `idx_Luis_pu_equipo` (`id_equipo`),
  KEY `idx_Luis_pu_protocolo` (`id_protocolo`),
  CONSTRAINT `fk_Luis_pu_equipo` FOREIGN KEY (`id_equipo`) REFERENCES `Luis_equipo` (`id_equipo`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_Luis_pu_protocolo` FOREIGN KEY (`id_protocolo`) REFERENCES `Luis_protocolo` (`id_protocolo`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Luis_protocolo_usado`
--

LOCK TABLES `Luis_protocolo_usado` WRITE;
/*!40000 ALTER TABLE `Luis_protocolo_usado` DISABLE KEYS */;
INSERT INTO `Luis_protocolo_usado` VALUES (37,29,5,'2025-10-06 08:12:20'),(38,29,6,'2025-10-06 08:12:20'),(39,29,8,'2025-10-06 08:12:20'),(40,29,10,'2025-10-06 08:12:20'),(41,30,5,'2025-10-06 08:12:27'),(42,30,6,'2025-10-06 08:12:27'),(43,30,8,'2025-10-06 08:12:27'),(44,30,10,'2025-10-06 08:12:27'),(45,31,5,'2025-10-06 08:12:34'),(46,31,6,'2025-10-06 08:12:34'),(47,31,8,'2025-10-06 08:12:34'),(48,31,10,'2025-10-06 08:12:34'),(49,32,5,'2025-10-06 08:12:39'),(50,32,6,'2025-10-06 08:12:39'),(51,32,8,'2025-10-06 08:12:39'),(52,32,10,'2025-10-06 08:12:39'),(53,33,5,'2025-10-06 08:12:44'),(54,33,6,'2025-10-06 08:12:44'),(55,33,8,'2025-10-06 08:12:44'),(56,33,10,'2025-10-06 08:12:44'),(57,34,5,'2025-10-06 08:12:49'),(58,34,6,'2025-10-06 08:12:49'),(59,34,8,'2025-10-06 08:12:49'),(60,35,5,'2025-10-06 08:12:54'),(61,35,8,'2025-10-06 08:12:54'),(62,35,10,'2025-10-06 08:12:54'),(63,36,5,'2025-10-06 08:13:00'),(64,36,6,'2025-10-06 08:13:00'),(65,36,10,'2025-10-06 08:13:01'),(66,37,5,'2025-10-06 08:13:06'),(67,37,6,'2025-10-06 08:13:06'),(68,37,8,'2025-10-06 08:13:06'),(69,37,10,'2025-10-06 08:13:06'),(70,38,5,'2025-10-06 08:13:11'),(71,38,6,'2025-10-06 08:13:11'),(72,38,8,'2025-10-06 08:13:11'),(73,38,10,'2025-10-06 08:13:11'),(74,35,6,'2025-10-06 08:14:36'),(75,36,8,'2025-10-06 08:14:41');
/*!40000 ALTER TABLE `Luis_protocolo_usado` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping events for database 'red_inventario'
--

--
-- Dumping routines for database 'red_inventario'
--
/*!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 2025-10-06  8:48:53
