From: Thufir Date: August 13 2012 11:56pm Subject: javax.mail.Message List-Archive: http://lists.mysql.com/mysql/227994 Message-Id: <50299422.2030909@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: From: Scott Knaster 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: news@stripped 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: usenet@stripped 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: 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