| 
-- MySQL dump 9.11
--
 -- Host: localhost    Database: lumine_example
 -- ------------------------------------------------------
 -- Server version    4.0.21-nt
 
 --
 -- Table structure for table `cars`
 --
 
 set foreign_key_checks=0;
 
 CREATE TABLE cars (
 idcar int(11) NOT NULL auto_increment,
 idperson int(11) NOT NULL default '0',
 color char(20) default NULL,
 model char(40) default NULL,
 PRIMARY KEY  (idcar),
 KEY idperson (idperson),
 CONSTRAINT `cars_ibfk_1` FOREIGN KEY (`idperson`) REFERENCES `persons` (`idperson`) ON DELETE CASCADE ON UPDATE CASCADE
 ) TYPE=InnoDB;
 
 --
 -- Dumping data for table `cars`
 --
 
 INSERT INTO cars VALUES (3,10,'Red','Verona');
 INSERT INTO cars VALUES (4,10,'Black','Vectra');
 
 --
 -- Table structure for table `persons`
 --
 
 CREATE TABLE persons (
 idperson int(11) NOT NULL auto_increment,
 name text NOT NULL,
 age int(11) default NULL,
 eyecolor varchar(10) default NULL,
 PRIMARY KEY  (idperson)
 ) TYPE=InnoDB;
 
 --
 -- Dumping data for table `persons`
 --
 
 INSERT INTO persons VALUES (10,'John',24,'Blue');
 
 set foreign_key_checks=1;
 |