-- MySQL dump 10.13  Distrib 8.0.36, for Win64 (x86_64)
--
-- Host: git.pgk.alspio.com    Database: pozorisp_Cherkasov
-- ------------------------------------------------------
-- Server version	5.7.44

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

DROP TABLE IF EXISTS `materials`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `materials` (
  `idmaterials` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type_materials` int(11) NOT NULL,
  `price` decimal(10,0) NOT NULL,
  `storage` decimal(10,0) NOT NULL,
  `minimal` decimal(10,0) NOT NULL,
  `package` int(11) NOT NULL,
  `unit` int(11) NOT NULL,
  PRIMARY KEY (`idmaterials`),
  KEY `fk_materials_type_materials_idx` (`type_materials`),
  KEY `fk_unit_unit_idx` (`unit`),
  CONSTRAINT `fk_materials_type_materials` FOREIGN KEY (`type_materials`) REFERENCES `type_material` (`idtype_material`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_unit_unit` FOREIGN KEY (`unit`) REFERENCES `unit` (`idunit`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `materials`
--

LOCK TABLES `materials` WRITE;
/*!40000 ALTER TABLE `materials` DISABLE KEYS */;
INSERT INTO `materials` VALUES (1,'Глина',1,15,1570,5500,30,1),(2,'Каолин',1,18,1030,3500,25,1),(3,'Гидрослюда',1,17,2147,3500,25,1),(4,'Монтмориллонит',1,18,3000,3000,30,1),(5,'Перлит',2,14,150,1000,50,2),(6,'Стекло',2,2,3000,1500,500,1),(7,'Дегидратированная глина',2,22,3000,2500,20,1),(8,'Шамот',2,28,2300,1960,20,1),(9,'Техническая сода',3,55,1200,1500,25,1),(10,'Жидкое стекло',3,77,500,1500,15,1),(11,'Кварц',4,376,1500,2500,10,1),(12,'Полевой шпат',4,16,750,1500,100,1),(13,'Краска-раствор',5,201,1496,2500,5,2),(14,'Порошок цветной',5,84,511,1750,25,1),(15,'Кварцевый песок',2,4,3000,1600,50,1),(16,'Жильный кварц',2,19,2556,1600,25,1),(17,'Барий углекислый',4,304,340,1500,25,1),(18,'Бура техническая',4,126,165,1300,25,1),(19,'Углещелочной реагент',3,3,450,1100,25,1),(20,'Пирофосфат натрия',3,701,356,1200,25,1);
/*!40000 ALTER TABLE `materials` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `product_supplier`
--

DROP TABLE IF EXISTS `product_supplier`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_supplier` (
  `idproduct_supplier` int(11) NOT NULL AUTO_INCREMENT,
  `product` int(11) NOT NULL,
  `supplier` int(11) NOT NULL,
  PRIMARY KEY (`idproduct_supplier`),
  KEY `fk_product_product_idx` (`product`),
  KEY `fk_supplier_supplier_idx` (`supplier`),
  CONSTRAINT `fk_product_product` FOREIGN KEY (`product`) REFERENCES `materials` (`idmaterials`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_supplier_supplier` FOREIGN KEY (`supplier`) REFERENCES `supplier` (`idsupplier`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `product_supplier`
--

LOCK TABLES `product_supplier` WRITE;
/*!40000 ALTER TABLE `product_supplier` DISABLE KEYS */;
INSERT INTO `product_supplier` VALUES (1,13,19),(2,2,3),(3,2,9),(4,6,19),(5,15,1),(6,5,6),(7,1,4),(8,15,20),(9,8,9),(10,12,4),(11,1,1),(12,14,19),(13,16,17),(14,12,1),(15,3,9),(16,6,20),(17,12,12),(18,4,9),(19,11,11),(20,17,17),(21,10,12),(22,8,17),(23,1,6),(24,11,15),(25,3,3),(26,5,9),(27,8,19),(28,17,20),(29,18,20),(30,9,18),(31,20,20),(32,3,4),(33,16,15),(34,5,10),(35,15,15),(36,4,4),(37,13,12),(38,6,7),(39,14,12),(40,2,1),(41,10,18),(42,18,7),(43,8,11),(44,18,13),(45,4,3),(46,10,16),(47,10,7),(48,14,16),(49,14,8),(50,19,16),(51,11,14),(52,16,13),(53,13,16),(54,11,13),(55,8,2),(56,15,14),(57,17,7),(58,8,2),(59,8,7),(60,3,5),(61,20,7),(62,5,5),(63,9,7),(64,1,10),(65,9,16),(66,4,10),(67,19,12),(68,9,8),(69,18,2),(70,20,5),(71,16,10),(72,6,2),(73,19,8),(74,17,5),(75,20,8),(76,2,5),(77,8,11),(78,19,5),(79,13,8),(80,12,10);
/*!40000 ALTER TABLE `product_supplier` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `product_type`
--

DROP TABLE IF EXISTS `product_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_type` (
  `idproduct_type` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  `procent` double NOT NULL,
  PRIMARY KEY (`idproduct_type`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `product_type`
--

LOCK TABLES `product_type` WRITE;
/*!40000 ALTER TABLE `product_type` DISABLE KEYS */;
INSERT INTO `product_type` VALUES (1,'Тип продукции 1',1.2),(2,'Тип продукции 2',8.59),(3,'Тип продукции 3',3.45),(4,'Тип продукции 4',5.6);
/*!40000 ALTER TABLE `product_type` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `supplier`
--

DROP TABLE IF EXISTS `supplier`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier` (
  `idsupplier` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type_supplier` int(11) NOT NULL,
  `INN` varchar(11) COLLATE utf8mb4_unicode_ci NOT NULL,
  `rating` decimal(2,0) NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`idsupplier`),
  KEY `fk_type_supplier_type_supplier_idx` (`type_supplier`),
  CONSTRAINT `fk_type_supplier_type_supplier` FOREIGN KEY (`type_supplier`) REFERENCES `type_supplier` (`idtype_supplier`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `supplier`
--

LOCK TABLES `supplier` WRITE;
/*!40000 ALTER TABLE `supplier` DISABLE KEYS */;
INSERT INTO `supplier` VALUES (1,'БрянскСтройресурс',1,'9432455179',8,'2015-12-20'),(2,'Стройкомплект',1,'7803888520',7,'2017-09-13'),(3,'Железногорская руда',2,'8430391035',7,'2016-12-23'),(4,'Белая гора',2,'4318170454',8,'2019-05-27'),(5,'Тульский обрабатывающий завод',2,'7687851800',7,'2015-06-16'),(6,'ГорТехРазработка',3,'6119144874',9,'2021-12-27'),(7,'Сапфир',4,'1122170258',3,'2022-04-10'),(8,'ХимБытСервис',3,'8355114917',5,'2022-03-13'),(9,'ВоронежРудоКомбинат',4,'3532367439',8,'2023-11-11'),(10,'Смоленский добывающий комбинат',4,'2362431140',3,'2018-11-23'),(11,'МосКарьер',3,'4159215346',2,'2012-07-07'),(12,'КурскРесурс',1,'9032455179',4,'2021-07-23'),(13,'Нижегородская разработка',4,'3776671267',9,'2016-05-23'),(14,'Речная долина',4,'7447864518',8,'2015-06-25'),(15,'Карелия добыча',3,'9037040523',6,'2017-03-09'),(16,'Московский ХимЗавод',3,'6221520857',4,'2015-05-07'),(17,'Горная компания',1,'2262431140',3,'2020-12-22'),(18,'Минерал Ресурс',2,'4155215346',7,'2015-05-22'),(19,'Арсенал',1,'3961234561',5,'2010-11-25'),(20,'КамчаткаСтройМинералы',1,'9600275878',7,'2016-12-20');
/*!40000 ALTER TABLE `supplier` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `type_material`
--

DROP TABLE IF EXISTS `type_material`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `type_material` (
  `idtype_material` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  `procent` double NOT NULL,
  PRIMARY KEY (`idtype_material`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `type_material`
--

LOCK TABLES `type_material` WRITE;
/*!40000 ALTER TABLE `type_material` DISABLE KEYS */;
INSERT INTO `type_material` VALUES (1,'Пластичные материалы',0.12),(2,'Добавка',0.2),(3,'Электролит',0.15),(4,'Глазурь',0.3),(5,'Пигмент',0.25);
/*!40000 ALTER TABLE `type_material` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `type_supplier`
--

DROP TABLE IF EXISTS `type_supplier`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `type_supplier` (
  `idtype_supplier` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`idtype_supplier`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `type_supplier`
--

LOCK TABLES `type_supplier` WRITE;
/*!40000 ALTER TABLE `type_supplier` DISABLE KEYS */;
INSERT INTO `type_supplier` VALUES (1,'ЗАО'),(2,'ООО'),(3,'ПАО'),(4,'ОАО');
/*!40000 ALTER TABLE `type_supplier` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `unit`
--

DROP TABLE IF EXISTS `unit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `unit` (
  `idunit` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`idunit`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `unit`
--

LOCK TABLES `unit` WRITE;
/*!40000 ALTER TABLE `unit` DISABLE KEYS */;
INSERT INTO `unit` VALUES (1,'кг'),(2,'л');
/*!40000 ALTER TABLE `unit` 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 2026-05-15 13:13:46
