[1.0B] Comparing two CintaNotes databases?

littlebigman
Posts: 42
Joined: Mon Aug 17, 2009 12:13 pm
Contact:

[1.0B] Comparing two CintaNotes databases?

Postby littlebigman » Thu May 06, 2010 5:44 pm

Hello,

I worked on a laptop and copied its SQLite cintanotes.db database on a USB keydrive. Now, back at home, I need to compare this DB with the one on my desktop.

Does someone know 1) if sqlite3.exe can open two databases and show differences, and 2) what tables I should check for notes that differ (added/modified)?

FYI, here are the tables/indexes/trigger in cintanote.db:

Code: Select all

sqlite> .sc
CREATE TABLE NoteLocalTime  ( noteid INTEGER PRIMARY KEY,        created TEXT );

CREATE TABLE Notes(     id              INTEGER PRIMARY KEY,    source  TEXT NOT
 NULL DEFAULT '',       link    TEXT NOT NULL DEFAULT '',   created DATETIME NOT
 NULL DEFAULT CURRENT_TIMESTAMP,   num          INTEGER UNIQUE );
CREATE VIRTUAL TABLE NotesData USING fts3(      title, text, tokenize = my_unico
de);
CREATE TABLE 'NotesData_content'(docid INTEGER PRIMARY KEY, 'c0title', 'c1text')
;
CREATE TABLE 'NotesData_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,le
aves_end_block INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx));
CREATE TABLE 'NotesData_segments'(blockid INTEGER PRIMARY KEY, block BLOB);
CREATE TABLE Notes_Tags(        noteid INTEGER NOT NULL,        tagid INTEGER NO
T NULL,         PRIMARY KEY (noteid, tagid));
CREATE TABLE Tags(   id INTEGER PRIMARY KEY,   name TEXT NOT NULL UNIQUE );
CREATE INDEX ix_Notes_Tags_noteid ON Notes_Tags (noteid ASC);
CREATE INDEX ix_Notes_Tags_tagid ON Notes_Tags (tagid ASC);
CREATE TRIGGER tr_Notes_num AFTER INSERT ON Notes BEGIN     UPDATE Notes SET num
 = COALESCE((SELECT max(num) FROM Notes), 0) + 1         WHERE id = NEW.id; END;


Thank you.
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: [1.0B] Comparing two CintaNotes databases?

Postby CintaNotes Developer » Wed Jun 02, 2010 10:02 am

Hi and sorry for the delayed reply,

I don't think that you can use sqlite3.exe to compare two SQlite databases. But I'm sure there are 3rd party tools for that.

The main tables you should compare are:

Notes - for the notes themselves;
NotesData_content - to track note text changes.
Alex

Return to “CintaNotes Personal Notes Manager”