On 2 Aug 2018, at 6:11pm, John R. Sowden <jsow...@americansentry.net> wrote:

> I do not want these databases to all reside in one sqlite file.  How do I 
> index each database on this customer account number when each database and 
> associated index are in separate files?  Is this what seems to be referred to 
> as an external file?  I assume that I would have to reindex each database 
> each time it is opened, since a record could have been edited, etc.

You have been misinformed.  In SQLite,

A) each table is stored one database file
B) each index indexes just one table
C) all indexes for a table are stored in the same file as that table.

An index is updated when its table is updated.  You never need to manually 
reindex unless you changed the table structure or index structure.

It is normal to keep all tables related to one application in one big database 
file.  So, for example, if you run a library you would normally keep tables and 
indexes for books, borrowers, and current loans all in one file.  And therefore 
all the indexes for those tables would be in that file too.  SQLite is designed 
to handle things this way, and does it very efficiently.

However, it is possible to keep different tables in different database files.  
So you might keep books (and all indexes on books) in one file, and borrowers 
and current loans (and all the indexes on those tables) in another file.

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

Reply via email to