473,771 Members | 2,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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...anyt hing is welcome!

Thanks in advance for any help you can provide!

KS.
Jul 19 '05 #1
2 5095
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.n et> schrieb im Newsbeitrag
news:2e******** *************** ***@posting.goo gle.com...
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
6401
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 something I'll need in this case is some experience-based set of rules about how to use python in this context. For example... is defining readonly attributes in classes worth the hassle ? Does duck-typing scale well in complex
7
2755
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 represented as a DECIMAL column : for example many times I've seen DECIMAL(12,2) used. The issue with this is that there is nothing to interpret what currency this relates to (US dollars, Canadian dollars, Euros, British pounds or whatever), and a...
21
13847
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 by Sets. - ICollection cannot decide containment - IList promises indexability by the natural numbers, which is not achievable (since i hash elements, not sort them). - IDictionary is definatly not setlike. Although I can, of course, define...
3
1663
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 picturebox mouseup event if I clicked inside or outside the 3point area, because the 3point area isn't a real cirkle Any hints or tips are welcome.
7
2752
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 to use it in a py-file to execute command-line-style and that does not work.
3
1286
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 http://bubba.textdriven.com/partners.htm and http://bubba.textdriven.com/partners-2.htm. The issue I'm concerned with is the following block - an <h3> - does
0
1303
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 the client wants whenever they want it done over the next 12 months. The client's obligation is to use up all the hours in the allotted time or pay for them. The friend's obligation is to be available and perform the request et tasks. He...
21
3223
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 (i.e. the get_hash function) is borrowed from various snippets I found on the net. Thee free function could probably need some love. I have been thinking about having a second linked list of all entries so that the cost of freeing is in proportion to...
7
5065
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 anyone a source code for this sample? Many thanks in advance! Regards, Luke
350
11880
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 one, and in what percentage of your projects is one used? I have never used one in personal or professional C++ programming. Am I a holdover to days gone by?
0
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.