SmallRock Software
gStats
-  About gStats -  Features -  Download -  Help

The purpose of this document is to give a general idea of the database structure used by gStats, including tables, table columns, column data types, and table relationships. In general these tables should not be updated by reports, only queried.


visitors (int ID, char IP, char host, date date, int time)
$CONFIG[‘tableVisitors’]

Identifies unique visitors to the site.

ID - primary key for visitor records, used by other tables to reference a visitor.
IP - visitor's IP address.
host - visitor's host name.
date - date visit was made.
Time - time visit was made (in seconds from 12am on date)

hits (int vID, char URI, char title)
$CONFIG[‘tableHits’]

Indicates a page hit. There is a many to one relationship between hits and visitors.

vID - foreign key, identifies visitor that made this hit.
URI - URI of page that was viewed.
title - title of page that was viewed.

entryHits (int vID, char URI, char title, int time)
$CONFIG[‘tableEntryHits’]

Indicates a page that a visitor entered the site on. There is a one to one relationship between entryHits and visitors.

vID - foreign key, identifies visitor that made this hit.
URI - URI of page that was viewed.
title - title of page that was viewed.
time - time entry hit was made, in seconds from 12am on visit date.

exitHits (int vID, char URI, char title, int time)
$CONFIG[‘tableExitHits’]

Indicates a page that a visitor exited the site on. There is a one to one relationship between exitHits and visitors.

vID - foreign key, identifies visitor that made this hit.
URI - URI of page that was viewed.
title - title of page that was viewed.
time - time exit hit was made, in seconds from 12am on visit date.

browsers (int vID, char browser, int majVer, double minVer, double jssVer, double cssVer, int cookies, char agentString)
$CONFIG[‘tableBrowsers’]

Information on browser of a given visitor. There is a one to one relationship between browsers and visitors.

vID - foreign key, identifies visitor that used this browser.
browser - browser name.
majVer - major version number of the browser.
minVer - minor version number of the browser.
jssVer - JavaScript version supported by browser.
cssVer - CSS version supported by browser.
cookies - does the browser support cookies (1:yes, 0:no)?
agentString - the agent string used to identify this browser.

countries (int vID, char country)
$CONFIG[‘tableCountries’]

Originating country of a given visitor. There is a one to one relationship between countries and visitors.

vID - foreign key, identifies visitor from this country.
Country - 2 letter country code.

OSs (int vID, char OS)
$CONFIG[‘tableOSs’]

Information on operating system of a given visitor. There is a one to one relationship between OSs and visitors.

vID - foreign key, identifies visitor that used this OS.
OS - operating system name.

resolutions (int vID, int width, int height, int colorDepth)
$CONFIG[‘tableResolutions’]

Information on screen resolution of a given visitor. There is a one to one relationship between resolutions and visitors.

vID - foreign key, identifies visitor that used this resolution.
width - screen width in pixels.
height - screen height in pixels.
colorDepth - screen color depth in bits.

referrerHits (char URL, date date, int time)
$CONFIG[‘tableReferrerHits’]

Indicates a referral to the site. This is an independent table and has no relation to visitors.

URL - URL of page that referred a user to the site.
date - date the referral was made.
time - time the referral was made, in second from 12am on date.

configuration (char name, char value)
$CONFIG[‘tableConfiguration’]

Stores configuration values used by gStats. Reports should not query this table directly.

name - name of configuration option being stored.
value - value of configuration option.

reportGroups (char groupName)
$CONFIG[‘tableReportGroups’]

Stores the names of report groups.

groupName - name of report group.

reportGroupEntries (char groupName, char className, int sortOrder, int numRows)
$CONFIG[‘tableReportGroupEntries’]

Stores entries for report groups.

groupName - foreign key, identifies report group that this entry belongs to.
className - class name of report.
sortOrder - sort position for this report within the report group (starts at 0).
numRows - the number of rows to show for this report in the given report group (-1 shows default number of rows).

searchEngines (char engine, char domain, char query)
$CONFIG[‘tableSearchEngines’]

Table used for identifying search engines, mainly cross referenced with referrerHits. This table is only used for querying, but not updating or deleting.

engine - search engine name.
domain - domain of search engine.
query - query string used by engine when a search is performed.

browscap (int id, char title, char parent, char browser, char platform, char version, int majorVersion, int minorVersion, int cssVersion, int cookies, int crawler, int stripper)
$CONFIG[‘tableBrowscap’]

This is merely a large cache of browser identification data. It is used to query information needed for browsers and OSs . This table it only queried, no updating or deleting is done. For more information on the fields, visit http://www.garykeith.com/browsers/downloads.asp

ipToCountry (double ip_from, double ip_to, char country_code2, char country_code3, char country_name)
$CONFIG[‘tableIpToCountry’]

This table is used for identifying the country that an IP is from. This table is only used for querying, but not updating or deleting. For more information on the fields, visit http://ip-to-country.webhosting.info/

Home     |    Portfolio     |    Software     |    Contact Us
Copyright © 2007 SmallRock Software, Inc. All Rights Reserved.