English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

also tell me diffrence b/w simple indexing and compound indexing?
pl z do fast

2007-04-17 15:26:01 · 2 answers · asked by Anonymous in Computers & Internet Software

2 answers

Indexing means adding an external index. The original data is not changed. If you load the index, you'll view the table in the index order.

Sorting means the original data is physically rearranged (by specified criteria).

2007-04-17 15:38:18 · answer #1 · answered by Kasey C 7 · 0 0

sorting creats another file. physically records are sorted in another file.

eg.
use customer
sort on cust_name to cust_sorted

now u have 2 files with same data. the original customer.dbf unsorted and cust_sorted is sorted on cust_name.

where as in indexing

only a small index is created. u can assume index as index found on the first page of the book. i.e. index file stores record no and value. when ever u want to locate a record the command first finds the record number using index and goes their.

index is very effecient when compared to sort. because there are no duplicate files.

there are 2 types of index.

one is normal index and another is compound index

in normal index extension is .idx. suppose you have customer.dbf and u want to index on cust_name and cust_id. then u will have 2 separate index file.

use customer
index on cust_id to custid
index on cust_name to custname

custid.idx and custname.idx will be created.

in compound index u will have one cdx and and the indexes can be in that cdx

use customer
index on cust_id tag cust_id additive
index on cust_name tag cust_name additive

there will customer.cdx and cust_id and cust_name are tags

u can refer by saying

set orde to cust_id (cust_id order)
set orde to cust_name (cust_name order)

compound indexing is very effecient. bcz in sorting it creats another file so unnecesssay disk space is ocuupied.
in simple indexing many index files are created because for each field u index there will be separate idx file.

hope this helps. for any further clarrification u can contact me at lakshmiteja@rediffmail.com or chat with me at alphalakshmi@yahoo.com

2007-04-18 01:05:31 · answer #2 · answered by lakshmi r 4 · 0 0

fedest.com, questions and answers