Questo è il dump del database su cui ho iniziato a provare la struttura delle tabelle. Mancano ancora diversi campi per le varie tabelle e, cosa "molto" importante, non sono riuscito ancora a realizzare nulla di concreto per la memorizzazione degli interpreti. Non ho compreso bene il "sistema" per assegnare ad un film più attori.
codice:
-- phpMyAdmin SQL Dump
-- version 2.6.1-rc2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generato il: 07 Nov, 2005 at 04:40 PM
-- Versione MySQL: 4.1.9
-- Versione PHP: 5.0.3
--
-- Database: `mydvd`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `dvd_dati`
--
CREATE TABLE dvd_dati (
id_dvd int(10) NOT NULL auto_increment,
titolo varchar(100) NOT NULL default '',
id_locandina int(10) NOT NULL default '0',
id_genere int(10) NOT NULL default '0',
nazione varchar(50) NOT NULL default '',
anno year(4) NOT NULL default '0000',
id_regia int(10) unsigned NOT NULL default '0',
trama text NOT NULL,
PRIMARY KEY (id_dvd),
FULLTEXT KEY titolo (titolo),
FULLTEXT KEY trama (trama)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Anagrafica dvd' AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
--
-- Struttura della tabella `generi`
--
CREATE TABLE generi (
id_genere int(10) NOT NULL auto_increment,
descrizione varchar(50) NOT NULL default '',
PRIMARY KEY (id_genere),
UNIQUE KEY descrizione (descrizione)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;
-- --------------------------------------------------------
--
-- Struttura della tabella `locandine`
--
CREATE TABLE locandine (
id_locandina int(10) NOT NULL auto_increment,
immagine varchar(100) NOT NULL default '',
PRIMARY KEY (id_locandina)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
--
-- Struttura della tabella `registi`
--
CREATE TABLE registi (
id_regista int(10) NOT NULL default '0',
cognome varchar(50) NOT NULL default '',
nome varchar(50) NOT NULL default '',
PRIMARY KEY (id_regista)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;