all groups > sql server programming > october 2007 >
You're in the

sql server programming

group:

Table design for logging application


Table design for logging application Koger
10/15/2007 10:16:55 PM
sql server programming:
Hello

I have to log some data and I'm trying to figure out the best way to
store the data. As the database I will be using MSSQL express and
disk space used by the database is a big concern of mine. The
application is made in .Net.

Here is a bit info about the data I will be logging:
1) Data will be logged in a changeable time interval, but it will be a
fixed interval for each session. So in one session the interval might
be 1 second, and in another session it may be 100ms.
2) After a session, the data can be changed, there may be added data
from the log or data may be removed.
3) I will be using SQL functions like MIN, MAX, etc. on the data from
one or multiple sessions.

The best solution I can come up with is something like this, but as
the interval is fixed and the log data length is fixed for every
session, it should somehow be possible to store the data using less
disk space.
Column 1: session id [PK#1]
Column 2: time [PK#2]
Column 3: log data

Any suggestions?

Thank you very much in advance,
Karsten

Re: Table design for logging application Anith Sen
10/15/2007 11:45:57 PM
[quoted text, click to view]

Which column represents the time interval?

--
Anith

Re: Table design for logging application Koger
10/16/2007 5:03:47 PM
[quoted text, click to view]
Column 2. First row could be 1, next row 2 etc.

AddThis Social Bookmark Button