Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-23-2012, 12:13 AM   #1
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,119
Karma: 73448614
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Kobo Touch db Schema

Just wondering if anyone has done any digging into the Sqlite database on the Touch; in particular what we have in firmware 2.0.0?

I know when Kobo first came out there were some documents out there (for instance https://sites.google.com/a/durbn.net...atabase-schema ).

The current scheme for 2.0.0 (dbversion 53) is
Spoiler:

Code:
CREATE TABLE AbTest( 
	FeatureId TEXT, 
	Bit INT, 
	DefaultValue INT, 
	IsEnabled INT,
	Checksum TEXT, 
	PRIMARY KEY(FeatureId)
);
CREATE TABLE Achievement( 
	Acknowledged BOOL,
	CompleteDescription TEXT,
	DateCreated TEXT,
	Difficulty INTEGER,
	EventLogDescription TEXT,
	Hidden BOOL,
	Id TEXT NOT NULL,
	ImageId TEXT NOT NULL,
	IncompleteDescription TEXT, 
	Name TEXT NOT NULL,
	Ordinal INTEGER,
	PercentComplete INTEGER,
	Presented BOOL,
	Synchronized BOOL,
	UserId TEXT, 
	Checksum TEXT, 
	FacebookImageId TEXT,
	PRIMARY KEY (Id)
);
CREATE TABLE Bookmark(
	BookmarkID TEXT NOT NULL,
	VolumeID TEXT NOT NULL,
	ContentID TEXT NOT NULL,
	StartContainerPath TEXT NOT NULL,
	StartContainerChildIndex INTEGER NOT NULL,
	StartOffset INTEGER NOT NULL,
	EndContainerPath TEXT NOT NULL,
	EndContainerChildIndex INTEGER NOT NULL,
	EndOffset INTEGER NOT NULL,
	Text TEXT,
	Annotation TEXT,
	ExtraAnnotationData BLOB,
	DateCreated TEXT,
	ChapterProgress REAL NOT NULL DEFAULT 0,
	Hidden BOOL NOT NULL DEFAULT 0, 
	Version TEXT, 
	DateModified TEXT, 
	Creator TEXT, 
	UUID TEXT,
	PRIMARY KEY (BookmarkID)
);
CREATE TABLE DbVersion(
	version INTEGER NOT NULL,
	PRIMARY KEY(version)
);
CREATE TABLE Event( 
	EventType INTEGER NOT NULL,
	FirstOccurrence TEXT,
	LastOccurrence TEXT,
	EventCount INTEGER DEFAULT 0,
	ContentID TEXT,
	ExtraData BLOB, Checksum TEXT,
	PRIMARY KEY (EventType, ContentID)
);
CREATE TABLE Rules( 
	AchievementId TEXT, 
	EventProperty TEXT, 
	EventType TEXT, 
	GoalValue TEXT NOT NULL, 
	Id TEXT NOT NULL, 
	Operation INT NOT NULL, 
	ParentRuleId TEXT, 
	ConjunctionType INT, 
	IsConjunction BOOL, Checksum TEXT, 
	PRIMARY KEY(Id)
);
CREATE TABLE Shelf(
	CreationDate TEXT,
	Id TEXT,
	InternalName TEXT,
	LastModified TEXT,
	Name TEXT,
	Type TEXT,
	_IsDeleted BOOL,
	_IsVisible BOOL,
	_IsSynced BOOL,
	PRIMARY KEY(InternalName)
);
CREATE TABLE ShelfContent(
	ShelfName TEXT,
	ContentId TEXT,
	DateModified TEXT,
	_IsDeleted BOOL,
	_IsSynced BOOL,
	PRIMARY KEY(ShelfName, ContentId)
);
CREATE TABLE content(
	ContentID TEXT NOT NULL,
	ContentType TEXT NOT NULL,
	MimeType TEXT NOT NULL,
	BookID TEXT,
	BookTitle TEXT,
	ImageId TEXT,
	Title TEXT COLLATE NOCASE,
	Attribution TEXT COLLATE NOCASE,
	Description TEXT,
	DateCreated TEXT,
	ShortCoverKey TEXT,
	adobe_location TEXT,
	Publisher TEXT,
	IsEncrypted BOOL,
	DateLastRead TEXT,
	FirstTimeReading BOOL,
	ChapterIDBookmarked TEXT,
	ParagraphBookmarked INTEGER,
	BookmarkWordOffset INTEGER,
	NumShortcovers INTEGER,
	VolumeIndex INTEGER,
	___NumPages INTEGER,
	ReadStatus INTEGER,
	___SyncTime TEXT,
	___UserID TEXT NOT NULL,
	PublicationId TEXT,
	___FileOffset INTEGER,
	___FileSize INTEGER,
	___PercentRead INTEGER,
	___ExpirationStatus INTEGER,
	FavouritesIndex NOT NULL DEFAULT -1, 
	Accessibility INTEGER DEFAULT 1, 
	ContentURL TEXT, 
	Language TEXT, 
	BookshelfTags TEXT, 
	IsDownloaded BIT NOT NULL DEFAULT 1, 
	FeedbackType INTEGER DEFAULT 0, 
	AverageRating INTEGER DEFAULT 0, 
	Depth INTEGER, PageProgressDirection TEXT, 
	InWishlist BOOL NOT NULL DEFAULT FALSE, 
	ISBN TEXT, 
	WishlistedDate TEXT DEFAULT "0000-00-00T00??.000", 
	FeedbackTypeSynced INTEGER DEFAULT 0,
	PRIMARY KEY (ContentID)
);
CREATE TABLE content_keys(
	volumeId TEXT NOT NULL,
	elementId TEXT NOT NULL,
	elementKey TEXT,
	PRIMARY KEY (volumeId, elementId)
);
CREATE TABLE content_settings(
	ContentID TEXT NOT NULL,
	ContentType INTEGER NOT NULL,
	DateModified TEXT NOT NULL,
	ReadingFontFamily TEXT, 
	ReadingFontSize INTEGER, 
	ReadingAlignment TEXT, 
	ReadingLineHeight INTEGER, 
	ReadingLeftMargin INTEGER, 
	ReadingRightMargin INTEGER, 
	ReadingPublisherMode INTEGER, 
	ActivityFacebookShare BIT default TRUE, 
	PRIMARY KEY (ContentID, ContentType)
);
CREATE TABLE publications(
	publicationId TEXT NOT NULL,
	publicationName TEXT,
	mastheadImage TEXT,
	PRIMARY KEY (publicationId)
);
CREATE TABLE ratings(
	ContentID TEXT NOT NULL, 
	Rating INTEGER, 
	Review TEXT, 
	DateModified TEXT NOT NULL, 
	PRIMARY KEY(ContentID)
);
CREATE TABLE shortcover_page(
	shortcoverId TEXT not null,
	PageNumber INTEGER,
	FormattedPage TEXT,
	PRIMARY KEY (shortcoverId, PageNumber)
);
CREATE TABLE user(
	UserID TEXT NOT NULL,
	UserKey TEXT NOT NULL,
	UserDisplayName TEXT,
	UserEmail TEXT,
	___DeviceID TEXT NOT NULL,
	PRIMARY KEY (UserID)
);
CREATE TABLE volume_shortcovers(
	volumeId TEXT NOT NULL,
	shortcoverId TEXT NOT NULL,
	VolumeIndex INTEGER,
	PRIMARY KEY (volumeId, shortcoverId)
);
CREATE TABLE volume_tabs(
	volumeId TEXT NOT NULL,
	tabId TEXT NOT NULL DEFAULT 'abcdefff-ffff-ffff-ffff-fffffffffffd',
	PRIMARY KEY (volumeId, tabId)
);

CREATE INDEX content_attribution_index ON content (Attribution);
CREATE INDEX content_bookid_index ON content (BookID);
CREATE INDEX content_date_last_read_index ON content (DateLastRead);
CREATE INDEX content_mime_type ON content (MimeType);
CREATE INDEX content_settings_index ON content_settings (ContentID, ContentType);
CREATE INDEX content_title_index ON content (Title);
CREATE INDEX shelf_creationdate_index ON shelf (CreationDate);
CREATE INDEX shelf_id_index ON shelf (Id);
CREATE INDEX shelf_name_index ON shelf (Name);
CREATE INDEX shelfcontent_datemodified_index ON ShelfContent (DateModified);
CREATE INDEX volume_shortcovers_shortcoverId ON volume_shortcovers (shortcoverId);
CREATE INDEX volume_tabs_volumeId ON volume_tabs (volumeId);
PeterT is offline   Reply With Quote
Old 07-23-2012, 12:12 PM   #2
murg
No Comment
murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.
 
Posts: 3,238
Karma: 23878043
Join Date: Jan 2012
Location: Australia
Device: Kobo: Not just an eReader, it's an adventure!
Yeah, I've had a fossick around the database (1.9.17 and 2.0.0).

I used to manually clear out the recommended lists.

I have some notes somewhere, I should find them, confirm them and post them.
murg is offline   Reply With Quote
Old 07-23-2012, 12:26 PM   #3
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,119
Karma: 73448614
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
If you like send them to me in a PM and I can help confirm / clean-em up
PeterT is offline   Reply With Quote
Old 07-30-2012, 01:37 AM   #4
dsandrei
Member
dsandrei doesn't litterdsandrei doesn't litterdsandrei doesn't litter
 
Posts: 12
Karma: 216
Join Date: Jul 2012
Device: Kobo Touch
I had a poke around it while trying to get kepub features for my epubs. Edited the CoverId in the content table to get my covers showing.
dsandrei is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Touch, Nook Touch or Kobo Touch? tron_1970 Which one should I buy? 33 05-01-2012 12:15 PM
Kindle 3, Nook Simple Touch, Kobo Touch and Libra Pro Touch jbcohen Which one should I buy? 4 06-18-2011 07:58 PM
Tag Schema Discussion unboggling General Discussions 0 02-06-2011 09:40 PM
Any database schema changes? timlegge Kobo Reader 6 10-19-2010 08:56 PM
Error: malformed database schema (books_insert_trg) cbatalla Calibre 4 05-08-2010 01:02 PM


All times are GMT -4. The time now is 09:30 PM.


MobileRead.com is a privately owned, operated and funded community.