473,287 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Difference between keys and indexes


Can anyone tell me what the difference is between keys and indexes?

Much appreciated,
randelld
Jul 19 '05 #1
5 7092
Randell D. wrote:
Can anyone tell me what the difference is between keys and indexes?

Much appreciated,
randelld

http://www.mysql.com/doc/en/CREATE_TABLE.html explains:
# KEY is a synonym for INDEX....etc....

http://www.mysql.com/doc/en/Indexes.html

Jul 19 '05 #2
"@(none).adelphia.net" <""jgreenaw\"@(none).adelphia.net"> wrote in message
news:3f*********************@newscene.com...
Randell D. wrote:
Can anyone tell me what the difference is between keys and indexes?

Much appreciated,
randelld

http://www.mysql.com/doc/en/CREATE_TABLE.html explains:
# KEY is a synonym for INDEX....etc....

http://www.mysql.com/doc/en/Indexes.html


Luvely Juvely...

Thanx
Jul 19 '05 #3
RandellD -
this is covered in its entirety in CJ Date's Book - An Intro to SQL -
considered the do all textbook written by the god.
There are several different things going on here .
but in essence - you can index on any column you want.
Keys, on the other hand - typically set up either a uniqueness or a foreign
table reference .
There are primary keys, foreign keys, candidate keys, alternate keys ..
but typically primary keys are set up in mysql as part of the 'identity'
column, and is set up
as auto-incrementing .

your mileage may vary, of course .
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
FREE LONG DISTANCE -> mailto:ex********@efgroup.net
mySql / VFP / MS-SQL
"Randell D." <yo**************************@yahoo.com> wrote in message
news:TH***********************@news2.calgary.shaw. ca...

Can anyone tell me what the difference is between keys and indexes?

Much appreciated,
randelld

Jul 19 '05 #4
RandellD -
this is covered in its entirety in CJ Date's Book - An Intro to SQL -
considered the do all textbook written by the god.
There are several different things going on here .
but in essence - you can index on any column you want.
Keys, on the other hand - typically set up either a uniqueness or a foreign
table reference .
There are primary keys, foreign keys, candidate keys, alternate keys ..
but typically primary keys are set up in mysql as part of the 'identity'
column, and is set up
as auto-incrementing .

your mileage may vary, of course .
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
FREE LONG DISTANCE -> mailto:ex********@efgroup.net
mySql / VFP / MS-SQL
"Randell D." <yo**************************@yahoo.com> wrote in message
news:TH***********************@news2.calgary.shaw. ca...

Can anyone tell me what the difference is between keys and indexes?

Much appreciated,
randelld

Jul 19 '05 #5
RandellD -
this is covered in its entirety in CJ Date's Book - An Intro to SQL -
considered the do all textbook written by the god.
There are several different things going on here .
but in essence - you can index on any column you want.
Keys, on the other hand - typically set up either a uniqueness or a foreign
table reference .
There are primary keys, foreign keys, candidate keys, alternate keys ..
but typically primary keys are set up in mysql as part of the 'identity'
column, and is set up
as auto-incrementing .

your mileage may vary, of course .
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
FREE LONG DISTANCE -> mailto:ex********@efgroup.net
mySql / VFP / MS-SQL
"Randell D." <yo**************************@yahoo.com> wrote in message
news:TH***********************@news2.calgary.shaw. ca...

Can anyone tell me what the difference is between keys and indexes?

Much appreciated,
randelld

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Randell D. | last post by:
Can anyone tell me what the difference is between keys and indexes? Much appreciated, randelld
4
by: Q. John Chen | last post by:
All, What's the difference between a unique contraint and unique? sementically, if you want a column contain unique values, it is a contraint. And an index is for searching/sort. The questions...
3
by: Randell D. | last post by:
Folks, My internet access is intermitent until I get my own connection inside the next ten days - I say this so that I can thank in advance who ever gives a few seconds to read/answer my...
4
by: Sujeet | last post by:
Hey guys, I want to import a database from SQL Server 2000 to MS Access with all indices and keys along with the tables. DTS does not export indices and keys, only the structure and the data. ...
115
by: LurfysMa | last post by:
Most of the reference books recommend autonum primary keys, but the Access help says that any unique keys will work. What are the tradeoffs? I have several tables that have unique fields. Can...
4
by: Ted | last post by:
Understand, I have developed a number of applications using RDBMS, including MySQL, PostgreSQL and MS Access, but this is my first experience with MS SQL. I'd bet my bottom dollar that MS SQL...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
2
by: Danny | last post by:
Hello, We imported a bunch of tables from a database and realized that the primary keys weren't copied to the destination db. In order to re- create the keys, we need to know which tables have...
5
by: narutocanada | last post by:
hi what is the difference between the two kinds of brackets? I tried a few examples but I can't make out any real difference: lst = print lst print lst print lst lst = (10, 20, 30) print...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.