-- MySQL dump 10.13  Distrib 8.0.36, for Win64 (x86_64)
--
-- Host: 192.168.201.207    Database: pozorisp_Kalimov
-- ------------------------------------------------------
-- 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 `material`
--

DROP TABLE IF EXISTS `material`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `material` (
  `material_id` int(11) NOT NULL AUTO_INCREMENT,
  `material_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  `material_type` int(11) NOT NULL,
  `material_price_for_unit` float NOT NULL,
  `material_count_of_warehouse` int(11) NOT NULL,
  `material_min_colvo_of_warehouse` int(11) NOT NULL,
  `material_colvo_in_upak` int(11) NOT NULL,
  `material_unit` int(11) NOT NULL,
  PRIMARY KEY (`material_id`),
  KEY `fk_material_type_idx` (`material_type`),
  KEY `fk_material_unit_idx` (`material_unit`),
  CONSTRAINT `fk_material_type` FOREIGN KEY (`material_type`) REFERENCES `material_type` (`material_type_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_material_unit` FOREIGN KEY (`material_unit`) REFERENCES `unit` (`unit_id`) 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 `material`
--

LOCK TABLES `material` WRITE;
/*!40000 ALTER TABLE `material` DISABLE KEYS */;
INSERT INTO `material` VALUES (1,'Глина',1,15.29,1570,5500,30,1),(2,'Каолин',1,18.2,1030,3500,25,1),(3,'Гидрослюда',1,17.2,2147,3500,25,1),(4,'Монтмориллонит',1,17.67,3000,3000,30,1),(5,'Перлит',2,13.99,150,1000,50,2),(6,'Стекло',2,2.4,3000,1500,500,1),(7,'Дегидратированная глина',2,21.95,3000,2500,20,1),(8,'Шамот',2,27.5,2300,1960,20,1),(9,'Техническая сода',3,54.55,1200,1500,25,1),(10,'Жидкое стекло',3,76.59,500,1500,15,1),(11,'Кварц',4,375.96,1500,2500,10,1),(12,'Полевой шпат',4,15.99,750,1500,100,1),(13,'Краска-раствор',5,200.9,1496,2500,5,2),(14,'Порошок цветной',5,84.39,511,1750,25,1),(15,'Кварцевый песок',2,4.29,3000,1600,50,1),(16,'Жильный кварц',2,18.6,2556,1600,25,1),(17,'Барий углекислый',4,303.64,340,1500,25,1),(18,'Бура техническая',4,125.99,165,1300,25,1),(19,'Углещелочной реагент',3,3.45,450,1100,25,1),(20,'Пирофосфат натрия',3,700.99,356,1200,25,1);
/*!40000 ALTER TABLE `material` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `material_suppliers`
--

DROP TABLE IF EXISTS `material_suppliers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `material_suppliers` (
  `material_suppliers_id` int(11) NOT NULL AUTO_INCREMENT,
  `material_id` int(11) NOT NULL,
  `suppliers_id` int(11) NOT NULL,
  PRIMARY KEY (`material_suppliers_id`),
  KEY `fk_material_suppliers_suppliers_idx` (`suppliers_id`),
  KEY `fk_material_suppliers_material_idx` (`material_id`),
  CONSTRAINT `fk_material_suppliers_material` FOREIGN KEY (`material_id`) REFERENCES `material` (`material_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_material_suppliers_suppliers` FOREIGN KEY (`suppliers_id`) REFERENCES `suppliers` (`suppliers_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `material_suppliers`
--

LOCK TABLES `material_suppliers` WRITE;
/*!40000 ALTER TABLE `material_suppliers` DISABLE KEYS */;
/*!40000 ALTER TABLE `material_suppliers` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `material_type`
--

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

--
-- Dumping data for table `material_type`
--

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

--
-- Table structure for table `suppliers`
--

DROP TABLE IF EXISTS `suppliers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `suppliers` (
  `suppliers_id` int(11) NOT NULL AUTO_INCREMENT,
  `suppliers_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  `suppliers_type` int(11) NOT NULL,
  `suppliers_INN` bigint(15) NOT NULL,
  `suppliers_ratimg` int(11) NOT NULL,
  `suppliers_date_starte_sotr` date NOT NULL,
  PRIMARY KEY (`suppliers_id`),
  KEY `fk_suppliers_type_idx` (`suppliers_type`),
  CONSTRAINT `fk_suppliers_type` FOREIGN KEY (`suppliers_type`) REFERENCES `type_suppliers` (`type_suppliers_id`) 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 `suppliers`
--

LOCK TABLES `suppliers` WRITE;
/*!40000 ALTER TABLE `suppliers` DISABLE KEYS */;
INSERT INTO `suppliers` VALUES (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 `suppliers` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `type_suppliers`
--

DROP TABLE IF EXISTS `type_suppliers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `type_suppliers` (
  `type_suppliers_id` int(11) NOT NULL AUTO_INCREMENT,
  `type_suppliers_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`type_suppliers_id`)
) 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_suppliers`
--

LOCK TABLES `type_suppliers` WRITE;
/*!40000 ALTER TABLE `type_suppliers` DISABLE KEYS */;
INSERT INTO `type_suppliers` VALUES (1,'ЗАО'),(2,'ООО'),(3,'ПАО'),(4,'ОАО');
/*!40000 ALTER TABLE `type_suppliers` 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` (
  `unit_id` int(11) NOT NULL AUTO_INCREMENT,
  `unit_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`unit_id`)
) 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 10:07:15
