Rich Text Format (rtf) - Storage Data Type

A clear understanding of what type of data to use when storing Rich Test files in your database is primarily the most important step to begin with. Rich text format is an exclusively document file format with published specification developed for cross-platform document interchange. It is with no doubt that the data used in a Rich Text Format file is still a normall text but rather contains all the tags used in text formatting.

Take for instance, a string of text containing italic, bold , underlined in Times Roman 14 points looks so much like this: {\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;} {\f1\froman\fcharset2 Symbol;}{\f2\fswiss MS Sans Serif;} {\f3\froman\fprq2 Times New Roman;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs28\b\i\ul Carpe diem.\plain\f2\fs17 \par }

One can store the Rich Text format in a column with a text data type since it is every aspect a text. An important aspect to be put into consideration is the length to choose. With a length smaller than 4000 characters, one can use a varchar. A length more than 4000 characters an alternative datatype is highly recommendable. CLOB datatype are mostly used for ORACLE datatypes that is importantly usefull when it comes to storing large characters.