db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: Question about scalability
Date Wed, 28 May 2008 13:50:11 GMT
> I am working on a database design which can record down each of the 
> visit to my web application.

I think that's a great use for Derby, and you should be able to be
very successful, if you are careful with your design. The more
information about the details that you can share with the community,
of course, the more useful the feedback will be.

One technique that I think works well with this sort of time-oriented
data is to structure it as an ongoing series of tables, of similar
schema, with each table holding a segment of time.

For example, you might determine that you can hold 1 week's worth of
data in a table, so (since there are 52 weeks in a year), you name
the tables for 2008 something like:

   CREATE TABLE WEBLOG_2008_1 (...)
   CREATE TABLE WEBLOG_2008_2 (...)
   CREATE TABLE WEBLOG_2008_3 (...)
   CREATE TABLE WEBLOG_2008_4 (...)

and you store the first week's data into WEBLOG_2008_1, and the
second week's data into WEBLOG_2008_2, and so forth.

At any given instant there is exactly 1 "current" table for this
week's data, to which you are appending rows, and some collection
of "historical" data which you can query as your needs arise.

thanks,

bryan



Mime
View raw message