I'm using the GNU NNTP API to connect to a NNTP server, leafnode, running on localhost. This API uses javax.mail.Message and there's no convenient way to lookup a specific Message without opening a Folder and searching through the messages, which is fine for a small number of articles, but not for a large number of articles.

Which leads me to the bad idea of persisting javax.mail.Message objects to database. A typical header looks like so:

Path: news.gmane.org!not-for-mail
Message-ID: <x1-c1ipqemfliwhpq0xuzbgttkt...@gwene.org>
From: Scott Knaster <p...@gwene.org>
Newsgroups: gwene.com.blogspot.googlecode
Subject: Fridaygram: Web Lab, holey Mars, Earth opposite
Date: Fri, 20 Jul 2012 19:35:13 +0200
Lines: 15
Approved: n...@gmane.org
NNTP-Posting-Host: sea.gmane.org
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: dough.gmane.org 1342807330 19811 80.91.229.5 (20 Jul 2012 18:02:10 GMT)
X-Complaints-To: use...@dough.gmane.org
NNTP-Posting-Date: Fri, 20 Jul 2012 18:02:10 +0000 (UTC)
X-Content-Hash: ZtGCfjo23fkSXHkU5acnV+nWVKk
X-Feed: http://googlecode.blogspot.com/atom.xml
Archived-at: <http://feedproxy.google.com/~r/GDBcode/~3/GZc_SjCLlq0/fridaygram-web-lab-holey-mars-earth.html>
Xref: dur.bounceme.net gwene.com.blogspot.googlecode:4


The last header, Xref, has the article number. (Unfortunately, this API provides no mechanism for looking up articles by their number.)

Obviously, I don't need all of those headers. However, for design should that be a many-to-many between the articles table and the headers table? Or, should I just have a table with some of those headers for columns?

The content is generally plaintext, but could have html or jpeg's. I'm not dealing with large attachments, at worst an image or two. Mostly text. Should the content be in its own table?


thanks,

Thufir

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql

Reply via email to