Discussion Locked

Articles stored in a database

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello,

I am developing a web application for my wife's medical practice which
will store various articles and informational pieces. I am wanting to
make these documents searchable and am considering storing them in a SQL
Server database. My problem is how achieve the formatting. I am wanting
to deliver a a formatting similar to the articles in TechRepublic such as:

https://www.techrepublic.com/article.jhtml?id=r00820011024ern01.htm

I am not sure that the above example is database dirven but I suspect it
is. I see that each article allows the embedding of graphics and other types of formatting (bolding, bulleting, hyperlinks). I also see that the articles allow for a type of page break. One of my thoughts was to store the articles within
the table in HTML format, but I am not sure how effective this will be.

Any input would be enormously appreciated. Thanks for your consideration.

7 replies

by satheesh

You can make use of the Binary large datatype. In case u r using Oracle then we can make use of the context catridge for the search feature.

Regards,
S.Satheesh.

by hugh

My main concern is how do I store the article - in text or HTML format- in order to achieve the foratting that I am looking for. Any suggestions?

by mattohare

Well, if you go in plain text for the articles themselves, you can store them in the "text" data type. For indexing, you have two choices. Full Text indexing, or your own indexing.

I've not used Full Text indexing, but the Books Online can explain that pretty well.

When I use my own indexing, I give each article its own ID number (the primary key to the table) and use that next to each index entry in another table. (Quick review: First table has ArticleID and ArticleText. Second tablehas ArticleFK, referring to first table's ArticleID, and KeyWord, a key word for the article.)

Under this second senario, you could provide web pages to your users that have the words with links to the articles. btw, you can store HTML encoded text in the "text" fields of sql server databases the same as non-HTML text.

I wish I could answer more to the HTML/Web page, but that is a part i'm still learning myself.

Good luck, and I hope this helps a little.

by geert pante

Wouldn't you consider storing them as XML in a SQL CLOB? And use an XSLT stylesheet to transform them to HTML when needed.

That way you can seperate the presentation logic (HTML) from the content. You can choose your own XML schema to representbulletted lists, keywords, hyperlinks, tables, that's probably smaller than storing the full HTML, and easier to search in.

You can also change the HTML looks without having to change all articles, and extend the XML to include non-visual markup or elements.

For example, you could choose the markup xxx to not be visualised in HTML, but still be an identifier for a full-text search.

You can find more about XML/XSLT all over the web, but http://www.zvon.org/xxl/XSLTutorial/Output/
is a good start.

This discussion is closed to new replies.