473,386 Members | 1,819 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,386 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 7105
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...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.