Definitions please:
What is the difference between a composite index, composite key, vs primary + secondary index.
Is creating a composite key as simple as defining 2 fields as keys? I haven't seen any good how-to references on this.
Definitions please:
What is the difference between a composite index, composite key, vs primary + secondary index.
Is creating a composite key as simple as defining 2 fields as keys? I haven't seen any good how-to references on this.
Composite key consists of the FIRST n fields of a TABLE.
Composite index consists of the FIRST n fields of a SECONDARY INDEX (although technically they could also be the first n fields of the table).
Primary index would be the first n fields of a table.
Secondary indexes are defined on the Indexes tabs of a table structure dialog (or in code, of course). 2ndary index fields do NOT have to be the first fields in the table, nor do they need to be contiguous (next to each other) in the table.
Composite key? Yes, but the fields must be next to each other in the table (you said key, not index). Most recommend against it if possible; use a meaningless integer system instead (NOT an AutoIncrement field! - roll your own or borrow one of those found easily on the various other newsgroups out there (pnews, for instance)).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.