-- MySQL dump 10.11 -- -- Host: localhost Database: gdi -- ------------------------------------------------------ -- Server version 5.0.67-0ubuntu6 /*!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 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 `actors` -- DROP TABLE IF EXISTS `actors`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `actors` ( `id` int(11) NOT NULL auto_increment, `name` varchar(200) NOT NULL, `country` varchar(100) NOT NULL, `birthday` date NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Dumping data for table `actors` -- LOCK TABLES `actors` WRITE; /*!40000 ALTER TABLE `actors` DISABLE KEYS */; INSERT INTO `actors` VALUES (1,'Angelina Jolie','USA','1980-01-01'),(2,'Tom Cruse','USA','2000-10-19'),(3,'Pedo File','Canada','1973-01-03'); /*!40000 ALTER TABLE `actors` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `movie_actors` -- DROP TABLE IF EXISTS `movie_actors`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `movie_actors` ( `movie_id` int(11) NOT NULL, `actor_id` int(11) NOT NULL, KEY `actor_id` (`actor_id`), KEY `movie_id` (`movie_id`), CONSTRAINT `actor_id` FOREIGN KEY (`actor_id`) REFERENCES `actors` (`id`), CONSTRAINT `movie_id` FOREIGN KEY (`movie_id`) REFERENCES `movies` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Dumping data for table `movie_actors` -- LOCK TABLES `movie_actors` WRITE; /*!40000 ALTER TABLE `movie_actors` DISABLE KEYS */; INSERT INTO `movie_actors` VALUES (1,1),(2,2),(1,3); /*!40000 ALTER TABLE `movie_actors` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `movies` -- DROP TABLE IF EXISTS `movies`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `movies` ( `id` int(11) NOT NULL auto_increment, `title` varchar(100) NOT NULL, `year` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Dumping data for table `movies` -- LOCK TABLES `movies` WRITE; /*!40000 ALTER TABLE `movies` DISABLE KEYS */; INSERT INTO `movies` VALUES (1,'Das Schweigen der Lämmer',1999),(2,'Fight Club',1995); /*!40000 ALTER TABLE `movies` 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 2008-11-19 20:36:24