Not exactly.  The index is stored in the SAME FILE that contains the table.  
For example in dBase I (or II or III) you might have the following files:

Customer.DBF
CustNo.NDX
CustName.NDX

where the two NDX files index fields from the Customer.DBF file.  In FoxPro you 
can have "compound" indexes so that the two indexes above are stored in one 
file, giving you (for example)

Customer.DBF
Customer.CDF

The indexes in the Customer CDF file are generated from and only can be used 
with the Customer.DBF table (and the indexes must be in-sync with the data in 
the Customer.DBF table).

SQLite3 "requires" that you store the indexes in the same file as contains the 
table data to ensure that they are all updated as a unit and remain consistent, 
so you might have a file called Customer.db

Customer.db

This has nothing to do with indexes on OTHER TABLES/FILES such as you might 
have a file called

Accounts.DBF
AcctCust.NDX
AcctInvN.NDX

in which the AcctCust is an index on the Customer field in the Accounts table 
(and has nothing whatsoever to do with the Customer DBF or Indexes) even though 
it mayhaps contains the same customer numbers as the CustNo.NDX so that you can 
associate the "Customer" record from the Customer DBF with the matching record 
from the "Accounts" record contained in the Accounts DBF.

These might all be stored in a file called

Accounts.db

If you do not "give out" a copy of the Accounts.db then that information cannot 
be accessed.

>index is.  My concern in using Sqlite is since the index is embedded
>into the database file with various tables, if I am running multiple
>Sqlite database files, how do I use a common index for the different
>database files.  I won't provide technicians with accounts receivable
>databases, etc.

You cannot use a "common index" for anything, anywhere, at any time, ever in 
the history of the Universe.  The index "belongs" to the thing it is indexing 
and contains information from only that thing and no other source.  You may 
have multiple tables containing customer numbers, and multiple indexes indexing 
each of those customer numbers for each table containing them, but you cannot 
have a "common index" which indexes two data tables.

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.


>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of John R. Sowden
>Sent: Friday, 3 August, 2018 12:52
>To: sqlite-users@mailinglists.sqlite.org
>Subject: Re: [sqlite] Common index for multiple databases
>
>I have the xbase type of databases down tight, having been using them
>since I bought my copy of dBASE II from George Tate of Ashton-Tate at
>a
>West Coast Computer Faire in 1981.  I have been writing applications
>for
>my alarm company, now through Foxpro 2.6 in DOS.  I understand what
>an
>index is.  My concern in using Sqlite is since the index is embedded
>into the database file with various tables, if I am running multiple
>Sqlite database files, how do I use a common index for the different
>database files.  I won't provide technicians with accounts receivable
>databases, etc.
>
>My thinking is along the line of all mission critical clocks take
>their
>accuracy from the US Naval Observatory in Fort Collins, CO, instead
>of
>thousands of free running clocks, each with what it thinks is the
>correct time.
>
>John
>
>On 08/03/2018 02:48 AM, Ling, Andy wrote:
>>> another point that I did not make clear. The accounting programs
>are not associated with the technical programs, different people,
>different security access. The tech databases and programs are in
>portable computers that go out in the field, but not the accounting,
>etc. There indexes would have to be updated when the computers are
>back at the office.
>> I have a feeling that what the OP is calling an index isn’t really.
>I think what he is talking about is the list of customer IDs.
>> So customer data can get updated “back at the office” and when the
>portable computers get back they need to be updated
>> with the changes.
>>
>> In sqlite terms, an index is a sorted list of the data in one or
>more columns of a table to help speed up access to the data in that
>table.
>> Once defined, the index is automatically updated by sqlite as the
>data in the table is changed.
>>
>> Perhaps we could get some clarification from the OP about what is
>actually wanted.
>>
>> Regards
>>
>> Andy Ling
>>
>>
>>
>>
>>
>>
>*********************************************************************
>*
>> DISCLAIMER:
>> Privileged and/or Confidential information may be contained in this
>message. If you are not the addressee of this message, you may not
>copy, use or deliver this message to anyone. In such event, you
>should destroy the message and kindly notify the sender by reply e-
>mail. It is understood that opinions or conclusions that do not
>relate to the official business of the company are neither given nor
>endorsed by the company. Thank You.
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-
>users
>
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to