In Access, difference b/w primary key and index?

2008-05-28 10:39 pm
The design view of Access, we could set primary key for particular informaton. Under the data type, there is "indexed" function to choose. So what is the difference between "Primary key" and "Indexed" function?

回答 (3)

2008-05-29 3:11 am
✔ 最佳答案
Answer 1 is totally incorrect. Please go to learn more about DBMS topic first.
In academic aspect, the definition of primary key should be as following.
a unique key is field(s) identifing a record in a table. Primary key is one of unique key(s) of a table.
The index in access is used for making query a table faster. just like the index at the end of a book.
To be primary key, the database usually will form an index on the fields.

2008-05-28 19:15:41 補充:
primary key does not nessary to connect tables. instead key formed for the relationship between the tables is foriegn key. It makes use for maintainening the consistancy of the tables.
2008-06-03 9:22 am
A table can only have ONE primary key but can have more than one index.

A primary key must contain unique (non-repeating) values. An index can be set up to allow duplicate values or only unique values.

A primary key is also an index.
2008-05-29 12:37 am
Primary Key is connecting two table and unique
eg A table : One subject's Primary Key is ID number 28
B table : FK must have ID number 28 and other information is about A table(/ID number 28)

Indexed is about the value
eg "Name" <<< The value is about lenght or format(ChanTaiMan / chan tai man etc.)

希望幫到你啦 ^^
參考: Myself


收錄日期: 2021-04-26 13:13:03
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080528000051KK01123

檢視 Wayback Machine 備份