View Single Post
Old 12-30-2013, 08:41 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,752
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Rootman - what sherman just wrote is right on the money But I might as well post what's already in the breech.

Essentially the numbers are the means via which calibre associates a row in its database (metadata.db) with a book folder.

Because calibre permits duplicate books (same author, same title) it needs something unique to identify a book. And that's what the number is, its just a sequential number that's incremented whenever a book is added to a library. Internally its called the book-id, if you press I on a book you'll see it listed there.

This is a very common technique in applications that use relational databases to ensure unique identification of rows in a table. And since the database wars of the 60/70's most databases are relational.

When a book is saved to disk calibre doesn't need to write the book-id, because it's database does not keep track of those folders, they are yours to do with as you will.

It could argued that calibre doesn't need the author or titles in folder and file names - it could just use the book-ids. But then it would have been a heck of lot harder for you to do do what you just did - sort out a messy library by hand and build a new library from scratch.

BR

Last edited by BetterRed; 12-30-2013 at 08:56 PM. Reason: spell/grammar
BetterRed is offline   Reply With Quote