[Tutor] storing text in databases
Bob Gailer
bgailer at alum.rpi.edu
Thu Feb 22 08:12:39 CET 2007
Chae M wrote:
> Is it a reasonable idea to store text (a few hundred words each
> record) in a database? I'm learning to use the SQLite database
> that comes with Python, and it seems like a good idea in terms
> of being able to search for notes, etc. My specific questions:
>
> - Can formatting of text be stored or is it always only raw text?
>
Any system for storing / transmitting text uses "raw text". Formatting
has to do with how the text is "rendered" when going to some display
device (printer, video, ???).
Therefore "formatted" text is "raw" text that includes formatting
instructions (also "raw" text).
HTML is one example of "formatted" text (the rendering is done by a web
browser). RTF, XML, MS Word are others. There are *many* formatting schemes.
Does that address that issue?
> - What is the upper limit on the size of a stored document? I.e.,
> would this also work for big documents (10-100 pages?)
>
AFAIK there is no limit. However there often comes times where it is
"better" to store large documents as separate files and keep the
filenames in the database. If you do not need to run queries against the
document contents, consider that approach. If you need to query contents
consider building indexes of keywords rather than asking a database to
find rows where document like "?dollar?" (or is is % ?)
> - Is this a good idea/can it work?
>
Depends.
WIR
--
Bob Gailer
510-978-4454
More information about the Tutor
mailing list