Kód:
-- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Hostiteľ: localhost
-- Vygenerované:: 10.Okt, 2011 - 18:10
-- Verzia serveru: 5.1.36
-- Verzia PHP: 5.3.0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Databáza: `moviesite`
--
CREATE DATABASE `moviesite` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `moviesite`;
-- --------------------------------------------------------
--
-- Štruktúra tabuľky pre tabuľku `movie`
--
CREATE TABLE IF NOT EXISTS `movie` (
`movie_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`movie_name` varchar(255) CHARACTER SET latin1 NOT NULL,
`movie_type` tinyint(4) NOT NULL DEFAULT '0',
`movie_year` smallint(5) unsigned NOT NULL DEFAULT '0',
`movie_leadactor` int(10) unsigned NOT NULL DEFAULT '0',
`movie_director` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`movie_id`),
KEY `movie_type` (`movie_type`,`movie_year`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_slovak_ci AUTO_INCREMENT=4 ;
--
-- Sťahujem dáta pre tabuľku `movie`
--
INSERT INTO `movie` (`movie_id`, `movie_name`, `movie_type`, `movie_year`, `movie_leadactor`, `movie_director`) VALUES
(1, 'Božs?ký Bruce', 5, 2003, 1, 2),
(2, 'Maléry pána šikuly', 5, 1999, 5, 6),
(3, 'Grand Canyon', 2, 1991, 4, 3);
-- --------------------------------------------------------
--
-- Štruktúra tabuľky pre tabuľku `movietype`
--
CREATE TABLE IF NOT EXISTS `movietype` (
`movietype_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`movietype_label` varchar(100) CHARACTER SET latin1 NOT NULL,
PRIMARY KEY (`movietype_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_slovak_ci AUTO_INCREMENT=9 ;
--
-- Sťahujem dáta pre tabuľku `movietype`
--
INSERT INTO `movietype` (`movietype_id`, `movietype_label`) VALUES
(1, 'Sci-fi'),
(2, 'Drama'),
(3, 'Dobrodružný'),
(4, 'Vojnový'),
(5, 'Komedia'),
(6, 'Horror'),
(7, 'Akcný'),
(8, 'Detský');
-- --------------------------------------------------------
--
-- Štruktúra tabuľky pre tabuľku `people`
--
CREATE TABLE IF NOT EXISTS `people` (
`people_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`people_fullname` varchar(255) CHARACTER SET latin1 NOT NULL,
`people_isactor` tinyint(1) unsigned NOT NULL DEFAULT '0',
`people_isdirector` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`people_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
--
-- Sťahujem dáta pre tabuľku `people`
--
INSERT INTO `people` (`people_id`, `people_fullname`, `people_isactor`, `people_isdirector`) VALUES
(1, 'Jim Carrey', 1, 0),
(2, 'Tom Shadyac', 0, 1),
(3, 'Lawrence Kasdan', 0, 1),
(4, 'Kevin Kline', 1, 0),
(5, 'Ron Livingston', 1, 0),
(6, 'Mike Judge', 0, 1);