RE: One to many relationship

2009-04-07 Thread abdulazeez alugo
> Date: Mon, 6 Apr 2009 10:07:01 -0500 > From: peter.braw...@earthlink.net > To: defati...@hotmail.com > CC: mysql@lists.mysql.com > Subject: Re: One to many relationship > > Abdul, > > Is this what you mean? > > CREATE TABLE Table1 ( > table1_id INT

Re: One to many relationship

2009-04-06 Thread Peter Brawley
Abdul, Is this what you mean? CREATE TABLE Table1 ( table1_id INT UNSIGNED PRIMARY KEY AUTO INCREMENT, entrydate TIMESTAMP )ENGINE=INNODB; CREATE TABLE table2 ( table2_id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, table1_id INT UNSIGNED NOT NULL, entrydate TIMESTAMP, FOREIGN KEY(table1_id) REFEREN

Re: One to many relationship

2009-04-06 Thread Martijn Tonies
Hi, I'm trying to design a relational database where two tables link to each other through unique id sa below Table 1 table1_id INT UNSIGNED NOT NULL AUTO INCREMENT, entrydate TIMESTAMP Table2 table2_id INT UNSIGNED NOT NULL AUTO_INCREMENT, table1_id INT UNSIGNED NOT NULL, entrydate TIMESTAMP,

One to many relationship

2009-04-05 Thread abdulazeez alugo
Hello all, I'm trying to design a relational database where two tables link to each other through unique id sa below Table 1 table1_id INT UNSIGNED NOT NULL AUTO INCREMENT, entrydate TIMESTAMP Table2 table2_id INT UNSIGNED NOT NULL AUTO_INCREMENT, table1_id INT UNSIGNED NOT NULL, entryda