On Thu, Nov 19, 2009 at 9:34 PM, Ye Yuan wrote:
> Hi Victor,
>
> It looks to me the foreign key syntax is wrong. Can you create the
> Relationship table on your database by using below ddl?
>
> create table if not exists Relationship
> (ID integer auto_increment primary key,
> Parent integer not
Hi, Martijn, Gavin.
SHOW INNODB STATUS gave me helpful messages like following:
>
> LATEST FOREIGN KEY ERROR
>
> 090821 12:53:18 Error in foreign key constraint of table test_fk/tbl1:
>
> FOREIGN KEY (`col1` , `col2` , `col3` )
> REFERENCES `
Run:
SHOW ENGINE INNODB STATUS \G
And look for the "LATEST FOREIGN KEY ERROR" section. It'll explain the reason
for the (errno: 150) message.
Regards,
Gavin Towey
-Original Message-
From: wabiko.takuma [mailto:wab...@sysrdc.ns-sol.co.jp]
Sent: Friday, August 14, 2009 3:35 AM
To: mysql@
Hi,
I can't create InnoDB table with foreign key constraints using more than 3
colmuns.
When I create table `test_fk`.`tbl1`, it gives me:
Can't create table 'test_fk.tbl1' (errno: 150)
why? CREATE TABLE syntax looks perfectly right to me.
Any suggestions are welcome.
Thank you,
wabi
--
On Wed, Oct 8, 2008 at 11:56 AM, Jim Lyons <[EMAIL PROTECTED]> wrote:
> Indexes speed up joins. Foreign keys should be indexes themselves, so they
> can also speed up joins. If the FK is not an index, it won't help. So,
> index your FKs
If you add a FOREIGN KEY constraint in MySQL 5+ it adds an
h!/
Ben A. Hilleli
*Programmer / Analyst*
*From:* Arthur Fuller [mailto:[EMAIL PROTECTED]
*Sent:* October 8, 2008 2:55 PM
*To:* Ben A.H.
*Cc:* mysql@lists.mysql.com
*Subject:* Re: Foreign Keys
So you are talking about parent-child relationships in a single table,
or in the
mentioned, thank-you so much!
Ben A. Hilleli
Programmer / Analyst
_
From: Arthur Fuller [mailto:[EMAIL PROTECTED]
Sent: October 8, 2008 2:55 PM
To: Ben A.H.
Cc: mysql@lists.mysql.com
Subject: Re: Foreign Keys
So you are talking about parent-child relationships in a single ta
So you are talking about parent-child relationships in a single table, or in
the technical jargon reflexive relationships. See www.artfulsoftware.com for
detailed examples of how this is done, but here is the thumbnail sketch:
The table has to have a ParentID column (call it what you want) that po
I know that this is the standard means of dealing with a many to many
relationship, I'm just not sure it fits here.
> USER:
>emailID (PK)
>userName
>Password
>Address
>Etc
>
> FRIEND:
>emailID (PK)
>
> USER_FRIEND
>user_emailID
Indexes speed up joins. Foreign keys should be indexes themselves, so they
can also speed up joins. If the FK is not an index, it won't help. So,
index your FKs
On Wed, Oct 8, 2008 at 10:43 AM, Ben A.H. <[EMAIL PROTECTED]> wrote:
> Does using foreign keys simply enforce referential integrity O
I forgot to mention that the only benefit of a stored procedure would be
minimizing code in your application. you'd have a single call to the stored
procedure... though some people may prefer having the back-to-back insert
statements in their code.
On Mon, Aug 25, 2008 at 11:28 AM, Tom Nugent <[E
Joerg- Your comments below are excellent and my comments are just building
off what you have so clearly stated.
I think Stefan's best bet would be a stored procedure. Pass all the data,
insert the parent record (or make sure the parent record exists ... perhaps
it already is present) and then do
Hi Steffan, all !
Steffan A. Cline wrote:
[[...]]
I am hoping that by using FK based relationships I can just do one massive
insert into the parent table and include all related columns and somehow
magically all field and relational keys fall into place.
AFAIK, this isn't possible.
Foreign
On 04.11.2007 21:10 CE(S)T, Martijn Tonies wrote:
>> Now I have added this foreign key constraint:
>>
>> ALTER TABLE "user" ADD FOREIGN KEY ("AdditionalKeylist") REFERENCES
>> "keylist" ("KeylistId") ON DELETE SET NULL;
>
> This cannot work. The column in KEYLIST to which you are
> pointing should
Hi Yves,
> I have a problem with my foreign keys. I have the following two tables:
>
> CREATE TABLE "keylist" (
> "KeylistId" INTEGER NOT NULL,
> "UserId" INTEGER NOT NULL,
> PRIMARY KEY (KeylistId, UserId));
>
> CREATE TABLE "user" (
> "UserId" INTEGER NOT NULL PRIMARY KEY,
>
On 03.11.2007 22:52 CE(S)T, Yves Goergen wrote:
> Is my design bad?
I should explain why I do it this way at all. There's some other tables
in my system that need to keep a list of "keys" (i.e. user IDs) for
several actions. A message (one of the tables) has one keylist for read
access, one for al
I had that problem as well and a quick search revealed this:
A) Whole databases are not handled by InnoDB. The individual tables are.
Check the results of "SHOW CREATE TABLE table_name_here" for each table
you are linking from and linking to. You should see ENGINE = InnoDB after
the last ) but bef
Thanks!
Nanu
>>> "Ing. Edwin Cruz" <[EMAIL PROTECTED]> 10/03/2006 22:06:27 >>>
Ive found this on internet:
"If you re-create a table which was dropped, it has to have a
definition
which conforms to the foreign key constraints referencing it. It must
have
the right column names and types, and it
I´ve found this on internet:
"If you re-create a table which was dropped, it has to have a definition
which conforms to the foreign key constraints referencing it. It must have
the right column names and types, and it must have indexes on the referenced
keys, as stated above. If these are not satis
"Nanu Kalmanovitz" <[EMAIL PROTECTED]> wrote on 03/10/2006 02:35:08
PM:
> Hi!
>
> Server system SBS (Novell Small Business suite) 6.5 sp 1 with MySQL
> ver. 4.0.15a, PHP 4.2.3, all of them on same machine.
>
> I just finished create a new DB called TIULIM (InnoDB) with 3 tables
> (Sites, Tracks
Nick Hird <[EMAIL PROTECTED]> wrote on 09/29/2005 05:03:53 PM:
> Is there a way to have foreign keys and force referential integrity? I
have
> a main table and a lookup table, i want to be able to require that the
main
> table is using values from the lookup table. I am just not sure how in
> My
> I don't know the date you're asking about. However, you can
> implement the FKs' features using stored procedures in MySQL 5.0.
> For a small example have a look at the nice article about stored
> procedures:
> http://dev.mysql.com/tech-resources/articles/mysql-storedprocedures.html
>
Hmmm... gi
Hello.
I don't know the date you're asking about. However, you can
implement the FKs' features using stored procedures in MySQL 5.0.
For a small example have a look at the nice article about stored
procedures:
http://dev.mysql.com/tech-resources/articles/mysql-storedprocedures.html
On Sep 23, 2005, at 12:27 PM, Jacek Becla wrote:
Hi,
The documentation says "At a later stage, foreign key constraints
will be implemented for MyISAM tables as well". Does anybody know
what is the timescale?
I'm not sure there is a timescale.. I think it might be pretty open
ended. You c
Hello Jake,
> I would like to use separate databases to group certain related tables
> to keep things clean, but I would also like to use foreign keys to
> enforce referential integrity between tables in different databases. I
> don't think this is possible. Am I right? And if so, am I reduced to
My understanding is that RESTRICT and NO ACTION share the same behavior.
http://dev.mysql.com/doc/mysql/en/innodb-foreign-key-constraints.html
*
|NO ACTION|: In |ANSI SQL-92| standard, |NO ACTION| means /no
action/ in the sense that an attempt to delete or update a primary
key
Hi,
> I have a table that with a TEXT filed as a primary key.
>
> I can't make a foreign key of this field on another table, why does this
happens?
>
> Ex:
>
> Product ---
> | ref - text, PK
> | name - text
> |
>
> ProductsList
> | ID int, PK
> | profref - foreign key of the table product
> |
Look for a substring beginning with 'FOREIGN KEY' in the result of 'SHOW
CREATE TABLE tblname'.
PB
- Original Message -
From: Tom Roos
To: [EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 10:05 AM
Subject: foreign keys..
hi
how does 1 know if a foreign key is defined?
Tom Roos wrote:
hi
how does 1 know if a foreign key is defined? describe tablename and show index from
tablename dont sufice
tks
SHOW CREATE TABLE tablename;
or
SHOW TABLE STATUS LIKE 'tablename';
Michael
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubsc
saiph <[EMAIL PROTECTED]> wrote:
>
> alea> mysql -V
> mysql Ver 12.22 Distrib 4.0.17, for pc-linux-gnu (i386)
>
> but
>
> mysql < SHOW VARIABLES LIKE "have_innodb";
> +---+---+
> | Variable_name | Value |
> +---+---+
> | have_innodb | NO|
> +--
alea> mysql -V
mysql Ver 12.22 Distrib 4.0.17, for pc-linux-gnu (i386)
but
mysql < SHOW VARIABLES LIKE "have_innodb";
+---+---+
| Variable_name | Value |
+---+---+
| have_innodb | NO|
+---+---+
1 row in set (0.09 sec)
why?
the gentoo eb
Can you please post your DDL?
-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 4/16/04 10:22 AM
Subject: Foreign Keys
hi,
I am new to mysql. I am trying to create tables with foreign key
constraints.
but the constraintsdoesnt seem to be showing any effect on the ta
Hi,
> I am new to mysql. I am trying to create tables with foreign key
constraints.
> but the constraintsdoesnt seem to be showing any effect on the table. I am
> able to add any info in the foreign key table witout the same info in the
main
> table.
>
> what is the problem??
1) are you running t
saiph <[EMAIL PROTECTED]> wrote:
>
> <- snip ->
> Because your tables are not InnoDB.
> Check if InnoDB is enabled:
> SHOW VARIABLES LIKE "have_innodb";
>
> <- snip ->
>
> no, InnoDB is not enabled. how can i enable it?
What version of MySQL do you use? 3.23.xx or 4.0.x?
If you use 3.23 you sho
<- snip ->
Because your tables are not InnoDB.
Check if InnoDB is enabled:
SHOW VARIABLES LIKE "have_innodb";
<- snip ->
no, InnoDB is not enabled. how can i enable it?
the referece manual show a my.cnf configuration for a machine with at least
2gb of ram and 60 of hard disk.
how can
saiph <[EMAIL PROTECTED]> wrote:
>
> i'm studing foreign keys but my sql code does not react as
> would imagine when i insert inconsistent data.
>
> i.e.
>
> create database urls;
> use urls;
>
> create table caths
> (
>name varchar(7) primary key
> ) type = innodb;
>
> create table urls
>
Don't foreign keys need to be explicitly indexed?
Respectfully,
Ligaya Turmelle
"saiph" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> hi list,
>
> i'm studing foreign keys but my sql code does not react as
> would imagine when i insert inconsistent data.
>
> i.e.
>
> create data
Michael,
- Alkuperäinen viesti -
Lähettäjä: <[EMAIL PROTECTED]>
Vastaanottaja: "Heikki Tuuri" <[EMAIL PROTECTED]>
Kopio: <[EMAIL PROTECTED]>
Lähetetty: Monday, December 29, 2003 11:53 PM
Aihe: Re: Foreign Keys in CREATE TABLEs produced by mysqldump
> &
"Heikki Tuuri" <[EMAIL PROTECTED]> wrote on 12/24/2003 01:53:07 PM:
> Michael,
>
> this is the question where the valid answer is: upgrade!
>
In which version was this corrected? I'm hesitant to upgrade to the latest
and greatest without it being banged on by the masses first..
I have half a d
* Alaios
> with myIsam? Does not check about integrity?
That is correct, the myisam table handler does not support foreign key
constraints. It does of course support foreign keys, but not foreign key
constraints, consequently the foreign key itegrity is not checked for myisam
tables.
> Mysql 3.2?
with myIsam? Does not check about integrity? Mysql
3.2?
What u will use for your application Innodb or MyISAM?
--- Martijn Tonies <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > Hi there. I heave heared that mysql doesnot
> support
> > foreign keys?
>
> It does, but only with the "InnoDB" table type.
>
Hi,
> Hi there. I heave heared that mysql doesnot support
> foreign keys?
It does, but only with the "InnoDB" table type.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
--
MySQL Gener
Michael,
- Original Message -
From: <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Wednesday, December 24, 2003 1:45 AM
Subject: Foreign Keys in CREATE TABLEs produced by mysqldump
> --=_alternative 008277CD88256E05_=
> Content-Type: text/plain; charset="US-ASCII"
>
> Fir
MAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, December 18, 2003 12:47 AM
> Subject: Re: foreign keys.
>
> > On Thu, 18 Dec 2003 09:05 am, Heikki Tuuri wrote:
> > > Mofeed,
> > >
> > > - Original Message -
> > > From: "Mo
Mofeed,
- Original Message -
From: "Mofeed Shahin" <[EMAIL PROTECTED]>
To: "Heikki Tuuri" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 12:47 AM
Subject: Re: foreign keys.
> On Thu, 18 Dec 2003
On Thu, 18 Dec 2003 09:05 am, Heikki Tuuri wrote:
> Mofeed,
>
> - Original Message -
> From: "Mofeed Shahin" <[EMAIL PROTECTED]>
> To: "Heikki Tuuri" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, December 18, 2003 12:2
Mofeed,
- Original Message -
From: "Mofeed Shahin" <[EMAIL PROTECTED]>
To: "Heikki Tuuri" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 12:20 AM
Subject: Re: foreign keys.
> Hmmm, Thanks for that.
> B
pport from https://order.mysql.com/
>
> - Original Message -
> From: "Mofeed Shahin" <[EMAIL PROTECTED]>
> Newsgroups: mailing.database.myodbc
> Sent: Wednesday, December 17, 2003 1:19 AM
> Subject: Re: foreign keys.
>
> > mysql> CREATE TABLE foo (
On Wed, 17 Dec 2003 07:55 pm, Victoria Reznichenko wrote:
> Mofeed Shahin <[EMAIL PROTECTED]> wrote:
> > mysql> CREATE TABLE foo (
> >-> ID INT PRIMARY KEY,
> >-> note VARCHAR(50),
> >-> First_Name VARCHAR(50),
> >-> Last_Name VARCHAR(50),
> >
backup tool for InnoDB which also backs up MyISAM
tables
Order MySQL technical support from https://order.mysql.com/
- Original Message -
From: "Mofeed Shahin" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Wednesday, December 17, 2003 1:19 AM
Subject:
Mofeed Shahin <[EMAIL PROTECTED]> wrote:
>
> mysql> CREATE TABLE foo (
>-> ID INT PRIMARY KEY,
>-> note VARCHAR(50),
>-> First_Name VARCHAR(50),
>-> Last_Name VARCHAR(50),
>-> FOO_ID INT,
>-> INDEX(FOO_ID),
>-
mysql> CREATE TABLE foo (
-> ID INT PRIMARY KEY,
-> note VARCHAR(50),
-> First_Name VARCHAR(50),
-> Last_Name VARCHAR(50),
-> FOO_ID INT,
-> INDEX(FOO_ID),
-> INDEX(First_Name, Last_Name),
->
Mofeed Shahin <[EMAIL PROTECTED]> wrote:
> Still doesn't work But thanks for trying.
Worked fine for me:
mysql> CREATE TABLE Blah (
-> ID INT PRIMARY KEY,
-> Fname VARCHAR (50),
-> Lname VARCHAR (50),
-> UNIQUE (Fname, Lname)
-> ) TYPE=INNOD
Its not my data. I'm simply writting a program that reads in the meta data,
and does stuff with it client side. I just need to be able to handle all
sorts of stuff, and I wanted to test it on MySQL (amongst others).
Mof.
On Tue, 16 Dec 2003 11:49 am, Chris Nolan wrote:
> Hi,
>
> Have you consid
Still doesn't work But thanks for trying.
Mof.
On Tue, 16 Dec 2003 11:40 am, Aftab Jahan Subedar wrote:
> If you have foreign key then add a key for each,
> so the
>
> > CREATE TABLE foo (
> >ID INT PRIMARY KEY,
> >note VARCHAR(50),
> >Fname VARCHAR(50),
> >Lname VARCHAR(
Hi,
Have you considered just normalising the schema a bit more? It looks
like you're attempting to duplicate data within the
table (which you don't strictly need) and duplicating Fname and Lname
between Blah and foo. Why not just have an
AUTO_INCREMENT column (or some other unique row identifier
If you have foreign key then add a key for each,
so the
> CREATE TABLE foo (
>ID INT PRIMARY KEY,
>note VARCHAR(50),
>Fname VARCHAR(50),
>Lname VARCHAR(50),
>FOO_ID INT,
>INDEX(FOO_ID),
KEY(Fname,Lname), #here this one--if it does not work,its not me
>FOREIGN KEY (
On Mon, 15 Dec 2003 09:22 pm, Victoria Reznichenko wrote:
> Mofeed Shahin <[EMAIL PROTECTED]> wrote:
> > On Mon, 15 Dec 2003 12:42 pm, Paul DuBois wrote:
> >> At 11:09 +1030 12/15/03, Mofeed Shahin wrote:
> >> >I'm trying to create a bunch of tables in MySQL. I'm having problems
> >> > creating the
DuBois; [EMAIL PROTECTED]
Subject: Re: foreign keys.
On Mon, 15 Dec 2003 12:42 pm, Paul DuBois wrote:
> At 11:09 +1030 12/15/03, Mofeed Shahin wrote:
> >I'm trying to create a bunch of tables in MySQL. I'm having problems
> > creating the following table :
> >
&
Mofeed Shahin <[EMAIL PROTECTED]> wrote:
> On Mon, 15 Dec 2003 12:42 pm, Paul DuBois wrote:
>> At 11:09 +1030 12/15/03, Mofeed Shahin wrote:
>> >I'm trying to create a bunch of tables in MySQL. I'm having problems
>> > creating the following table :
>> >
>> >CREATE TABLE foo(
>> > ID INT PRIMAR
On Mon, 15 Dec 2003 12:42 pm, Paul DuBois wrote:
> At 11:09 +1030 12/15/03, Mofeed Shahin wrote:
> >I'm trying to create a bunch of tables in MySQL. I'm having problems
> > creating the following table :
> >
> >CREATE TABLE foo(
> > ID INT PRIMARY KEY,
> > note VARCHAR(50),
> > FOO_ID I
At 11:09 +1030 12/15/03, Mofeed Shahin wrote:
I'm trying to create a bunch of tables in MySQL. I'm having problems creating
the following table :
CREATE TABLE foo(
ID INT PRIMARY KEY,
note VARCHAR(50),
FOO_ID INT,
FOREIGN KEY (FOO_ID) REFERENCES foo(ID)
) TYPE=INNODB
Hi there,
here a simple sample (basicall taken from the documents) with 3 tables.
2 points to watch out for:
1) first declare the primary keys
here (p1.id and p2.id)
2) index the foreign key column
here (child.id1 and child.id2)
mysql> CREATE TABLE p1(id INT PRIMARY KEY)TYPE
InnoDB is using a totally different concept than MyISAM. Where in MyISAM
all the data is in one file, InnoDB uses the principle of Tablespaces
(like ORACLE). This puts the whole tables (and metadata) into one HUGE
file (in theory. In practice this file can be split and extends can be
defined of how
On 5 Mar 2003, at 19:39, Daevid Vincent wrote:
> Right, but sometimes it isn't, or you already used up that 'first'
> spot for a different foreign key reference in another table.
I think you're misunderstanding something. In the subject line you
talk about the first index, and talking about usi
> http://www.mysql.com/doc/en/SEC457.html states that "there must be an
> index where the foreign key and the referenced key are listed as the
> FIRST columns." Will this restriction be lifted soon? It is incredibly
> frustrating. I don't see why they have to be indexes, and more
> importantly, I d
In the last episode (Mar 05), Daevid Vincent said:
> > I'm not sure that sentence means what you think it does. What
> > they're saying is you need to index both fields, and if you decide
> > to make that index a compound one with multiple keyparts, the
> > foreign/referenced field must be the fir
> In the last episode (Mar 05), Daevid Vincent said:
> > http://www.mysql.com/doc/en/SEC457.html states that "there
> must be an
> > index where the foreign key and the referenced key are listed as the
> > FIRST columns." Will this restriction be lifted soon? It is
> > incredibly frustrating. I do
In the last episode (Mar 05), Daevid Vincent said:
> http://www.mysql.com/doc/en/SEC457.html states that "there must be an
> index where the foreign key and the referenced key are listed as the
> FIRST columns." Will this restriction be lifted soon? It is
> incredibly frustrating. I don't see why t
You can do this.
> E.g.: FOREIGN KEY (parent_id) REFERENCES databasename.parent(id)
and I'm already using this kind of foreign key.
Try yourself !
- Original Message -
From: "Tor R. Skoglund (NextG)" <[EMAIL PROTECTED]>
To: "mysql users" <[EMAIL PROTECTED]>
Sent: Monday, February 24, 20
> Does MySQL allow using foreign keys or not?
It does. Try it by yourself with version 4.0.8 +.
Adolfo
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the l
> Use table type =Innodb for foreing keys and transacionts...etc
> and type =myisam for speed
Yes, but do the foreign keys in InnoDB honor the constraints? I
think that was the original question. What's the poing of using
foreign keys if it's not going to maintain the integrity of your data.
Tha
On Tue, Jan 14, 2003 at 12:20:06PM +0200, Octavian Rasnita wrote:
> I've read the following text in a book:
>
> ANSI SQL supports a special kind of key called a foreign key. Foreign keys
> help protect database integrity by enabling the database to manage things
> such as the deletion of rows with
Use table type =Innodb for foreing keys and transacionts...etc
and type =myisam for speed
Simon
-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
Sent: 14 January 2003 10:20
To: MySQL
Subject: Foreign keys
HI all,
I've read the following text in a book:
ANSI SQL supp
Bruce,
Friday, November 15, 2002, 5:35:21 AM, you wrote:
BL> I have a problem about foreign key in using MySQL.com manual. According to
BL> the example in MySQL.com manual, one foreign key is ok. However, I have 3
BL> tables (ie. 2 for parent tables and 1 for child table). When I use 2 or more
Hello,
In Case 1, you need to change:
"index i_Tb (customerId, carId)" => "index i_Tb (carId,
customerId)" or add "index i_carId (carId)"
In Case 2, you need :
"foreign key (customerId) references customerTb (customerId)" =>
"foreign key (customerId) references customerTb (cust
Christos,
Monday, October 21, 2002, 5:46:07 AM, you wrote:
CS> Hello I am a brand new user of MySql, and have some questions about
CS> using InnoDB tables.
CS> I noticed in the manual that you can only specify
CS> - ON DELETE SET NULL
CS> Or
CS> - ON DELETE CASCADE
CS> What is the default b
Ilyas,
Wednesday, September 04, 2002, 2:27:27 PM, you wrote:
IK> Is it in Mysql 4 possible to use foreign keys?
Foreign key constarints are supported in InnoDB tables (3.23 and
4.0)
IK> If yes, how can I create two tables with foreign keys and use them?
Take a look at:
http://www.mysql.co
was processed correctly .
Thats perfect.
Thanks again !
-Message d'origine-----
De : Alexandre Zglav [mailto:[EMAIL PROTECTED]]
Envoyé : vendredi, 9. août 2002 19:53
À : Heikki Tuuri; [EMAIL PROTECTED]
Objet : RE: Foreign keys vont delete on cascade
OK thanks a lot for your help ! :)
I
com/ibman.html
# COnfiguration optimisée pour
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
THANKS HEIKKI :) !!
-----Message d'origine-
De : Heikki Tuuri [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi, 8. août 2002 08:17
À : [EMAIL PROTECTED]
Objet : Re: Foreign keys vont delete on
* Hanxue Lee
> In the MySQL documentation, it is stated that
>
> "foreign keys in SQL are not used to join tables, but are used mostly for
> checking referential integrity (foreign key constraints). "
This could have been formulated in a better way, IMHO. I would even say the
statement is wrong.
Kiss,
Monday, June 10, 2002, 5:19:17 PM, you wrote:
KD> I studied the MySQL and InnoDB manual, but I did not find anything about
KD> the internal usage of foreign keys.
KD> I mean that I would like to know if foreign keys are used for query
KD> optimizations or functions like that.
KD> Because
: [EMAIL PROTECTED]
Subject: Re: Foreign keys in query optimization
Kiss Dániel wrote:
> I studied the MySQL and InnoDB manual, but I did not find anything
> about the internal usage of foreign keys.
MySQL does not support foreign keys at the moment. This will be
implemented in version 4.1
If you create in index on your FK then it will be used to optimize the
query.
=C=
*
* Cal Evans
* Techno-Mage
* http://www.calevans.com
*
- Original Message -
From: "Kiss Dániel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 10, 2002 9:19 AM
Subject: Foreign keys in quer
Kiss Dániel wrote:
> I studied the MySQL and InnoDB manual, but I did not find anything
> about the internal usage of foreign keys.
MySQL does not support foreign keys at the moment. This will be
implemented in version 4.1.
For more info see:
http://www.mysql.com/products/mysql-4.0/index.ht
Chris,
Thursday, May 30, 2002, 1:58:54 AM, you wrote:
>> CREATE TABLE parent(id INT NOT NULL,
>> PRIMARY KEY (id)) TYPE=INNODB;
>>
>> CREATE TABLE child(id INT, parent_id INT,
>> INDEX par_ind (parent_id),
>> FOREIGN KEY (parent_id) REFERENCES parent(id)
>>
> OI!!! I'm going to sound like a complete ass now (I know) But since
> when does MySQL support FOREIGN keys?? *gasp* MAN this is going to
> make my life S much easier *curses at phpMyAdmin for not having the
> option*
Do remember that this is only valid for mysql 3.23.50+
> CREATE TABLE parent(id INT NOT NULL,
> PRIMARY KEY (id)) TYPE=INNODB;
>
> CREATE TABLE child(id INT, parent_id INT,
> INDEX par_ind (parent_id),
> FOREIGN KEY (parent_id) REFERENCES parent(id)
> ON DELETE CASCADE) TYPE=INNODB;
OI!!! I'm goin
This example is in InnoDB though, which should support foreign key
constraints.
Chris Book
>>In other words data integrity between two tables is not ensured by MySQL.
Your application code must solve this.
-
Before posting, p
Hi
Nothing is wrong! The behaviour of your example is correct, because
MySQL does not support the concept of foreign keys. See section 1.4.4.5
of the MySQL manual. In other words data integrity between two tables is
not ensured by MySQL. Your application code must solve this.
Regards
Rene Mo
Marius,
Thursday, April 18, 2002, 11:43:38 AM, you wrote:
MR> I have a problem: How can I find the FOREIGN KEY definitions for a table?
MR> I'm using MySQL 4.0.1 MAX, and I define the table as a InnoDB-table.
SHOW TABLE STATUS statement shows you foreign key constraints
for a table, look at:
Hi!
use
mysql>SHOW TABLE STATUS FROM yourdatabasename LIKE 'yourtablename';
Best regards,
Heikki Tuuri
Innobase Oy
---
InnoDB - transactions, row level locking, and foreign key support for MySQL
See http://www.innodb.com, download MySQL-Max from http://www.mysql.com
- Original Message ---
root,
Monday, April 08, 2002, 12:24:42 PM, you wrote:
r> i tried to use the foreign key feature in mysql 4.0.1 using innodb tables .
r> then i have tried the delete cascade feature but it didn't work . I don't
r> know why ? have you any suggestions ? .
InnoDB does not yet support ON DELETE C
TED]>
Newsgroups: mailing.database.mysql
Date: Tuesday, March 12, 2002 7:18 PM
Subject: Re: Foreign keys in mysqldump?
>"InnoDB Hot Backup-0.33 beta is now available for Windows NT/2000/XP and
>Linux."
>
>Any plans for Solaris by the May 2002 release date?
>
>> F
"InnoDB Hot Backup-0.33 beta is now available for Windows NT/2000/XP and
Linux."
Any plans for Solaris by the May 2002 release date?
> From: "Heikki Tuuri" <[EMAIL PROTECTED]>
>
> The beta testing of InnoDB Hot Backup (a non-free add-on tool) started on
> Monday. If you want to take part in the
Philip,
-Original Message-
From: Philip Molter <[EMAIL PROTECTED]>
To: Heikki Tuuri <[EMAIL PROTECTED]>
Cc: Bob McLaughlin <[EMAIL PROTECTED]>; MySQL Mailing List
<[EMAIL PROTECTED]>
Date: Tuesday, March 12, 2002 4:21 PM
Subject: Re: Foreign keys in mysqldump?
On Tue, Mar 12, 2002 at 11:50:12AM +0200, Heikki Tuuri wrote:
: Bob,
:
: I have now improved foreign key support so that version 3.23.50 does
:
: 1. show the FOREIGN KEY definitions when you call SHOW CREATE TABLE; this
: should also show them in mysqldumps;
: 2. preserve FOREIGN KEY definitions
EMAIL PROTECTED]>
Date: Tuesday, March 12, 2002 4:00 PM
Subject: RE: Foreign keys in mysqldump?
>Heikki,
>
>You are the man!
>
>I am glad you are addressing these issues in 3.23.50. They will make
>foreign key support in MySQL much more robust (in my opinion, anyway..)
>
&g
in production work?
Thanks much,
-Bob
-Original Message-
From: Heikki Tuuri [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 4:50 AM
To: Bob McLaughlin; MySQL Mailing List
Subject: Re: Foreign keys in mysqldump?
Bob,
I have now improved foreign key support so that version
Hi!
The message I sent 5 minutes ago answers also this :).
I have now improved foreign key support so that version 3.23.50 does
1. show the FOREIGN KEY definitions when you call SHOW CREATE TABLE; this
should also show them in mysqldumps;
2. preserve FOREIGN KEY definitions in ALTER TABLE and C
1 - 100 of 118 matches
Mail list logo