CREATE TABLE `film`  ( 
	`film_id`             	smallint(6) AUTO_INCREMENT COMMENT 'This column is a film identifier'  NOT NULL,
	`title`               	varchar(255) COMMENT 'This column contains stores Film Title'  NULL DEFAULT 'Film_name',
	`description`         	text COMMENT 'Blob/Text datatype cannot have default values'  NULL,
	`release_year`        	year(4) COMMENT 'This column stores Release year of the film'  NULL DEFAULT '2013',
	`languale_id`         	tinyint(4) UNSIGNED COMMENT 'This column stores the language identifiers'  NOT NULL,
	`original_language_id`	longblob COMMENT 'Blob/Text datatype cannot have default values'  NULL,
	`rental_duration`     	bigint(20) UNSIGNED ZEROFILL COMMENT 'This column stores the rental duration of film'  NOT NULL DEFAULT '00000000000000000003',
	`rental_rate`         	decimal(12,2) COMMENT 'This column contains the rental  rate of film '  NOT NULL DEFAULT '4.99',
	`length`              	smallint(6) UNSIGNED COMMENT 'This Column can be dropped from table'  NULL DEFAULT '0',
	`replacement_cost`    	double COMMENT 'This column stores the replacement cost'  NOT NULL DEFAULT '4.99',
	`rating`              	enum('G','PG','PG-13','R','NC-17') COMMENT 'Can take only one value from ENUM'  NOT NULL DEFAULT 'G',
	`special_features`    	set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') COMMENT 'Can take zero or more values from a SET'  NULL DEFAULT 'Trailers',
	`last_update`         	timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
	PRIMARY KEY(`film_id`)
)
ENGINE = InnoDB
AUTO_INCREMENT = 3
DELAY_KEY_WRITE = 1
MIN_ROWS = 1
PACK_KEYS = 1
AVG_ROW_LENGTH = 1000
ROW_FORMAT = DYNAMIC
MAX_ROWS = 1000
CHECKSUM = 1
COMMENT = 'This table stores the information related to Film' 
GO
ALTER TABLE `film`
	ADD CONSTRAINT `film_index`
	UNIQUE (`title`)
GO

CREATE INDEX `language_id_fk` USING BTREE 
	ON `film`(`languale_id`)
GO


