Statistics how to use ASP to write Web site statistics System (III)
The design of the table structure is an extremely important work, and its reasonableness is closely related to the programming.
A website statistic system should have a user table, a table of statistics.
This user table is the table that keeps the registered user information, and the statistic table is the table that records the user's each statistic index value. In the table of statistics we can specify the user's statistics, we can use an ID value to represent each indicator, here we have a simple example.
User table:
Table name:regist_table
Field type
Username C User Name
Password C password
RegDate C Registration Time
Value table:
Table name:value_table
Field type
Username C User Name
ID C statistic Indicator ID
Value C Statistic Index
ID List:
Table name:id_table
Field type
ID C statistic Indicator ID
Description of Idvalue C statistical indicators
With these three tables, we can begin to do it.
If we can specify the following ID
ID idvalue
101 Total Traffic
201 1st Visit Volume
202 2nd Visit Volume
: :
: :
231 31st Visit Volume
To start the statistics for the user we have to register the user first, the user's use of the process is as follows:
Fill in the registry-> The initial user's value table (add the corresponding ID)-> Feedback the registration to the user
-> Users add links to their pages-> start counting.