Brainstorming/HostFerret/SQL/hf checkins
< Brainstorming | HostFerret | SQL
Jump to navigation
Jump to search
About
Purpose: Rather than log each and every single checkin, we'll just keep statistics about stretches of checkins that fall within expected time-limits. That is, as long as a checkin isn't too late, we'll just treat it as
SQL
<mysql>CREATE TABLE `hf_checkins` (
`ID` INT NOT NULL AUTO_INCREMENT, `WhenStart` DATETIME NOT NULL COMMENT "when the stretch started", `ID_Session` INT NOT NULL COMMENT "session.ID of checkin connection", `Stats_Count` INT NOT NULL COMMENT "number of checkins in this stretch", `Stats_DiffSum` INT NOT NULL COMMENT "SUM(X) where X is interval since previous checkin", `Stats_DiffSSq` INT NOT NULL COMMENT "SUM(X^2)", PRIMARY KEY(`ID`)
) ENGINE = InnoDB;</mysql>