-- MariaDB dump 10.19 Distrib 10.5.23-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: user113 -- ------------------------------------------------------ -- 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 `CAR` -- DROP TABLE IF EXISTS `CAR`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `CAR` ( `id` int(11) NOT NULL, `id_make` int(11) DEFAULT NULL, `id_state` int(11) DEFAULT NULL, `id_owner` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_make` (`id_make`), KEY `fk_state` (`id_state`), KEY `fk_owner` (`id_owner`), CONSTRAINT `fk_make` FOREIGN KEY (`id_make`) REFERENCES `MAKE` (`id`) ON DELETE CASCADE, CONSTRAINT `fk_owner` FOREIGN KEY (`id_owner`) REFERENCES `OWNER` (`id`) ON DELETE CASCADE, CONSTRAINT `fk_state` FOREIGN KEY (`id_state`) REFERENCES `STATE` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `CAR` -- LOCK TABLES `CAR` WRITE; /*!40000 ALTER TABLE `CAR` DISABLE KEYS */; INSERT INTO `CAR` VALUES (1,1,1,1),(2,2,2,2); /*!40000 ALTER TABLE `CAR` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `MAKE` -- DROP TABLE IF EXISTS `MAKE`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `MAKE` ( `id` int(11) NOT NULL, `make` text 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 `MAKE` -- LOCK TABLES `MAKE` WRITE; /*!40000 ALTER TABLE `MAKE` DISABLE KEYS */; INSERT INTO `MAKE` VALUES (1,'Марка 1'),(2,'Марка 2'); /*!40000 ALTER TABLE `MAKE` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `OWNER` -- DROP TABLE IF EXISTS `OWNER`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `OWNER` ( `id` int(11) NOT NULL, `name` text NOT NULL, `lastname` text 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 `OWNER` -- LOCK TABLES `OWNER` WRITE; /*!40000 ALTER TABLE `OWNER` DISABLE KEYS */; INSERT INTO `OWNER` VALUES (1,'Роман','Иванов'),(2,'Наталья','Петрова'); /*!40000 ALTER TABLE `OWNER` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `STATE` -- DROP TABLE IF EXISTS `STATE`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `STATE` ( `id` int(11) NOT NULL, `state` text 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 `STATE` -- LOCK TABLES `STATE` WRITE; /*!40000 ALTER TABLE `STATE` DISABLE KEYS */; INSERT INTO `STATE` VALUES (1,'Угнан'),(2,'Найден'); /*!40000 ALTER TABLE `STATE` 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-09 18:38:43