Derek Developer wrote:
> appologies, "master database" should read "MASTER TABLE" This is
> where the index is stored I assume?
> 

No, the index is stored in a separate Btree. The master table simply
stores the page number of that btree's root page. With that information 
SQLite can read and decrypt the index's root page and begin a O(log N) 
search for the first matching record, reading in and decrypting more 
pages as required.


> 
> If that is the case then clearly an Index is not a viable solution
> and each page will have to be decrypted to perform and equlity/range
> search.
> 

No, an index will work securely and efficiently for such a search in an 
encrypted database.

> 
> Before I implement this, I wanted to make sure I understand the
> implementation at the page level. Obviously a single Row can take up
> more than one page, but I am still not clear if a single page can
> ever contain more than one Row?
> 

Yes, a table page can contain multiple rows, and an index page can 
contain multiple index entries.

You may want to review http://www.sqlite.org/arch.html. The encryption 
and decryption is done between the pager and the OS interface layers. 
Nothing else changes, and all the data is stored securely encrypted in 
the pages of the file.

HTH
Dennis Cote

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

Reply via email to