InstaGov/schema/rating log

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< InstaGov‎ | schema
Revision as of 19:42, 10 January 2013 by Woozle (talk | contribs) (removed ID_User)
Jump to navigation Jump to search

About

  • Purpose: Records every time a user submits or revises a rating.

History

  • 2013-01-06
    • Removed "ID_Solution" field on the assumption that it was an earlier version of "ID_Answer" and should have been removed when that field was added.
    • Removed "ID_Proxy" because the schemata for proxying haven't been devised yet, so there's no way to know what would be an appropriate way to record their usage.
  • 2013-01-10 Removed ID_User because it's redundant. If we need to record anything about the user, it would be IP address or browser, but that should be left up to a session manager (and it's not clear that this much tracking of the user's access habits would be consistent with the design goals).

SQL

<mysql>CREATE TABLE `rating_log` (

  `ID`        INT      NOT NULL AUTO_INCREMENT,
  `ID_Answer` INT      NOT NULL COMMENT "answer.ID for which this is a rating",
  `ID_Rating` INT      NOT NULL COMMENT "rating.ID to which this rating was applied",
  `Value`     INT      NOT NULL COMMENT "rating value",
  `WhenDone`  DATETIME NOT NULL COMMENT "when this rating was posted",
  `Remark`    VARCHAR(255)      COMMENT "voter's comments on this rating (can include link or redirect)",
  PRIMARY KEY(`ID`)
)
ENGINE = MYISAM;</mysql>