-- http://www.phpmyadmin.net
-- 
-- Erstellungszeit: 04. April 2009 um 12:10
-- Server Version: 4.1.18
-- PHP-Version: 4.4.2
-- 
-- Datenbank: `niki_2006`
-- 

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

-- 
-- 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=27 ;

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

INSERT INTO `drivers` (`d_id`, `d_lname`, `d_fname`) VALUES (1, 'ALONSO', 'Fernando'),
(2, 'FISICHELLA', 'Giancarlo'),
(3, 'RAIKKONEN', 'Kimi'),
(4, 'MONTOYA', 'Juan Pablo'),
(5, 'SCHUMACHER', 'Michael'),
(6, 'MASSA', 'Felipe'),
(7, 'SCHUMACHER', 'Ralf'),
(8, 'TRULLI', 'Jarno'),
(9, 'WEBBER', 'Mark'),
(10, 'ROSBERG', 'Nico'),
(11, 'BARRICHELLO', 'Rubens'),
(12, 'BUTTON', 'Jenson'),
(13, 'COULTHARD', 'David'),
(14, 'KLIEN', 'Christian'),
(15, 'HEIDFELD', 'Nick'),
(16, 'VILLENEUVE', 'Jacques'),
(17, 'MONTEIRO', 'Tiago'),
(18, 'ALBERS', 'Christijan'),
(19, 'LIUZZI', 'Vitantonio'),
(20, 'SPEED', 'Scott'),
(21, 'SATO', 'Takuma'),
(22, 'IDE', 'Yuji'),
(23, 'MONTAGNY', 'Franck'),
(24, 'DE LA ROSA', 'Pedro'),
(25, 'YAMAMOTO', 'Sakon'),
(26, 'KUBICA', 'Robert');

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

-- 
-- 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, 'BAHRAIN (Sakhir)', '2006-03-12 13:30:00', 'flag_BAHRAIN.gif', 'circuit_BAHRAIN.gif'),
(2, 'MALAYSIA (Sepang)', '2006-03-19 08:00:00', 'flag_MALAYSIA.gif', 'circuit_MALAYSIA.gif'),
(3, 'AUSTRALIA (Melbourne)', '2006-04-02 04:00:00', 'flag_AUSTRALIA.gif', 'circuit_AUSTRALIA.gif'),
(4, 'SAN MARINO (Imola)', '2006-04-23 14:00:00', 'flag_SANMARINO.gif', 'circuit_SANMARINO.gif'),
(5, 'EUROPE (Nuerburgring)', '2006-05-07 14:00:00', 'flag_EUROPE.gif', 'circuit_GERMANY_(Nuerburgring).gif'),
(6, 'SPAIN (Barcelona)', '2006-05-14 14:00:00', 'flag_SPAIN.gif', 'circuit_SPAIN.gif'),
(7, 'MONACO (Monte Carlo)', '2006-05-28 14:00:00', 'flag_MONACO.gif', 'circuit_MONACO.gif'),
(8, 'GREAT BRITAIN (Silverstone)', '2006-06-11 14:00:00', 'flag_UK.gif', 'circuit_UK.gif'),
(9, 'CANADA (Montreal)', '2006-06-25 19:00:00', 'flag_CANADA.gif', 'circuit_CANADA.gif'),
(10, 'USA (Indianapolis)', '2006-07-02 19:00:00', 'flag_USA.gif', 'circuit_USA.gif'),
(11, 'FRANCE (Magny-Cours)', '2006-07-16 14:00:00', 'flag_FRANCE.gif', 'circuit_FRANCE.gif'),
(12, 'GERMANY (Hockenheim)', '2006-07-30 14:00:00', 'flag_GERMANY.gif', 'circuit_GERMANY_(Hockenheim).gif'),
(13, 'HUNGARY (Budapest)', '2006-08-06 14:00:00', 'flag_HUNGARY.gif', 'circuit_HUNGARY.gif'),
(14, 'TURKEY (Istanbul)', '2006-08-27 14:00:00', 'flag_TURKEY.gif', 'circuit_TURKEY.gif'),
(15, 'ITALY (Monza)', '2006-09-10 14:00:00', 'flag_ITALY.gif', 'circuit_ITALY.gif'),
(16, 'CHINA (Shanghai)', '2006-10-01 08:00:00', 'flag_CHINA.gif', 'circuit_CHINA.gif'),
(17, 'JAPAN (Suzuka)', '2006-10-08 07:00:00', 'flag_JAPAN.gif', 'circuit_JAPAN_(Suzuka).gif'),
(18, 'BRASIL (Sao Paolo)', '2006-10-22 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',
  PRIMARY KEY  (`r_g_id`,`r_e_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

INSERT INTO `results` (`r_g_id`, `r_e_id`, `r_d_id_p1`, `r_d_id_p2`, `r_d_id_p3`) VALUES (1, 1, 5, 6, 12),
(1, 2, 1, 5, 3),
(2, 1, 2, 12, 10),
(2, 2, 2, 1, 12),
(3, 1, 12, 2, 1),
(3, 2, 1, 3, 7),
(4, 1, 5, 12, 11),
(4, 2, 5, 1, 4),
(5, 1, 1, 5, 6),
(5, 2, 5, 1, 6),
(6, 1, 1, 2, 5),
(6, 2, 1, 5, 2),
(7, 1, 1, 9, 3),
(7, 2, 1, 4, 13),
(8, 1, 1, 3, 5),
(8, 2, 1, 5, 3),
(9, 1, 1, 2, 3),
(9, 2, 1, 5, 3),
(10, 1, 5, 6, 2),
(10, 2, 5, 6, 2),
(11, 1, 5, 6, 1),
(11, 2, 5, 1, 6),
(12, 1, 3, 5, 6),
(12, 2, 5, 6, 3),
(13, 1, 3, 6, 11),
(13, 2, 12, 24, 15),
(14, 1, 6, 5, 1),
(14, 2, 6, 1, 5),
(15, 1, 3, 5, 15),
(15, 2, 5, 3, 26),
(16, 1, 1, 2, 11),
(16, 2, 5, 1, 2),
(17, 1, 6, 5, 7),
(17, 2, 1, 6, 2),
(18, 1, 6, 3, 8),
(18, 2, 6, 1, 12);

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

-- 
-- 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_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;

-- 
-- Daten für Tabelle `tips`
-- 

INSERT INTO `tips` (`t_u_id`, `t_g_id`, `t_e_id`, `t_d_id_p1`, `t_d_id_p2`, `t_d_id_p3`, `t_timestamp`, `t_score`) VALUES (1, 1, 1, 1, 3, 12, '2006-03-10 16:59:04', 2),
(1, 1, 2, 1, 5, 4, '2006-03-11 18:21:05', 4),
(1, 2, 1, 1, 3, 5, '2006-03-17 08:40:38', 0),
(1, 2, 2, 3, 1, 4, '2006-03-18 09:56:09', 2),
(1, 3, 1, 3, 1, 12, '2006-03-31 18:35:54', 2),
(1, 3, 2, 3, 1, 12, '2006-04-01 09:37:37', 2),
(1, 4, 1, 5, 1, 2, '2006-04-22 12:01:46', 2),
(1, 4, 2, 5, 1, 3, '2006-04-22 16:52:27', 4),
(1, 5, 1, 1, 3, 5, '2006-05-05 19:23:31', 3),
(1, 5, 2, 1, 5, 3, '2006-05-06 15:16:55', 2),
(1, 6, 1, 5, 6, 12, '2006-05-13 12:05:11', 1),
(1, 6, 2, 1, 5, 2, '2006-05-13 15:14:14', 6),
(1, 7, 1, 1, 5, 2, '2006-05-27 12:02:09', 2),
(1, 7, 2, 1, 3, 4, '2006-05-28 10:27:25', 3),
(1, 8, 1, 5, 1, 6, '2006-06-10 12:29:53', 2),
(1, 8, 2, 1, 5, 2, '2006-06-10 14:44:01', 4),
(1, 9, 1, 1, 5, 3, '2006-06-24 12:46:43', 4),
(1, 9, 2, 1, 3, 2, '2006-06-24 22:56:48', 3),
(1, 10, 1, 1, 3, 5, '2006-07-01 12:41:29', 1),
(1, 10, 2, 5, 2, 1, '2006-07-01 20:09:39', 3),
(1, 11, 1, 1, 5, 6, '2006-07-15 13:32:08', 3),
(1, 11, 2, 5, 1, 3, '2006-07-15 15:17:12', 4),
(1, 12, 1, 5, 6, 1, '2006-07-29 11:34:32', 2),
(1, 12, 2, 5, 3, 6, '2006-07-29 15:13:10', 4),
(1, 13, 1, 5, 6, 3, '2006-08-05 13:30:55', 3),
(1, 13, 2, 3, 6, 2, '2006-08-06 12:43:51', 0),
(1, 14, 1, 5, 3, 6, '2006-08-26 10:48:31', 2),
(1, 14, 2, 5, 6, 1, '2006-08-27 13:59:01', 3),
(1, 15, 1, 6, 5, 3, '2006-09-09 11:47:23', 3),
(1, 15, 2, 3, 5, 6, '2006-09-10 07:39:25', 2),
(1, 16, 1, 5, 1, 3, '2006-09-30 07:44:56', 1),
(1, 16, 2, 1, 3, 5, '2006-09-30 09:16:46', 2),
(1, 17, 1, 5, 1, 3, '2006-10-07 06:44:29', 1),
(1, 17, 2, 5, 6, 1, '2006-10-07 09:35:18', 3),
(1, 18, 1, 5, 6, 12, '2006-10-22 18:46:23', 1),
(1, 18, 2, 6, 3, 1, '2006-10-22 13:00:28', 3),
(2, 1, 1, 5, 1, 12, '2006-03-11 11:30:54', 4),
(2, 1, 2, 4, 1, 6, '2006-03-12 11:03:00', 1),
(2, 2, 1, 3, 5, 1, '2006-03-17 17:49:56', 0),
(2, 2, 2, 4, 3, 2, '2006-03-18 18:25:06', 1),
(2, 3, 1, 12, 1, 5, '2006-03-31 21:37:42', 3),
(2, 3, 2, 1, 3, 2, '2006-04-01 09:36:21', 4),
(2, 4, 1, 1, 5, 2, '2006-04-22 13:42:22', 1),
(2, 4, 2, 5, 1, 12, '2006-04-23 11:34:47', 4),
(2, 5, 1, 5, 1, 12, '2006-05-06 13:52:37', 2),
(2, 5, 2, 5, 1, 3, '2006-05-06 15:17:22', 4),
(2, 6, 1, 1, 5, 2, '2006-05-13 13:30:18', 4),
(2, 6, 2, 1, 5, 6, '2006-05-13 15:10:34', 4),
(2, 7, 1, 5, 1, 4, '2006-05-27 13:59:51', 1),
(2, 7, 2, 5, 1, 3, '2006-05-27 15:07:51', 1),
(2, 8, 1, 1, 2, 5, '2006-06-10 11:54:03', 4),
(2, 8, 2, 3, 1, 5, '2006-06-11 12:22:39', 3),
(2, 9, 1, 3, 1, 16, '2006-06-24 17:56:34', 2),
(2, 9, 2, 1, 2, 3, '2006-06-24 20:01:03', 4),
(2, 10, 1, 5, 1, 6, '2006-07-01 17:04:33', 3),
(2, 10, 2, 5, 6, 2, '2006-07-01 20:08:13', 6),
(2, 11, 1, 1, 2, 5, '2006-07-15 12:02:35', 2),
(2, 11, 2, 1, 5, 6, '2006-07-16 13:46:40', 4),
(2, 12, 1, 5, 1, 6, '2006-07-29 12:14:06', 3),
(2, 12, 2, 5, 6, 3, '2006-07-29 15:09:17', 6),
(2, 13, 1, 5, 3, 6, '2006-08-05 13:37:42', 2),
(2, 13, 2, 3, 6, 24, '2006-08-06 12:44:37', 1),
(2, 14, 1, 5, 6, 12, '2006-08-26 13:01:28', 2),
(2, 14, 2, 5, 1, 6, '2006-08-27 13:59:23', 4),
(2, 15, 1, 5, 6, 3, '2006-09-09 11:46:13', 2),
(2, 15, 2, 3, 5, 1, '2006-09-10 13:34:04', 2),
(2, 16, 1, 1, 12, 5, '2006-09-30 07:56:33', 2),
(2, 16, 2, 1, 2, 3, '2006-10-01 07:47:41', 2),
(2, 17, 1, 1, 5, 3, '2006-10-07 02:58:14', 2),
(2, 17, 2, 5, 6, 7, '2006-10-08 05:54:14', 2),
(2, 18, 1, 6, 5, 1, '2006-10-22 18:59:57', 2),
(2, 18, 2, 6, 1, 5, '2006-10-22 18:40:52', 4);
        