Page 1 of 1

Plain text database

Posted: Sat Feb 07, 2009 7:37 pm
by Jim T
I suppose its way to late for this, (the horse having left the barn some time ago ...), but I would really have liked seeing the database in plain text. The next best would being able to export it all to some very plain text output.

Thanks for the great work!

Re: Plain text database

Posted: Sat Feb 07, 2009 7:51 pm
by CintaNotes Developer
Hi and thanks for the post,

Jim T wrote:I suppose its way to late for this, (the horse having left the barn some time ago ...), but I would really have liked seeing the database in plain text.
How would you store something like tags and links in this case?

Jim T wrote:The next best would being able to export it all to some very plain text output.

Why "Export/Unicode Text" doesn't fit the bill?

Re: Plain text database

Posted: Mon Feb 09, 2009 2:57 pm
by Midas
CintaNotes Developer wrote:
Jim T wrote:I suppose its way to late for this, (the horse having left the barn some time ago ...), but I would really have liked seeing the database in plain text.
How would you store something like tags and links in this case?

As a passing comment, that could easily be accomplished by using any Lightweight Markup Language syntax, but then of course there'd be extra non alphanumeric characters interspersed with the note text... :geek:

Re: Plain text database

Posted: Mon Feb 09, 2009 3:32 pm
by toddclausen
Midas wrote:
CintaNotes Developer wrote:
Jim T wrote:I suppose its way to late for this, (the horse having left the barn some time ago ...), but I would really have liked seeing the database in plain text.
How would you store something like tags and links in this case?

As a passing comment, that could easily be accomplished by using any Lightweight Markup Language syntax, but then of course there'd be extra non alphanumeric characters interspersed with the note text... :geek:

I think this would ultimately be counterproductive as text structures are not IMHO the smallest and fastest for use in something like this. For example, a table in one of my databases takes up 80 MB as a dat file, export that to XML and it becomes 400 MB. Search time also goes up, sometimes more than proportionally to size. Most all of the markup languages are used with text stored in a container such as MySQL or SQLlite...

Re: Plain text database

Posted: Mon Feb 09, 2009 5:22 pm
by CintaNotes Developer
toddclausen wrote:I think this would ultimately be counterproductive as text structures are not IMHO the smallest and fastest for use in something like this. For example, a table in one of my databases takes up 80 MB as a dat file, export that to XML and it becomes 400 MB. Search time also goes up, sometimes more than proportionally to size. Most all of the markup languages are used with text stored in a container such as MySQL or SQLlite...

I tend to agree. I really don't see the difference if you can just as easily have your notes in plain text anytime you want via export. Guess I'll stick with the plan involving SQLite, and of course will make text export much more configurable (template-based). On the other hand, SQLite will provide a lot of functionality for free, and will also give performance on large data sets.

Re: Plain text database

Posted: Tue Feb 10, 2009 10:55 am
by Midas
toddclausen wrote:For example, a table in one of my databases takes up 80 MB as a dat file, export that to XML and it becomes 400 MB. Search time also goes up, sometimes more than proportionally to size. Most all of the markup languages are used with text stored in a container such as MySQL or SQLlite...

Wow, now that's what I call heavy duty! I'm not sure if it is the purpose of a simple notetaking app like CN to store such massive data structure, but to each his/her own, like I said before. :mrgreen: (I would rather have all that data in a proper spreadsheet, possibily linked to a note in CN, if it was my choice)

To me the advantages of keeping data in freely human readable text are quite evident: data resillience & longevity, escape from application lock-in, and so on. To illustrate this, let me say that in my library I have both some three centuries old documents still perfectly readable and some ten year old Quatro Pro datasets no one can decode (mind you, I'm not saying that it can't be done...).

But mostly I agree with you and CN Developer that SQLite is a good choice, for the performance and functionality it provides -- I just wish that, in a perfect world, it could be made optional, like it is in wikidPad 1.x... and like you yourself sugested regarding other functionalities in the "Feature Request" thread. ;)

Re: Plain text database

Posted: Tue Feb 10, 2009 11:09 am
by Midas
BTW, regarding the linking idea, local files can be linked from CN notes by the use of the "file:///" protocol prefix; should there be any spaces inside the path string, replace each of them with "%20" (without quotes; some other contentious characters like quotes and ampersand will need to be replaced, too). Example:

Code: Select all

file:///c:\Documents%20and%20Settings\USER\Desktop\My.txt


Cheers,

Re: Plain text database

Posted: Tue Feb 10, 2009 1:56 pm
by toddclausen
Midas wrote:
toddclausen wrote:For example, a table in one of my databases takes up 80 MB as a dat file, export that to XML and it becomes 400 MB.

Wow, now that's what I call heavy duty!

Sorry, this isn't a notes database but was used as a real example to illustrate how inefficient some data structures can be. Right now I have a pretty big notebook.dat but it is still just under 1 MB!

Re: Plain text database

Posted: Tue Feb 10, 2009 1:57 pm
by toddclausen
Midas wrote:BTW, regarding the linking idea, local files can be linked from CN notes by the use of the "file:///" protocol prefix; should there be any spaces inside the path string, replace each of them with "%20" (without quotes; some other contentious characters like quotes and ampersand will need to be replaced, too). Example:

Code: Select all

file:///c:\Documents%20and%20Settings\USER\Desktop\My.txt


Thanks for the tip Midas!