Re: [sqlite] Date Dimension

2010-04-22 Thread Oliver Peters
Adam DeVita adev...@... writes: [...] If I have to generate the date dimension on my own, I'm hoping to use something like create table date_dimension ( [Dateid] integer primary key, [Real_Year] int , [Month_name] text, [Day] int , [QuarterNumber] int, [DayofWeek_name] text,

Re: [sqlite] Date Dimension

2010-04-22 Thread Adam DeVita
good ideas. The spread sheet trick hadn't occurred to me. I think I'll go that route since it keeps things user readable thank you for your thoughts, all. regards, Adam On Thu, Apr 22, 2010 at 2:51 AM, Oliver Peters oliver@web.de wrote: Adam DeVita adev...@... writes: [...] If

[sqlite] Date Dimension

2010-04-21 Thread Adam DeVita
Good day, Given the context I'm in, sqlite is going to be used for our data warehousing. (We generate about 2MB of raw data in a month, so we don't think we need a heavy DB engine.) Since most warehouses have one, which are very similar from application to application, I'm wondering if there

Re: [sqlite] Date Dimension

2010-04-21 Thread P Kishor
On Wed, Apr 21, 2010 at 1:50 PM, Adam DeVita adev...@verifeye.com wrote: Good day, Given the context I'm in, sqlite is going to be used for our data warehousing.  (We generate about 2MB of raw data in a month, so we don't think we need a heavy DB engine.) Since most warehouses have one,

Re: [sqlite] Date Dimension

2010-04-21 Thread Pavel Ivanov
What is a Date Dimension? Probably OP meant this: http://en.wikipedia.org/wiki/Dimension_(data_warehouse). But I don't have any answer to the question asked. Pavel On Wed, Apr 21, 2010 at 3:21 PM, P Kishor punk.k...@gmail.com wrote: On Wed, Apr 21, 2010 at 1:50 PM, Adam DeVita

Re: [sqlite] Date Dimension

2010-04-21 Thread Adam DeVita
Yes. A Date dimension is a table that has all possible dates for your data, thus making reporting on properties of the date easy. Something like this CREATE TABLE Date_dimension ( DateID int NOT NULL , /*an int key to match up to date fields in fact storage tables*/ [Date] datetime NOT NULL,

Re: [sqlite] Date Dimension

2010-04-21 Thread P Kishor
On Wed, Apr 21, 2010 at 2:37 PM, Adam DeVita adev...@verifeye.com wrote: Yes. A Date dimension  is a table that has all possible dates for your data, thus making reporting on properties of the date easy.  Something like this CREATE TABLE Date_dimension (  DateID int NOT NULL , /*an int key

Re: [sqlite] Date Dimension

2010-04-21 Thread Adam DeVita
Good day, I've been looking at doing that, but am having problems converting backwards. The idea of a date dimension is to have one row for every possible date in the time span of interest For example, I'm tracking product histories, so I know that there will be no activity before January 1,

Re: [sqlite] Date Dimension

2010-04-21 Thread Simon Slavin
On 21 Apr 2010, at 9:36pm, Adam DeVita wrote: /*then */ update date_dimension set julian_day = julianday('now') - julianday('1990-01-01') + epoch_day; /* then uh some query that updates the table containing the julian date of every day from Jan 1, 1990 through 2030, and fill in the

Re: [sqlite] Date Dimension

2010-04-21 Thread P Kishor
On Wed, Apr 21, 2010 at 3:36 PM, Adam DeVita adev...@verifeye.com wrote: Good day, I've been looking at doing that, but am having problems converting backwards. The idea of a date dimension is to have one row for every possible date in the time span of interest For example, I'm tracking