List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:June 9 1999 8:17pm
Subject:Re: help me please?!
View as plain text  
sneidr rider wrote:
> 
> hi all -
> 
>   i'm fairly new to all this database stuff and was wondering if i could clear
> a
>   few things up here. how can i implement the foreign key feature, and what
>   does this mean? what is the difference between unique and key?? lastly, how
>   do i implement the index feature and what does this mean??? any tips or
>   pointers would be greatly appreciated. i've read a bunch of the tutorials,
>   but none seem to cover these details very deeply.
> 
>   thanx -
>   s

Hi Sneidr

Usually you don't need FOREIGN KEYs.
Mysql only understands the FOREIGN KEY syntax, but doesn't do anything with it.

If you mean, how to make SELECT's which have references between different tables, you have
to look at the JOIN syntax.

A KEY generates an index, which is used to speedup searches.
A UNIQUE is a key which takes care, that each entry in this index occures only once.
So if you try to insert one value multiple times into a UNIQUE key field, you will get a
"duplicate key error".
A PRIMARY KEY is the first UNIQUE key created in a table.
INDEX is only another name for KEY.

Tschau
Christian

Thread
help me please?!sneidr rider9 Jun
  • Re: help me please?!Christian Mack10 Jun