dbTalk Databases Forums  

example of a time (hour/min/second) dimension?

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss example of a time (hour/min/second) dimension? in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
FurmanGG
 
Posts: n/a

Default example of a time (hour/min/second) dimension? - 03-13-2006 , 02:21 PM






Do you have (or know of) an example of a time dimension (as in the
hour/minute/second of the day) dimension that you could post or point to? I'm
looking for advice on...

(1) wording the dimension members...
What do you think about the wording of this hierarchy? AM/PM... 4PM Hour...
4:32 PM... 4:32:59 PM

(2) deciding whether to use AM/PM or military time

(3) deciding on a key structure... should the key be a string "4:32:59 PM"
or should it be keyed off 3 columns (military hour/min/second) or off 4
columns (AM-PM/hour/min/second)?

I think the general advice is to build the time dimension separately from
the date dimension so you don't end up with billions of members in a combined
date and time dimension. Let me know if anybody disagrees with this advice.

Thanks!


Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: example of a time (hour/min/second) dimension? - 03-13-2006 , 05:33 PM






the key of the table could be:
a datetime (not recommanded)
a integer (recommanded) like: HHMMSS (205312 = 20h53min12sec)

after, create other columns to store the texts to display:

TimeID Hour Minute Second
205312 20h 20h53 20h53m12s
....

so you can use any text you want.

the best practices depend on what your users want to see.

AS2005 can generate a date/time dimension, so you can use it to create the
table you want.

"FurmanGG" <FurmanGG (AT) discussions (DOT) microsoft.com> wrote

Quote:
Do you have (or know of) an example of a time dimension (as in the
hour/minute/second of the day) dimension that you could post or point to?
I'm
looking for advice on...

(1) wording the dimension members...
What do you think about the wording of this hierarchy? AM/PM... 4PM
Hour...
4:32 PM... 4:32:59 PM

(2) deciding whether to use AM/PM or military time

(3) deciding on a key structure... should the key be a string "4:32:59 PM"
or should it be keyed off 3 columns (military hour/min/second) or off 4
columns (AM-PM/hour/min/second)?

I think the general advice is to build the time dimension separately from
the date dimension so you don't end up with billions of members in a
combined
date and time dimension. Let me know if anybody disagrees with this
advice.

Thanks!




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.