-- http://www.phpmyadmin.net
-- 
-- Erstellungszeit: 06. März 2008 um 08:25
-- Server Version: 4.1.10
-- PHP-Version: 5.0.3
-- 
-- Datenbank: `niki_2008_setup`
-- 

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

-- 
-- Tabellenstruktur für Tabelle `drivers`
-- 

CREATE TABLE IF NOT EXISTS `drivers` (
  `d_id` int(11) NOT NULL auto_increment,
  `d_lname` varchar(20) NOT NULL default '',
  `d_fname` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`d_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=39 ;

-- 
-- Daten für Tabelle `drivers`
-- 

INSERT INTO `drivers` (`d_id`, `d_lname`, `d_fname`) VALUES (1, 'RAIKKONEN', 'Kimi'),
(2, 'MASSA', 'Felipe'),
(3, 'HEIDFELD', 'Nick'),
(4, 'KUBICA', 'Robert'),
(5, 'ALONSO', 'Fernando'),
(6, 'PIQUET', 'Nelson Jr.'),
(7, 'ROSBERG', 'Nico'),
(8, 'NAKAJIMA', 'Kazuki'),
(9, 'COULTHARD', 'David'),
(10, 'WEBBER', 'Mark'),
(11, 'TRULLI', 'Jarno'),
(12, 'GLOCK', 'Timo'),
(14, 'BOURDAIS', 'Sebastien'),
(15, 'VETTEL', 'Sebastian'),
(16, 'BUTTON', 'Jenson'),
(17, 'BARRICHELLO', 'Rubens'),
(18, 'SATO', 'Takuma'),
(19, 'DAVIDSON', 'Anthony'),
(20, 'SUTIL', 'Adrian'),
(21, 'FISICHELLA', 'Giancarlo'),
(22, 'HAMILTON', 'Lewis'),
(23, 'KOVALAINEN', 'Heikki'),
(24, 'BADOER', 'Luca'),
(25, 'GENE', 'Marc'),
(26, 'KLIEN', 'Christian'),
(27, 'ASMER', 'Marko'),
(28, 'GROSJEAN', 'Romain'),
(29, 'DI GRASSI', 'Lucas'),
(30, 'YAMAMOTO', 'Sakon'),
(31, 'HUELKENBERG', 'Nico'),
(32, 'BUEMI', 'Sebastien'),
(33, 'KOBAYASHI', 'Kamui'),
(34, 'WURZ', 'Alexander'),
(35, 'ROSSITER', 'James'),
(36, 'LIUZZI', 'Vitantonio'),
(37, 'DE LA ROSA', 'Pedro'),
(38, 'PAFFETT', 'Gary');

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

-- 
-- Tabellenstruktur für Tabelle `events`
-- 

CREATE TABLE IF NOT EXISTS `events` (
  `e_id` int(11) NOT NULL auto_increment,
  `e_type` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`e_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

-- 
-- Daten für Tabelle `events`
-- 

INSERT INTO `events` (`e_id`, `e_type`) VALUES (1, 'QUALIFYING'),
(2, 'RACE');

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

-- 
-- Tabellenstruktur für Tabelle `gps`
-- 

CREATE TABLE IF NOT EXISTS `gps` (
  `g_id` int(11) NOT NULL auto_increment,
  `g_name` varchar(40) NOT NULL default '',
  `g_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
  `g_flag` varchar(20) NOT NULL default '',
  `g_circuit` varchar(40) NOT NULL default '',
  PRIMARY KEY  (`g_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;

-- 
-- Daten für Tabelle `gps`
-- 

INSERT INTO `gps` (`g_id`, `g_name`, `g_datetime`, `g_flag`, `g_circuit`) VALUES (1, 'AUSTRALIA (Melbourne)', '2008-03-16 05:30:00', 'flag_AUSTRALIA.gif', 'circuit_AUSTRALIA.gif'),
(2, 'MALAYSIA (Sepang)', '2008-03-23 08:00:00', 'flag_MALAYSIA.gif', 'circuit_MALAYSIA.gif'),
(3, 'BAHRAIN (Sakhir)', '2008-04-06 13:30:00', 'flag_BAHRAIN.gif', 'circuit_BAHRAIN.gif'),
(4, 'SPAIN (Barcelona)', '2008-04-27 14:00:00', 'flag_SPAIN.gif', 'circuit_SPAIN_(Barcelona).gif'),
(5, 'TURKEY (Istanbul)', '2008-05-11 14:00:00', 'flag_TURKEY.gif', 'circuit_TURKEY.gif'),
(6, 'MONACO (Monte Carlo)', '2008-05-25 14:00:00', 'flag_MONACO.gif', 'circuit_MONACO.gif'),
(7, 'CANADA (Montreal)', '2008-06-08 19:00:00', 'flag_CANADA.gif', 'circuit_CANADA.gif'),
(8, 'FRANCE (Magny-Cours)', '2008-06-22 14:00:00', 'flag_FRANCE.gif', 'circuit_FRANCE.gif'),
(9, 'GREAT BRITAIN (Silverstone)', '2008-07-06 14:00:00', 'flag_UK.gif', 'circuit_UK.gif'),
(10, 'GERMANY (Hockenheim)', '2008-07-20 14:00:00', 'flag_GERMANY.gif', 'circuit_GERMANY_(Hockenheim).gif'),
(11, 'HUNGARY (Budapest)', '2008-08-03 14:00:00', 'flag_HUNGARY.gif', 'circuit_HUNGARY.gif'),
(12, 'EUROPE (Valencia)', '2008-08-24 14:00:00', 'flag_EUROPE.gif', 'circuit_EUROPE_(Valencia).gif'),
(13, 'BELGIUM (Spa)', '2008-09-07 14:00:00', 'flag_BELGIUM.gif', 'circuit_BELGIUM.gif'),
(14, 'ITALY (Monza)', '2008-09-14 14:00:00', 'flag_ITALY.gif', 'circuit_ITALY.gif'),
(15, 'SINGAPORE (Singapore)', '2008-09-28 14:00:00', 'flag_SINGAPORE.gif', 'circuit_SINGAPORE.gif'),
(16, 'JAPAN (Fuji)', '2008-10-12 06:30:00', 'flag_JAPAN.gif', 'circuit_JAPAN_(Fuji).gif'),
(17, 'CHINA (Shanghai)', '2008-10-19 09:00:00', 'flag_CHINA.gif', 'circuit_CHINA.gif'),
(18, 'BRASIL (Sao Paolo)', '2008-11-02 19:00:00', 'flag_BRASIL.gif', 'circuit_BRASIL.gif');

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

-- 
-- Tabellenstruktur für Tabelle `results`
-- 

CREATE TABLE IF NOT EXISTS `results` (
  `r_g_id` int(11) NOT NULL default '0',
  `r_e_id` int(11) NOT NULL default '0',
  `r_d_id_p1` int(11) NOT NULL default '0',
  `r_d_id_p2` int(11) NOT NULL default '0',
  `r_d_id_p3` int(11) NOT NULL default '0',
  `r_fl` int(11) NOT NULL default '0',
  `r_sc` int(11) NOT NULL default '-1',
  PRIMARY KEY  (`r_g_id`,`r_e_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- 
-- Daten für Tabelle `results`
-- 


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

-- 
-- Tabellenstruktur für Tabelle `tips`
-- 

CREATE TABLE IF NOT EXISTS `tips` (
  `t_u_id` int(11) NOT NULL default '0',
  `t_g_id` int(11) NOT NULL default '0',
  `t_e_id` int(11) NOT NULL default '0',
  `t_d_id_p1` int(11) NOT NULL default '0',
  `t_d_id_p2` int(11) NOT NULL default '0',
  `t_d_id_p3` int(11) NOT NULL default '0',
  `t_fl` int(11) NOT NULL default '0',
  `t_sc` int(11) NOT NULL default '0',
  `t_timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
  `t_score` int(11) NOT NULL default '0',
  PRIMARY KEY  (`t_u_id`,`t_g_id`,`t_e_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
        