View Single Post
Old 05-16-2010, 09:13 PM   #12
Stinger
Asha'man
Stinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-books
 
Stinger's Avatar
 
Posts: 335
Karma: 844
Join Date: May 2010
Location: Canada
Device: Kobo
you're correct, the actual page data is in the shortcover_page table, in the 'FormattedPage'.

This should be helpful to you:
http://wiki.durbn.net/koboko/index.php/DBSchemaV2


EDIT: OH! I missed that you deleted cleared the shortcover_page table in your original post. In that case you DID delete the book data. This is the reason the dbase hasn't shrunk:

Quote:
I deleted a lot of data but the database file did not get any smaller. Is this a bug?

No. When you delete information from an SQLite database, the unused disk space is added to an internal "free-list" and is reused the next time you insert data. The disk space is not lost. But neither is it returned to the operating system.

If you delete a lot of data and want to shrink the database file, run the VACUUM command. VACUUM will reconstruct the database from scratch. This will leave the database with an empty free-list and a file that is minimal in size. Note, however, that the VACUUM can take some time to run (around a half second per megabyte on the Linux box where SQLite is developed) and it can use up to twice as much temporary disk space as the original file while it is running.
If you're still using the Firefox SQLite Manager to do this, running the 'Compact Database' from the Database menu will run the above command and shrink your dbase.

Last edited by Stinger; 05-16-2010 at 09:24 PM.
Stinger is offline   Reply With Quote