axyd icon

moviedb

axyd | PRO | 05/16/19 05:24:50 AM UTC | 0 ⭐ | 678 👁️ | Never ⏰ | []
MySQL |

16.85 KB

|

None

|

0 👍

/

0 👎

-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 16, 2019 at 05:17 AM
-- Server version: 8.0.15
-- PHP Version: 7.2.7
 
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
 
 
/*!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 */;
 
--
-- Database: `moviedb`
--
 
-- --------------------------------------------------------
 
--
-- Table structure for table `actor`
--
 
CREATE TABLE `actor` (
  `id` int(11) NOT NULL,
  `fName` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `lName` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `imdb_id` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
--
-- Dumping data for table `actor`
--
 
INSERT INTO `actor` (`id`, `fName`, `lName`, `dob`, `imdb_id`) VALUES
(1, 'Jonny Lee', 'Miller', '1972-11-15', 'nm0001538'),
(2, 'Fisher', 'Stevens', '1963-11-27', 'nm0001770'),
(3, 'Joe', 'Pesci', '1943-02-09', 'nm0000582'),
(4, 'Crispin', 'Glover', '1964-04-20', 'nm0000417'),
(5, 'Christopher', 'Lloyd', '1938-10-22', 'nm0000502');
 
-- --------------------------------------------------------
 
--
-- Table structure for table `actor_starredin_movie`
--
 
CREATE TABLE `actor_starredin_movie` (
  `nr` int(11) NOT NULL,
  `movie.id` int(11) NOT NULL,
  `actor.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `certification`
--
 
CREATE TABLE `certification` (
  `id` int(11) NOT NULL,
  `country` varchar(255) NOT NULL,
  `rating` varchar(255) NOT NULL,
  `reason` text NOT NULL,
  `age_limit` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `country`
--
 
CREATE TABLE `country` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `country_has_releasedate`
--
 
CREATE TABLE `country_has_releasedate` (
  `nr` int(11) NOT NULL,
  `country.id` int(11) NOT NULL,
  `releasedate.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `director`
--
 
CREATE TABLE `director` (
  `id` int(11) NOT NULL,
  `fName` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `lName` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `dob` date NOT NULL,
  `imdb_id` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `director_directed_movie`
--
 
CREATE TABLE `director_directed_movie` (
  `nr` int(11) NOT NULL,
  `director.id` int(11) NOT NULL,
  `movie.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `genre`
--
 
CREATE TABLE `genre` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `language`
--
 
CREATE TABLE `language` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `language_spokenin_country`
--
 
CREATE TABLE `language_spokenin_country` (
  `nr` int(11) NOT NULL,
  `language.id` int(11) NOT NULL,
  `country.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `media`
--
 
CREATE TABLE `media` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `host` varchar(255) NOT NULL,
  `link` varchar(2083) NOT NULL,
  `age_restriction` int(11) NOT NULL,
  `media_type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `media_promotes_movies`
--
 
CREATE TABLE `media_promotes_movies` (
  `nr` int(11) NOT NULL,
  `media.id` int(11) NOT NULL,
  `movie.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `movie`
--
 
CREATE TABLE `movie` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `imdb_year` year(4) NOT NULL,
  `imdb_id` int(11) NOT NULL,
  `imdb_rating` float NOT NULL,
  `runtime` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `movie_filmedin_country`
--
 
CREATE TABLE `movie_filmedin_country` (
  `nr` int(11) NOT NULL,
  `movie.id` int(11) NOT NULL,
  `country.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `movie_has_certification`
--
 
CREATE TABLE `movie_has_certification` (
  `nr` int(11) NOT NULL,
  `movie.id` int(11) NOT NULL,
  `certification.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `movie_has_genre`
--
 
CREATE TABLE `movie_has_genre` (
  `nr` int(11) NOT NULL,
  `movie.id` int(11) NOT NULL,
  `genre.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `movie_has_rating`
--
 
CREATE TABLE `movie_has_rating` (
  `nr` int(11) NOT NULL,
  `movie.id` int(11) NOT NULL,
  `rating.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `otherstaff`
--
 
CREATE TABLE `otherstaff` (
  `id` int(11) NOT NULL,
  `fName` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `lName` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `dob` date NOT NULL,
  `imdb_id` varchar(255) NOT NULL,
  `role` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `otherstaff_workedin_movie`
--
 
CREATE TABLE `otherstaff_workedin_movie` (
  `nr` int(11) NOT NULL,
  `otherstaff.id` int(11) NOT NULL,
  `movie.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `prodcomp`
--
 
CREATE TABLE `prodcomp` (
  `id` int(11) NOT NULL,
  `name` int(11) NOT NULL,
  `imdb_id` int(11) NOT NULL,
  `street_address` int(11) NOT NULL,
  `city` int(11) NOT NULL,
  `postal_code` int(11) NOT NULL,
  `country` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `prodcomp_produced_movie`
--
 
CREATE TABLE `prodcomp_produced_movie` (
  `nr` int(11) NOT NULL,
  `prodcomp.id` int(11) NOT NULL,
  `movie.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `rating`
--
 
CREATE TABLE `rating` (
  `id` int(11) NOT NULL,
  `source` varchar(255) NOT NULL,
  `grade` float NOT NULL,
  `scale` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `releasedate`
--
 
CREATE TABLE `releasedate` (
  `id` int(11) NOT NULL,
  `theater` date NOT NULL,
  `dvd` date NOT NULL,
  `bluray` date NOT NULL,
  `streaming` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `showtime`
--
 
CREATE TABLE `showtime` (
  `id` int(11) NOT NULL,
  `date` date NOT NULL,
  `time_slot` time NOT NULL,
  `3D` tinyint(1) NOT NULL,
  `IMAX` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `theater`
--
 
CREATE TABLE `theater` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `address` varchar(255) NOT NULL,
  `city` varchar(255) NOT NULL,
  `state` varchar(255) NOT NULL,
  `postal_code` int(11) NOT NULL,
  `country` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `theater_has_showtime`
--
 
CREATE TABLE `theater_has_showtime` (
  `nr` int(11) NOT NULL,
  `theater.id` int(11) NOT NULL,
  `showtime.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `writer`
--
 
CREATE TABLE `writer` (
  `id` int(11) NOT NULL,
  `fName` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `lName` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `dob` date NOT NULL,
  `imdb_id` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
--
-- Table structure for table `writer_wrote_movie`
--
 
CREATE TABLE `writer_wrote_movie` (
  `nr` int(11) NOT NULL,
  `writer.id` int(11) NOT NULL,
  `movie.id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
--
-- Indexes for dumped tables
--
 
--
-- Indexes for table `actor`
--
ALTER TABLE `actor`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `actor_starredin_movie`
--
ALTER TABLE `actor_starredin_movie`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `certification`
--
ALTER TABLE `certification`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `country`
--
ALTER TABLE `country`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `country_has_releasedate`
--
ALTER TABLE `country_has_releasedate`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `director`
--
ALTER TABLE `director`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `director_directed_movie`
--
ALTER TABLE `director_directed_movie`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `genre`
--
ALTER TABLE `genre`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `language`
--
ALTER TABLE `language`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `language_spokenin_country`
--
ALTER TABLE `language_spokenin_country`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `media`
--
ALTER TABLE `media`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `media_promotes_movies`
--
ALTER TABLE `media_promotes_movies`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `movie`
--
ALTER TABLE `movie`
  ADD PRIMARY KEY (`id`) USING BTREE;
 
--
-- Indexes for table `movie_filmedin_country`
--
ALTER TABLE `movie_filmedin_country`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `movie_has_certification`
--
ALTER TABLE `movie_has_certification`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `movie_has_genre`
--
ALTER TABLE `movie_has_genre`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `movie_has_rating`
--
ALTER TABLE `movie_has_rating`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `otherstaff`
--
ALTER TABLE `otherstaff`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `otherstaff_workedin_movie`
--
ALTER TABLE `otherstaff_workedin_movie`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `prodcomp`
--
ALTER TABLE `prodcomp`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `prodcomp_produced_movie`
--
ALTER TABLE `prodcomp_produced_movie`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `rating`
--
ALTER TABLE `rating`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `releasedate`
--
ALTER TABLE `releasedate`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `showtime`
--
ALTER TABLE `showtime`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `theater`
--
ALTER TABLE `theater`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `theater_has_showtime`
--
ALTER TABLE `theater_has_showtime`
  ADD PRIMARY KEY (`nr`);
 
--
-- Indexes for table `writer`
--
ALTER TABLE `writer`
  ADD PRIMARY KEY (`id`);
 
--
-- Indexes for table `writer_wrote_movie`
--
ALTER TABLE `writer_wrote_movie`
  ADD PRIMARY KEY (`nr`);
 
--
-- AUTO_INCREMENT for dumped tables
--
 
--
-- AUTO_INCREMENT for table `actor`
--
ALTER TABLE `actor`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
 
--
-- AUTO_INCREMENT for table `actor_starredin_movie`
--
ALTER TABLE `actor_starredin_movie`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `certification`
--
ALTER TABLE `certification`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `country`
--
ALTER TABLE `country`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `country_has_releasedate`
--
ALTER TABLE `country_has_releasedate`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `director`
--
ALTER TABLE `director`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `director_directed_movie`
--
ALTER TABLE `director_directed_movie`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `genre`
--
ALTER TABLE `genre`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `language`
--
ALTER TABLE `language`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `language_spokenin_country`
--
ALTER TABLE `language_spokenin_country`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `media`
--
ALTER TABLE `media`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `media_promotes_movies`
--
ALTER TABLE `media_promotes_movies`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `movie_filmedin_country`
--
ALTER TABLE `movie_filmedin_country`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `movie_has_certification`
--
ALTER TABLE `movie_has_certification`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `movie_has_genre`
--
ALTER TABLE `movie_has_genre`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `movie_has_rating`
--
ALTER TABLE `movie_has_rating`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `otherstaff`
--
ALTER TABLE `otherstaff`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `otherstaff_workedin_movie`
--
ALTER TABLE `otherstaff_workedin_movie`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `prodcomp`
--
ALTER TABLE `prodcomp`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `prodcomp_produced_movie`
--
ALTER TABLE `prodcomp_produced_movie`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `rating`
--
ALTER TABLE `rating`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `releasedate`
--
ALTER TABLE `releasedate`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `showtime`
--
ALTER TABLE `showtime`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `theater`
--
ALTER TABLE `theater`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `theater_has_showtime`
--
ALTER TABLE `theater_has_showtime`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `writer`
--
ALTER TABLE `writer`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
--
-- AUTO_INCREMENT for table `writer_wrote_movie`
--
ALTER TABLE `writer_wrote_movie`
  MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
 
/*!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 */;

Comments