Login   Register  
PHP Classes
elePHPant
Icontem

File: imdb_create.sql

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mikael  >  IMDb_Fetch  >  imdb_create.sql  >  Download  
File: imdb_create.sql
Role: Auxiliary data
Content type: text/plain
Description: MySQL tables for cache
Class: IMDb_Fetch
Retrieve information about movies from IMDB
Author: By
Last change:
Date: 2007-09-26 04:22
Size: 6,048 bytes
 

Contents

Class file image Download
-- phpMyAdmin SQL Dump
-- version 2.10.0-rc1
-- http://www.phpmyadmin.net
-- 
-- Host: localhost
-- Generation Time: Sep 05, 2007 at 05:29 PM
-- Server version: 5.0.19
-- PHP Version: 5.1.4

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

-- 
-- Database: `imdb`
-- 

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_cast`
-- 

CREATE TABLE `imdb_cast` (
  `cast_id` int(7) unsigned NOT NULL auto_increment,
  `cast_imdb` varchar(9) NOT NULL,
  `name` varchar(40) NOT NULL,
  `role` varchar(60) NOT NULL,
  PRIMARY KEY  (`cast_id`),
  UNIQUE KEY `cast_imdb` (`cast_imdb`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Cast and role from IMDb' AUTO_INCREMENT=16 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_cast_title`
-- 

CREATE TABLE `imdb_cast_title` (
  `cast_id` smallint(5) unsigned NOT NULL,
  `movie_id` smallint(5) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Connections between movies and cast';

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_country`
-- 

CREATE TABLE `imdb_country` (
  `country_id` smallint(3) NOT NULL auto_increment,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY  (`country_id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Countries used in IMDb titles' AUTO_INCREMENT=3 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_country_title`
-- 

CREATE TABLE `imdb_country_title` (
  `country_id` smallint(5) unsigned NOT NULL,
  `movie_id` smallint(5) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Connections between movies and country';

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_director`
-- 

CREATE TABLE `imdb_director` (
  `director_id` smallint(3) unsigned NOT NULL auto_increment,
  `director_imdb` varchar(9) NOT NULL,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY  (`director_id`),
  KEY `director_imdb` (`director_imdb`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Directors at IMDb.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_dir_title`
-- 

CREATE TABLE `imdb_dir_title` (
  `director_id` smallint(5) unsigned NOT NULL,
  `movie_id` smallint(5) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Connections between movies and director';

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_genre`
-- 

CREATE TABLE `imdb_genre` (
  `genre_id` smallint(3) unsigned NOT NULL auto_increment,
  `title_id` int(7) unsigned NOT NULL,
  `genre` varchar(40) NOT NULL,
  PRIMARY KEY  (`genre_id`),
  UNIQUE KEY `title_id` (`title_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='IMDb Genres' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_genre_title`
-- 

CREATE TABLE `imdb_genre_title` (
  `genre_id` smallint(5) unsigned NOT NULL,
  `movie_id` smallint(5) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Connections between movies and genre';

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_keywords`
-- 

CREATE TABLE `imdb_keywords` (
  `keyword_id` smallint(3) unsigned NOT NULL auto_increment,
  `title_id` int(7) unsigned NOT NULL,
  `keyword` varchar(40) NOT NULL,
  PRIMARY KEY  (`keyword_id`),
  UNIQUE KEY `title_id` (`title_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='IMDb Plot Keywords' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_key_title`
-- 

CREATE TABLE `imdb_key_title` (
  `keyword_id` smallint(5) unsigned NOT NULL,
  `movie_id` smallint(5) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Connections between movies and keywords';

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_language`
-- 

CREATE TABLE `imdb_language` (
  `language_id` smallint(3) unsigned NOT NULL auto_increment,
  `language` varchar(50) NOT NULL,
  PRIMARY KEY  (`language_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='languages at IMDb.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_language_title`
-- 

CREATE TABLE `imdb_language_title` (
  `language_id` smallint(5) unsigned NOT NULL,
  `movie_id` smallint(5) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Connections between movies and language';

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_title`
-- 

CREATE TABLE `imdb_title` (
  `title_id` int(5) unsigned NOT NULL auto_increment,
  `title_imdb` varchar(9) NOT NULL,
  `name` varchar(50) NOT NULL,
  `year` smallint(4) unsigned NOT NULL,
  `runtime` smallint(3) NOT NULL,
  `tagline` varchar(255) NOT NULL,
  `plot` varchar(255) NOT NULL,
  `poster` varchar(255) NOT NULL,
  PRIMARY KEY  (`title_id`),
  UNIQUE KEY `title_imdb` (`title_imdb`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Title information of a movie from IMDb' AUTO_INCREMENT=2 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_writer`
-- 

CREATE TABLE `imdb_writer` (
  `writer_id` smallint(3) unsigned NOT NULL auto_increment,
  `writer_imdb` varchar(50) NOT NULL,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY  (`writer_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Writers at IMDb.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `imdb_writer_title`
-- 

CREATE TABLE `imdb_writer_title` (
  `writer_id` smallint(5) unsigned NOT NULL,
  `movie_id` smallint(5) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Connections between movies and writer';