473,322 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Code for "bucket-ized" time table???

Hello,

First, I want to apologize for posting this message to multiple
groups. (1) I have a hard time finding any info and (2) this is not a
school assignment.

I am trying to create in my Oracle test database a "time" table that
would have time buckets. What I mean is that, it would have some
structure like this

0-5 minute bucket
10-15 minute bucket
15-20 minute bucket
....
55-60 minute bucket
0-2 hour bucket
2-4 hour bucket
4-6 hour bucket
....
22-24 hour bucket
day number
week number
month number
year number

How can I go about doing this? I'm very new to data-warehousing and
have never had to this before. Any suggestions, code
snippets...anything is welcome!

Thanks in advance for any help you can provide!

KS.
Jul 19 '05 #1
2 5057
New Guy wrote:
I am trying to create in my Oracle test database a "time" table that
would have time buckets. What I mean is that, it would have some
structure like this


Are you allowed to use Oracle capabilities, or do you need to be 'vendor
neutral'?

If you are allowed to take advantage of Oracle native capabilities,
hopefully you are using Oracle9i R2. Then look up the NTILE and
WIDTH_BUCKET functions, and the examples, in the Oracle supplied manual

Oracle9i Data Warehousing Guide
Release 2 (9.2)
Part Number A96520-01

available at http://docs.oracle.com ... (table of contensts at
http://download-west.oracle.com/docs...a96520/toc.htm)
Also I highly recommend a gander at 'Mastering Oracle SQL' from
http://oracle.oreilly.com/ as it gives the logic behind those functions -
as well as many many more SQL tricks that your typical developer misses.

/Hans
Jul 19 '05 #2
"New Guy" <ks***@adnohr.net> schrieb im Newsbeitrag
news:2e**************************@posting.google.c om...
I am trying to create in my Oracle test database a "time" table that
would have time buckets. What I mean is that, it would have some
structure like this

0-5 minute bucket
10-15 minute bucket
15-20 minute bucket
...
55-60 minute bucket
0-2 hour bucket
2-4 hour bucket
4-6 hour bucket
...
22-24 hour bucket
day number
week number
month number
year number


A vendor neutral approach could be to create an additional bucket dimension
(with a key column in your fact table) if each fact has this dimensionality.
This would allow your users to see how the bucket usage developed over time.

Kind regards,

Joerg
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but...
7
by: Philip Nelson | last post by:
Folks, I've been exercising my mind recently about the complexities of implementing a "currency" data type within DB2 to cope with multiple currencies. A monetary value is often simply...
21
by: Helge Jensen | last post by:
I've got some data that has Set structure, that is membership, insert and delete is fast (O(1), hashing). I can't find a System.Collections interface that matches the operations naturally offered...
3
by: Peter Proost | last post by:
Hi group, I've got this bit of code (see below) which draws a basketball field in a picturebox (width:198, height:368) but now I was wondering what would be the easiest way to check inside the...
7
by: per9000 | last post by:
Dear Black Knight, I have no quarrel with you sir Knight, but I must import your parents. SHORT VERSION: I tried three variants of "from ../brave.py import sir_robin", one works. I want...
3
by: longhair | last post by:
I have a page that's causing me some problems in FireFox 1.5 but not IE6. I have a <dl> with the <dt> and <dd> both within defined with "float: left" to have a table-like look. See it at...
0
by: (PeteCresswell) | last post by:
A friend who does technical writing offers his clients a "Bucket Of Hours" deal. The client chooses a number of hours, pays for 1/3 of the hours up front and the friend commits to doing whatever...
21
by: Johan Tibell | last post by:
I would be grateful if someone had a minute or two to review my hash table implementation. It's not yet commented but hopefully it's short and idiomatic enough to be readable. Some of the code...
7
by: ^cypis^ vel. SQ9JTI | last post by:
Hi, i need your help. I have to prepare a homework, easy program, which will be sorting the values from txt file and writing the solution to another txt file. It has to be a bucket sort. Have...
350
by: Lloyd Bonafide | last post by:
I followed a link to James Kanze's web site in another thread and was surprised to read this comment by a link to a GC: "I can't imagine writing C++ without it" How many of you c.l.c++'ers use...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.