Tuesday, December 29, 2015

The upcoming year

Right smack in the middle of the busiest time of the year for the business (this time of year we sell fireworks for New Year) I have opportunity to reflect a bit on the upcoming year and what 2016 will bring of challenges and joys.

Friday, December 4, 2015

Vessel Fuel Consumption - or Restarting Running Sum

I got a question recently from Morten Braten whether my FIFO analytic techniques could be helpful for calculating the value of fuel consumption for cargo vessels. It turned out not to be quite the same, but similar. Analytic functions definitely could help.

I'll show how in two parts. First this blog post will calculate the fuel consumption in quantity, then part two will calculate the value by FIFO.

Wednesday, October 21, 2015

Bloggers Meetup at #OOW15

The last time I went to Oracle OpenWorld, I hadn't started blogging yet. Now I think it fair to call myself "blogger", even though I don't blog very regularly.

So I will try to attend the Bloggers Meetup:

http://www.pythian.com/blog/oracle-openworld-2015-bloggers-meetup/
https://community.oracle.com/events/1099

I have heard a lot of good about it, so I am looking forward to see for myself ;-) Viewing who has RSVP'ed at either link, I know I spot some good people.

(Funny thing though, OTN says the address is 175 4th St, Pythian says it is 101 4th St? I guess I'll be able to find it anyway ;-)

See you all in San Francisco...

Oracle OpenWorld 2015

In 2 days time I fly off to San Francisco for Oracle OpenWorld 2015. Last time I went to OpenWorld was 2008, so I'm looking forward to a re-visit and see how much bigger it has become :-)

Like everybody else I've been making a schedule for the week. Of course things will happen to change the schedule along the way, but some things I definitely have on the must-do list...

Friday, October 16, 2015

Thank You for the Votes

The Oracle Database Developer Choice Awards voting is now closed.

I thank all of you who voted for me. It was an honor and privilege just to be nominated, and then even getting votes from somebody, well that feels good :-)

My final ranking is middling, but the competitors were all worthy and good people, so I have no complaints :-)

CATEGORY  NAME              FINAL_RANK POSITIVE_VOTES
--------- ----------------- ---------- --------------
apex      Morten Braten              1            186
apex      Kiran Pawar                2            180
apex      Juergen Schuster           3            168
apex      Jari Laine                 4            137
apex      Karen Cannell              5             91
apex      Paul MacMillan             6             79
apex      Trent Schafer              7             71

db-design Heli Helskyaho             1            239
db-design Rob Lockard                2            206
db-design Michelle Kolbe             3            181
db-design Mark Hoxey                 4             96

ords      Dietmar Aust               1            162
ords      Dimitri Gielis             2            100
ords      Morten Braten              3             68
ords      Kiran Pawar                4             50
ords      Anton Nielsen              5             33
ords      Tim St. Hilaire            6             21

plsql     Roger Troller              1            219
plsql     Adrian Billington          2            209
plsql     Patrick Barel              3            126
plsql     Sean Stuber                4            123
plsql     Morten Braten              5            113
plsql     Kim Berg Hansen            6             71
plsql     Bill Coulam                7             66

sql       Emrah Mete                 1            447
sql       Sayan Malakshinov          2            232
sql       Sean Stuber                3            132
sql       Kim Berg Hansen            4            110
sql       Matthias Rogel             5             80
sql       Erik Van Roon              6             74
sql       Justin Cave                7             65
sql       Stew Ashton                8             54

Congratulations to all nominees and big hurrahs for the top in each category.

If you're going to Oracle OpenWorld, come to the YesSQL celebration where the winners will get their awards. I'll be there and we can have a chat ;-)

See you in San Francisco...

Monday, October 5, 2015

Oracle Database Developer Choice Awards Voting Status

UPDATE: These are the final results - voting is now closed. Thanks to everyone who voted :-D

The Oracle Database Developer Choice Awards voting will go on until October 15th 2015. If you haven't already, you should go vote now!

Here is the present status of how many votes have been submitted per category, including how many votes the category has increased with since "approximately yesterday" (since last time I downloaded the data, which I plan to do approximately daily ;-), and including how many votes the category has increased with since I started collecting data on October 2nd.

HOUR        CATEGORY  VOTES  INC_VOTES  INC_TOTAL
----------- --------- ----- ---------- ----------
Oct 16, 06h sql        1355         40        377
Oct 16, 06h plsql       990         94        429
Oct 16, 06h apex        969         72        630
Oct 16, 06h db-design   835         60        592
Oct 16, 06h ords        461         22        100

The SQL category clearly has gathered most votes, but since an APEX developer probably also has an opinion in PL/SQL and SQL, but not necessarily vice versa, this could have a natural explanation ;-)

And here is the present status of the individual nominees within each category with these data:

  • Score (points)
  • Total votes
  • Negative votes
  • Positive votes
  • Percent votes that are positive
  • Rank by score
  • Rank by positive votes
  • Increase in score "since yesterday"
  • Increase in positive votes "since yesterday"

HOUR        CATEGORY  NAME              SCORE VOTES NEGA POSI POS_PCT RNK_SCO RNK_POS INC_SCO INC_POS
----------- --------- ----------------- ----- ----- ---- ---- ------- ------- ------- ------- -------
Oct 16, 06h apex      Morten Braten      1810   191    5  186      97       1       1     160      16
Oct 16, 06h apex      Kiran Pawar        1750   185    5  180      97       2       2     300      30
Oct 16, 06h apex      Juergen Schuster   1650   171    3  168      98       3       3     130      13
Oct 16, 06h apex      Jari Laine         1080   166   29  137      83       4       4      20       3
Oct 16, 06h apex      Karen Cannell       890    93    2   91      98       5       5      20       2
Oct 16, 06h apex      Paul MacMillan      710    87    8   79      91       6       6      30       3
Oct 16, 06h apex      Trent Schafer       660    76    5   71      93       7       7      40       4
Oct 16, 06h db-design Rob Lockard        2000   212    6  206      97       1       2     350      36
Oct 16, 06h db-design Heli Helskyaho     1670   311   72  239      77       2       1      60       8
Oct 16, 06h db-design Michelle Kolbe     1530   209   28  181      87       3       3     100      10
Oct 16, 06h db-design Mark Hoxey          890   103    7   96      93       4       4      30       3
Oct 16, 06h ords      Dietmar Aust       1590   165    3  162      98       1       1     140      14
Oct 16, 06h ords      Dimitri Gielis      940   106    6  100      94       2       2      20       2
Oct 16, 06h ords      Morten Braten       610    75    7   68      91       3       3      60       6
Oct 16, 06h ords      Kiran Pawar         460    54    4   50      93       4       4       0       0
Oct 16, 06h ords      Anton Nielsen       290    37    4   33      89       5       5       0       0
Oct 16, 06h ords      Tim St. Hilaire     180    24    3   21      88       6       6       0       0
Oct 16, 06h plsql     Roger Troller      2040   234   15  219      94       1       1     300      30
Oct 16, 06h plsql     Adrian Billington  2020   216    7  209      97       2       2     320      34
Oct 16, 06h plsql     Patrick Barel      1160   136   10  126      93       3       3      90       9
Oct 16, 06h plsql     Sean Stuber        1160   130    7  123      95       3       4      60       6
Oct 16, 06h plsql     Morten Braten      1070   119    6  113      95       4       5      70       7
Oct 16, 06h plsql     Bill Coulam         600    72    6   66      92       5       7      20       2
Oct 16, 06h plsql     Kim Berg Hansen     590    83   12   71      86       6       6      20       3
Oct 16, 06h sql       Emrah Mete         4120   482   35  447      93       1       1     260      26
Oct 16, 06h sql       Sayan Malakshinov  1990   265   33  232      88       2       2      10       1
Oct 16, 06h sql       Sean Stuber        1120   152   20  132      87       3       3      40       4
Oct 16, 06h sql       Kim Berg Hansen     870   133   23  110      83       4       4      50       5
Oct 16, 06h sql       Matthias Rogel      710    89    9   80      90       5       5      10       1
Oct 16, 06h sql       Erik Van Roon       590    89   15   74      83       6       6      10       1
Oct 16, 06h sql       Justin Cave         510    79   14   65      82       7       7      10       1
Oct 16, 06h sql       Stew Ashton         420    66   12   54      82       8       8      10       1

These data I calculate via the methods I describe in my posts on Scraping and querying Oracle Database Developer Choice Awards votes Part 1 and Part 2.

I will endeavour to update this post daily until the voting period ends October 15th. If *you* haven't voted yet, go do so!

(There has been some discussion whether or not downvoting is fair in a competition like this. In my personal opinion it isn't, but technically this is a reuse of a voting system for ideas, so this is how it is and we'll live with it. But I think the final judges should perform these queries after the voting is ended.

UPDATE: Now the voting has ended and mostly ranking by score and ranking by positive votes agree. 1st and 2nd place in DB-Design category is switched around, that's the major difference. Heli has 33 more positive votes than Rob, but due to an awful lot of negativity, she is 2nd place according to score. Then there's two small variances within PL/SQL category. By score Patrick and Sean are tied for 3rd, but Patrick has 3 more positive votes. And by score Bill har 10 points more than Kim, but Kim has 5 more positive votes.
)

Scraping and querying Oracle Database Developer Choice Awards votes - Part 2

In Part 1 I demonstrated how to "scrape" data from the live webpages with the votes of the Oracle Database Developer Choice Awards. Unfortunately those webpages are not ideal for scraping, so I promised a workaround. Here I do a semi-manual scraping af data by using a browser to retrieve the actual HTML, save it to a file, and then let the code parse out the data from the file.

Scraping and querying Oracle Database Developer Choice Awards votes - Part 1

You know about the Oracle Database Developer Choice Awards voting, right? If not, then go vote now, please, and then come back and read on :-)

I want to be able to query the voting status, who is ranked what in each category and so on. But I don't want to type in votes in a table, especially not when they change all the time. Instead I'd like to query the live data in the HTML webpages. Can that be done? Yes it can...

Thursday, September 24, 2015

Oracle Database Developer Choice Award Nominee = Me



Oracle is celebrating the Oracle Community by having us developers nominate and vote for
Oracle Database Developer Choice Awards to our fellow developers in five database development technologies:
SQL, PL/SQL, ORDS, APEX, Db-Design

The nomination period is over and it has been possible to vote since September 15th. Voting is open until October 15th and winners will be announced during Oracle OpenWorld 2015.

The nominees are all active in the Oracle Community helping others as they themselves have been helped when they started out in Oracle technology.

I am honored and humbled to be nominated in two categories:
- my absolute favorite technology: SQL
- as well as my second favorite: PL/SQL 

So if you think I am helpful to the Oracle Community, you can help me out by voting:

You can upvote me in the SQL category here.

You can upvote me in the PL/SQL category here.

But wait, why should you do that? Guess I'm not much of a politician, I haven't yet told you of how bad my competitors are and how brilliant I myself am ;-) Well, the first I won't ever do - my competitors are all deserving the honor too, many have helped me selflessly.

But how brilliant am I? Well, just middling, if I say so myself ;-) But I have an absolute passion for using SQL to the full utilizing the potential of the database to the max. I go against anyone who try to use the database as a simple black-box bit-bucket. So I will help anyone who wants to learn how to make their applications perform astoundingly fast by learning analytic functions, for example.

Similarly PL/SQL is awesome both to expand the database capabilities and to encapsulate business logic as APIs for UI code to call. That way of coding applications I have used with success since 2000 and I'm happy to teach others how this helps applications in the long term.

What have I done to help others share my knowledge?
  • I write weekly quizzes on the PL/SQL Challenge website.
    You can see the quizzes I have written here.
  • I do presentations at conferences.
    I have presented on analytic functions and external data at ODTUG Kscope and UKOUG.
    I will present at DOAG this year.
    I will be part of an expert PL/SQL panel at Oracle OpenWorld this year.
    You can see slides of my presentations here.
  • I write on this blog and from time to time answer questions on Oracle-L mailinglist and OTN forums.
But can you trust what I say? Well, I have a few testimonials ;-)
  • A user at the PL/SQL Challenge has been learning by taking quizzes from the library and has been kind enough to vote for me with this comment:
    "I voted for Kim because once I realized his login name kibeha was the same Kim Berg Hansen, then I knew to vote for him for coming up with some great quizzes on the PL/SQL Challenge website. The website has been great for me to expand my knowledge and to help prepare for my OCP Advanced PL/SQL Developer."
    I think it is awesome that my work can help prepare for an OCP certification :-)
  • An attendee at ODTUG Kscope 2012 met me in the corridors the day after my presentation on analytic functions and told me, that he used to find them difficult to understand but my examples helped a lot to make it clear to him how they worked.
    That made my day :-)
  • A reader of my blog read a post I wrote on RANGE versus ROWS BETWEEN in analytic functions and commented:
    Thanks! I've been reading the training kit for 70-461 but it didn't make this clear. You blog here lays it our perfectly.
    Again I am delighted I can help passing certification exams.
So I guess that's my sales pitch done for. Go and vote now! Go!
If you vote for me, I sincerely thank you for your help.
If you vote for others, that's also fine, just as long as you vote.

Remember it is OK to vote for more than one person in each category if you feel they deserve it :-)

Thursday, July 30, 2015

Row pattern matching nested within hierarchy

I've been playing around with MATCH_RECOGNIZE - the data pattern matching extension to SELECT that was introduced in version 12.

Most examples I've seen have used the default AFTER MATCH SKIP PAST LAST ROW as most often the logic dictates, that when we have found a match in a group of rows, we want to search for further matches after those rows to avoid unwanted "double" matches.

But can there be uses where we want overlapping or even nested matches? Well, I found at least one case where I think it makes perfect sense...

Friday, June 26, 2015

ODCI dynamic table function parser

Supposing you've got data as a text string with "row" and "column" delimiters and you would like to parse out those columns and rows. The external table syntax would actually be great for this, but that requires writing the text out to a file first, and then you can import it back again as columns and rows.

There are various other alternatives using SQL and/or XML manipulations, but one method that I don't see much used is to use the Data Cartridge functionality to in a sense expand the SQL language to do this. This solution is greatly inspired by an OTN forum post I stumbled upon, where Anton Scheffer demonstrates the use of ODCITable* functions.

Monday, June 22, 2015

Escope very early status

Just a brief summary of the status of Escope so far - I know it's very very early and too early to even tell whether it'll become real or not, but anyway ... ;-)


  1. For those who don't know yet, we're trying to see if it is possible to create a conference in Europe like the Kscope conference by ODTUG. See my early thoughts here:
    http://dspsd.blogspot.com/2015/06/feasibility-survey-of-possible-european.html
  2. We're gathering feedback from as many European developers as we can via a survey designed to find out if there is a basis for such an Escope conference:
    http://bit.ly/escopesurvey
    Please share that link with all your colleagues and network of Oracle developers throughout Europe - the more responses we can get, the more valid conclusions we can make.
  3. As of today (21. june 2015) we have 80 responses - definitely mostly positive, thank you for that :-) And getting valuable information on what the European Oracle developers are looking for. We have started getting in touch with a little of the Hyperion/Essbase/EPM/BI community in Europe as well and hope to get responses from them as well as the DbDev and APEX developers that so far seem to have been the majority of responses. Opinions af all developers are valuable to us.
  4. We have some thoughts on what might be the challenges we have to overcome to make this dream come true. See some discussion points I've made here:
    http://dspsd.blogspot.com/2015/06/how-to-make-dream-of-escope-come-true.html
    I invite you all to pitch in with your own opinions and ideas as comments to that blog post.
  5. If you are attending Kscope15 right now, we can discuss the idea of Escope face to face.
    I will be in the exhibition hall nearby the ODTUG social media booth (booth 613) during happy hours monday as well as tuesday:
    - Monday 22. june 17:00 to 17:30 (or 5 PM to 5:30 PM if you prefer ;-)
    - Tuesday 23. june 18:00 to 18:30 (or 6 PM to 6:30 PM)
  6. You can sign up for a newsletter to be kept up to date on the progress of Escope here:
    http://www.evrocs.nl/escope/
That's about it so far - we don't know yet if this will remain a dream or if it will take off and be a new shining star. You can help just by circulating the news and sharing the survey link as much as you can. Here it is again:


You'll be hearing more of Escope from me, don't worry :-)

Friday, June 19, 2015

How to make dream of Escope come true?

In my last post, I wrote about a dream of a European version of ODTUG Kscope conference - working title "Escope." ;-) We're trying to determine whether it would be feasible to create such a conference - if you haven't already, go and fill out the survey and help us find out if there's basis for the dream. And send the survey link to you colleagues and friends and network - the more of Europe we can cover, the more solid conclusions can be made from the survey.

But what else would it take to make this dream come true? Well, here are some thoughts and opinions and ramblings on the topic - all my own personal opinions, don't shoot anybody else but me for this ;-) And don't misunderstand me - I really really would love for Escope to happen, I'm just trying to figure out how it actually could become more realistically possible than just a dream :-)...


Thursday, June 11, 2015

Feasibility survey of a possible European Kscope-like conference

As most people likely to read this blog will know, I am a great fan of the ODTUG Kscope yearly conference for Oracle developers. In my opinion it is one of the absolute best places for awesome content, presenters, attendees and networking - all wrapped in one high quality package that's fun too.

Some Dutch developers (Erik van Roon, Gert Poel and more) and I had a little twitter discussion some time ago. Some european developers would love to attend Kscope due to the high quality, but they simply can't attend a US based conference, either due to lack of funding or company policy that prohibits travelling far away for conferences. A European version of Kscope we think would have potentially a large number of attendees who would love the ODTUG experience but can't go to Kscope.

We believe there is room for such a conference, even though Europe has great national OUG conferences like UKOUG, DOAG, OUGN, Harmony, BGOUG and more. These also have developer content, but they are not conferences dedicated solely to developers. We think a developer conference could supplement the existing european conferences, not replace them.

But so far that is just a feeling we have. We would like some more facts and figures on how many would be interested in an "ODTUG Escope" conference - somewhat like Kscope but in Europe.

So just in time before Kscope15 starts, here is a feasibility survey on what you would all think about an Escope conference: https://goo.gl/forms/ulJJY9cXP9

Please fill out the survey and give us your opinion about the idea of Escope. That way we can better know whether the idea is stillborn, or whether we have a good idea to present to ODTUG :-)

For further news on the progress of the Escope initiative, sign up for the newsletter at:
http://www.evrocs.nl/escope/