Results 1 to 3 of 3
  1. #1
    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)

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    natural key would be the name (and possibly the date, since forums/topics can theoretically have the same name)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Dec 2007
    Location
    London, UK
    Posts
    741
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •