-- MariaDB dump 10.19  Distrib 10.5.23-MariaDB, for Linux (x86_64)
--
-- Host: localhost    Database: user217
-- ------------------------------------------------------
-- Server version	10.5.23-MariaDB

/*!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 */;
/*!40101 SET NAMES utf8mb4 */;
/*!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 `categoria`
--

DROP TABLE IF EXISTS `categoria`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `categoria` (
  `id` int(11) NOT NULL,
  `c_name` char(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `categoria`
--

LOCK TABLES `categoria` WRITE;
/*!40000 ALTER TABLE `categoria` DISABLE KEYS */;
INSERT INTO `categoria` VALUES (1,'preschool children'),(2,'young children'),(3,'teenager'),(4,'adults'),(5,'preschool children'),(6,'young children'),(7,'teenager'),(8,'adults'),(9,'adults'),(10,'young children');
/*!40000 ALTER TABLE `categoria` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `product`
--

DROP TABLE IF EXISTS `product`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `product` (
  `product_id` int(11) NOT NULL,
  `product_name` char(50) NOT NULL,
  `date_issue` date NOT NULL,
  `price` int(11) NOT NULL,
  `print_run` int(11) NOT NULL,
  `categoria` int(11) NOT NULL,
  `publisher_id` int(11) NOT NULL,
  PRIMARY KEY (`product_id`),
  KEY `publisher_id` (`publisher_id`),
  KEY `categoria` (`categoria`),
  CONSTRAINT `product_ibfk_1` FOREIGN KEY (`publisher_id`) REFERENCES `publisher` (`publisher_id`),
  CONSTRAINT `product_ibfk_2` FOREIGN KEY (`categoria`) REFERENCES `categoria` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `product`
--

LOCK TABLES `product` WRITE;
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
INSERT INTO `product` VALUES (1,'ABC Alphabet Book','2023-01-10',10,5000,1,1),(2,'Colorful Picture Book','2023-02-05',13,3000,2,2),(3,'Teen Magazine','2023-03-15',4,100000,3,3),(4,'Cookbook for Adults','2023-04-20',20,5000,4,4),(5,'Fairy Tale Collection','2023-05-01',15,10000,5,5),(6,'Educational Activity Book','2023-06-10',9,7000,6,6),(7,'Teenage Novel','2023-07-20',11,20000,7,7),(8,'Art Magazine','2023-08-05',6,80000,8,8),(9,'Self-help Book','2023-09-15',16,3000,9,9),(10,'Children\'s Coloring Book','2023-10-01',7,15000,10,10);
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `publisher`
--

DROP TABLE IF EXISTS `publisher`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `publisher` (
  `publisher_id` int(11) NOT NULL,
  `publisher_name` char(50) NOT NULL,
  `city_id` int(11) NOT NULL,
  PRIMARY KEY (`publisher_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `publisher`
--

LOCK TABLES `publisher` WRITE;
/*!40000 ALTER TABLE `publisher` DISABLE KEYS */;
INSERT INTO `publisher` VALUES (1,'PrintexCo',1),(2,'GraphicMasters',2),(3,'ColorPrintTech',3),(4,'FlexoWorks',4),(5,'AccuPrint Solutions',5),(6,'GlobalImprint',6),(7,'PrecisionGraphics',7),(8,'InnoPrint Industries',8),(9,'ExpressPrint Group',9),(10,'Technotype Printers',10);
/*!40000 ALTER TABLE `publisher` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `result`
--

DROP TABLE IF EXISTS `result`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `result` (
  `product_id` int(11) DEFAULT NULL,
  `categoria` char(50) DEFAULT NULL,
  `product_name` char(50) NOT NULL,
  `date_issue` date NOT NULL,
  `price` int(11) NOT NULL,
  `print_run` int(11) NOT NULL,
  `publisher_name` char(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `result`
--

LOCK TABLES `result` WRITE;
/*!40000 ALTER TABLE `result` DISABLE KEYS */;
INSERT INTO `result` VALUES (1,'preschool children','ABC Alphabet Book','2023-01-10',10,5000,'PrintexCo'),(2,'young children','Colorful Picture Book','2023-02-05',13,3000,'GraphicMasters'),(3,'teenager','Teen Magazine','2023-03-15',4,100000,'ColorPrintTech'),(4,'adults','Cookbook for Adults','2023-04-20',20,5000,'FlexoWorks'),(5,'preschool children','Fairy Tale Collection','2023-05-01',15,10000,'AccuPrint Solutions'),(6,'young children','Educational Activity Book','2023-06-10',9,7000,'GlobalImprint'),(7,'teenager','Teenage Novel','2023-07-20',11,20000,'PrecisionGraphics'),(8,'adults','Art Magazine','2023-08-05',6,80000,'InnoPrint Industries'),(9,'adults','Self-help Book','2023-09-15',16,3000,'ExpressPrint Group'),(10,'young children','Children\'s Coloring Book','2023-10-01',7,15000,'Technotype Printers');
/*!40000 ALTER TABLE `result` 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 2024-03-17 18:11:45
