Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Storing statistics for a news social website

Author  Topic 

irs2k3
Starting Member

22 Posts

Posted - 2009-12-20 : 12:19:03
Hi guys,

I am creating a news aggregator website where a user can comment, Read, and do other stuff.

Now, I want to track user activity and store it in DB.

For that, I created an MIS Table that contains the following attributes for each news:

------------------------------------
CREATE TABLE [dbo].[TH_News_MIS](
[ID] [int] IDENTITY(1,1) NOT NULL,
[NewsID] [int] NOT NULL,
[Clicks] [int] NOT NULL,
[Comments] [int] NOT NULL,
[LastClickDate] [datetime] NOT NULL,
[Trims] [int] NOT NULL,
[LastTrimDate] [int] NOT NULL,
CONSTRAINT [PK_TH_News_MIS] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
------------------------------

Is this the best approach to generate statistics for a website?

Thanks.

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2009-12-21 : 09:23:46
It all looks good up until I read "statistics for a website". Statistics for a website is usually generated by the webserver and stores information about browser type, ip, which page was accessed etc. Custom statistics like your can very well be tracked with your implementation. If this is the best way though is more a business decision than a "technology" decision.

- Lumbago
http://xkcd.com/327/
Go to Top of Page
   

- Advertisement -