0% found this document useful (0 votes)
7 views3 pages

MariaDB Database Schema and Data Dump

The document is a SQL dump for a MariaDB database containing three tables: Reservation, Train, and Voyageur. It includes the structure and data for each table, with foreign key constraints linking Reservation to both Train and Voyageur. The dump was completed on February 19, 2025.

Uploaded by

derainarak1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

MariaDB Database Schema and Data Dump

The document is a SQL dump for a MariaDB database containing three tables: Reservation, Train, and Voyageur. It includes the structure and data for each table, with foreign key constraints linking Reservation to both Train and Voyageur. The dump was completed on February 19, 2025.

Uploaded by

derainarak1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

/*!

999999\- enable the sandbox mode */


-- MariaDB dump 10.19 Distrib 10.11.8-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: exo_bdr
-- ------------------------------------------------------
-- Server version 10.11.8-MariaDB-0ubuntu0.24.04.1

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

DROP TABLE IF EXISTS `Reservation`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Reservation` (
`CodeV` varchar(2) NOT NULL,
`CodeT` varchar(2) NOT NULL,
`Place` int(11) DEFAULT NULL,
`Classe` int(11) DEFAULT NULL,
`Date` date NOT NULL,
PRIMARY KEY (`CodeV`,`CodeT`,`Date`),
KEY `CodeT` (`CodeT`),
CONSTRAINT `Reservation_ibfk_1` FOREIGN KEY (`CodeV`) REFERENCES `Voyageur`
(`CodeV`),
CONSTRAINT `Reservation_ibfk_2` FOREIGN KEY (`CodeT`) REFERENCES `Train`
(`CodeT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Reservation`
--
LOCK TABLES `Reservation` WRITE;
/*!40000 ALTER TABLE `Reservation` DISABLE KEYS */;
INSERT INTO `Reservation` VALUES
('V1','T1',52,2,'2019-10-23'),
('V1','T1',3,1,'2020-10-10'),
('V1','T2',5,1,'2020-11-17'),
('V2','T2',49,3,'2019-05-01'),
('V2','T2',30,3,'2020-11-17'),
('V3','T3',25,1,'2020-11-17'),
('V3','T4',40,2,'2020-11-18'),
('V4','T1',95,2,'2020-09-24'),
('V5','T1',180,3,'2020-11-17'),
('V5','T4',87,3,'2020-02-14');
/*!40000 ALTER TABLE `Reservation` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `Train`
--

DROP TABLE IF EXISTS `Train`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Train` (
`CodeT` varchar(2) NOT NULL,
`Design` varchar(32) DEFAULT NULL,
`Couleur` varchar(32) DEFAULT NULL,
`Nbr_place` int(11) DEFAULT NULL,
`Frais` int(11) DEFAULT NULL,
PRIMARY KEY (`CodeT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Train`
--

LOCK TABLES `Train` WRITE;


/*!40000 ALTER TABLE `Train` DISABLE KEYS */;
INSERT INTO `Train` VALUES
('T1','TGV1','Bleu',200,1000),
('T2','TGV2','Gris',50,2000),
('T3','TGV3','Gris',150,3000),
('T4','TGV4','Blanc',100,1500);
/*!40000 ALTER TABLE `Train` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `Voyageur`
--

DROP TABLE IF EXISTS `Voyageur`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Voyageur` (
`CodeV` varchar(2) NOT NULL,
`Nom` varchar(32) DEFAULT NULL,
`Prenom` varchar(32) DEFAULT NULL,
`Datenais` date DEFAULT NULL,
`Travail` varchar(32) DEFAULT NULL,
PRIMARY KEY (`CodeV`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Voyageur`
--

LOCK TABLES `Voyageur` WRITE;


/*!40000 ALTER TABLE `Voyageur` DISABLE KEYS */;
INSERT INTO `Voyageur` VALUES
('V1','RAKOTOBE','Jean Luc','1975-10-15','Ministre'),
('V2','RANDRIANTSOA','Tiana Aldin','1998-10-12','Marchand'),
('V3','KOTOARISON','Justin','1991-11-02','Dentiste'),
('V4','RIVO','Jean Baptiste','1993-10-13','Enseignant'),
('V5','ZANATOKY','Marie Francoise','2004-10-15','Coiffeuse'),
('V6','NDREMA','Bevazaha','1986-01-05','Dentiste');
/*!40000 ALTER TABLE `Voyageur` 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-02-19 14:11:18

You might also like