Indexing in FoxPro with Example
Indexing in FoxPro with Example
Indexing in FoxPro with Example
ARRANGING RECORD USING INDEX
INDEX – Open Database File के Records को Ascending या Descending Order में Arrange करता है
Indexing करने पर Records का Serial Number परिवर्तित नहीं होता है
Types of Indexing in FoxPro
Single Index (.idx)
Compound Index (.cdx)
SINGLE INDEX – इस प्रकार की Index File में Record Ascending Order में Arrange हो जाते हैं
Ex – Use Student
List
Rec# |
NAME |
AGE |
COURSE |
FEES |
1 |
RAJESH |
21 |
DCA |
5000 |
2 |
AJAY |
25 |
PGDCA |
8000 |
3 |
VIJAY |
22 |
PGDCA |
8000 |
4 |
SAMEER |
19 |
BCA |
10000 |
Index on Name To I1
Use Student Index I1
List
Rec# |
NAME |
AGE |
COURSE |
FEES |
2 |
AJAY |
25 |
PGDCA |
8000 |
1 |
RAJESH |
21 |
DCA |
5000 |
4 |
SAMEER |
19 |
BCA |
10000 |
3 |
VIJAY |
22 |
PGDCA |
8000 |
यह Index File Automatically Update नहीं होती है
इसे Manually Open करके Reindex Command से Update करना होता है
COMPOUND INDEX – इस प्रकार की Index File में Record Ascending या Descending Order में Arrange हो जाते हैं
Ex – Use Student
List
Rec# |
NAME |
AGE |
COURSE |
FEES |
1 |
RAJESH |
21 |
DCA |
5000 |
2 |
AJAY |
25 |
PGDCA |
8000 |
3 |
VIJAY |
22 |
PGDCA |
8000 |
4 |
SAMEER |
19 |
BCA |
10000 |
Index on Name Tag Name
Use Student Index I1
Rec# |
NAME |
AGE |
COURSE |
FEES |
2 |
AJAY |
25 |
PGDCA |
8000 |
1 |
RAJESH |
21 |
DCA |
5000 |
4 |
SAMEER |
19 |
BCA |
10000 |
3 |
VIJAY |
22 |
PGDCA |
8000 |
यह Index File Automatically Update होती है
इसे Use करने के लिए Set Order To के साथ उस Tag का नाम दिया जाता है जिसके अनुसार Field में Indexing की गयी है
Ex – Set Order To Name
INDEXING ON MULTIPLE FIELDS
जब Database File में Index किये जाने वाले Field में एक जैसे दो या दो से अधिक समान Records होते हैं
तब किसी दूसरे Field का Use उन समान Records की Indexing के लिए किया जाता है
FIND AND SEEK COMMAND IN FOXPRO
Find तथा Seek Command किसी Index File में Record को Search करने या उस Record तक Record Pointer को पहुँचाने का कार्य करते हैं
Find and Seek Commands केवल Index File में कार्य करते हैं
Find and Seek Commands उसी Field के Record में Searching कर सकते हैं जिस Field में Indexing की गयी है
FIND Command in FoxPro
Ex – Use Student
List
Index On Name to I1
Find “AJAY”
इस Command से Record Pointer Name Field में Ajay को Find करके उस Record पर आ जाएगा
SEEK Command in FoxPro
Ex – Use Student
List
Index On Name to I1
SEEK “AJAY”
इस Command से Record Pointer Name Field में Ajay को Find करके उस Record पर आ जाएगा
SEEK के साथ Variable का Use भी किया जा सकता है
A = “SAMEER”
Seek A
इस उदाहरण में A एक Variable है
इन्हें भी पढ़ें
Sorting in FoxPro
FoxPro Mathematical Commands
FoxPro SET Commands
FoxPro Functions
Click Here To Read What is FoxPro and Commands with Example
Important Question Answer
Click Here for Important Question-Answer – Computer
Click Here for Important Question-Answer – Indian Geography
Click Here for Important Question-Answer – World Geography
Click Here for Important Question-Answer – Indian History
Click Here for Important Question-Answer – Economy
Click Here To Go To Home Page and Get More Knowledge