-- MariaDB dump 10.19  Distrib 10.5.23-MariaDB, for Linux (x86_64)
--
-- Host: localhost    Database: user219
-- ------------------------------------------------------
-- 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 `Countries`
--

DROP TABLE IF EXISTS `Countries`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Countries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Countries`
--

LOCK TABLES `Countries` WRITE;
/*!40000 ALTER TABLE `Countries` DISABLE KEYS */;
INSERT INTO `Countries` VALUES (8,'Egypt'),(6,'France'),(3,'Greece'),(10,'Indonesia'),(5,'Italy'),(9,'Maldives'),(7,'Mexico'),(4,'Spain'),(1,'Thailand'),(2,'Turkey');
/*!40000 ALTER TABLE `Countries` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `Resorts`
--

DROP TABLE IF EXISTS `Resorts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Resorts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `country_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `country_id` (`country_id`),
  CONSTRAINT `Resorts_ibfk_1` FOREIGN KEY (`country_id`) REFERENCES `Countries` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Resorts`
--

LOCK TABLES `Resorts` WRITE;
/*!40000 ALTER TABLE `Resorts` DISABLE KEYS */;
INSERT INTO `Resorts` VALUES (1,'Phuket',1),(2,'Pattaya',1),(3,'Antalya',2),(4,'Bodrum',2),(5,'Santorini',3),(6,'Mykonos',3),(7,'Barcelona',4),(8,'Mallorca',4),(9,'Sicily',5),(10,'Bali',10),(11,'Bali',10);
/*!40000 ALTER TABLE `Resorts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `TourPackages`
--

DROP TABLE IF EXISTS `TourPackages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TourPackages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `resort_id` int(11) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `departure_date` date NOT NULL,
  PRIMARY KEY (`id`),
  KEY `resort_id` (`resort_id`),
  CONSTRAINT `TourPackages_ibfk_1` FOREIGN KEY (`resort_id`) REFERENCES `Resorts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `TourPackages`
--

LOCK TABLES `TourPackages` WRITE;
/*!40000 ALTER TABLE `TourPackages` DISABLE KEYS */;
INSERT INTO `TourPackages` VALUES (1,1,1200.00,'2025-06-15'),(2,2,1100.00,'2025-07-10'),(3,3,950.00,'2025-08-05'),(4,4,1050.00,'2025-09-12'),(5,5,2000.00,'2025-06-25'),(6,6,2100.00,'2025-07-18'),(7,7,1800.00,'2025-08-08'),(8,8,1700.00,'2025-09-15'),(9,9,2200.00,'2025-07-05'),(10,10,2500.00,'2025-08-20');
/*!40000 ALTER TABLE `TourPackages` 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 2025-03-03 13:06:42
