If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > What is the natural key for a forum/topic?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-07-10, 10:33
sqlsrvr sqlsrvr is offline
Registered User
 
Join Date: Jun 2010
Posts: 3
What is the natural key for a forum/topic?

For a forum and a topic, what are the natural keys for this? URL? (note that you can have subforums etc)
Reply With Quote
  #2 (permalink)  
Old 06-07-10, 10:46
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
natural key would be the name (and possibly the date, since forums/topics can theoretically have the same name)
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 06-07-10, 17:36
dportas dportas is offline
Registered User
 
Join Date: Dec 2007
Location: London, UK
Posts: 732
In the NNTP protocol, it's the Message-ID. As far as I know all the other attributes of a post can be duplicated.

"Since the message-id field is unique with each article, it may be used by a news reading program to skip duplicate displays of articles that have been posted more than once, or to more than one newsgroup."
RFC 977: Network News Transfer Protocol

If you are building your own forum then whatever you like. It would seem like a good idea in principle to hash the content of the message and use a hash as the key. I suppose it depends on what the desired behaviour is when a post is duplicated. Maybe you actually want to give users the freedom to post the same message twice with the same timestamp, etc.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On