IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Conceptually no, in practice yes
In relational theory, a primary key is a table contraint. It specifies that the fields that make up the primary key are unique and not null and thus can be used to address every row in the table individually. This does not say anything about indexes, and conceptually they are unrelated.

In practice, every database I know of either creates an index automatically to enforce the constraint or considers a primary key to be a kind of index to begin with. Thus creating an index on a primary key would be waste in practice. MSSQL falls into the creates an index automatically camp,

It is possible that some database could have a special kind of index used for unique constraints that just indicates if a value exists already or not without containing a pointer to the actual row values. Such an index would optimize insert and update but do nothing for select. But I don't know of any database that does that.

Jay
New Relational theory does not address indexes
as far as I know. Indexes are just an implementation (speed) aide. In theory one should get the same result rows from any given query regardless of whether indexes are in place or not. But, it appears an index of some kind is necessary in order to *efficiently* enforce the primary key constraint required by the theory.
________________
oop.ismad.com
New Indexes are just tables....
...with the last field being a pointer to the record with the corresponding row in the full table. If the Index has full coverage, the query optimizer can get all the data from the index and never have to look at the full table. The primary reason for efficiency is due to have all the records in near vicinity to each other and in the correct order (as opposed to having to check every record scattered throughout the storage unit).
New Re: just tables.
Unless they are clustered.
bcnu,
Mikem

It would seem, therefore, that the three human impulses embodied in religion are fear, conceit, and hatred. The purpose of religion, one might say, is to give an air of respectibility to these passions. -- Bertrand Russell
     Indexes and primary keys - redundant? - (tablizer) - (9)
         I can't recall every having an index on the primary key - (jbrabeck)
         As I understand it - (tuberculosis) - (1)
             It's definitely the case with Oracle. -NT - (Meerkat)
         The Primary Key is an Index. - (ChrisR)
         Conceptually no, in practice yes - (JayMehaffey) - (3)
             Relational theory does not address indexes - (tablizer) - (2)
                 Indexes are just tables.... - (ChrisR) - (1)
                     Re: just tables. - (mmoffitt)
         Check the index list. - (static)

As you wish.
93 ms