Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Differences and uses of index type..
Message
From
28/10/2003 21:50:52
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
28/10/2003 18:26:08
Mike Sontillano
Travellers Life Assurance of the Philipp
Naga, Philippines
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00843865
Message ID:
00843894
Views:
14
>Hi All,
>
>Anybody can tell me the differences and its uses of index type primary, unique, candidate and regular?
>
>TIA
>
>Mike

Regular is the one you will use most commonly.

Primary and candidate will check for uniqueness. The expression you use for the index is not allowed to repeat for different records. Both basically do the same thing; primary is supposed to specify the main way of accessing the record, that is, the primary key.

Unique is for backward-compatibility, IMO. I don't see any use for it nowadays.

If you don't want to check for uniqueness, just create a regular index.

Indices can be used to show data in a certain order, but also for quick access to the data.

Indices are required if you want to define referential integrity.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform