The Father of Genomics Is Dead

Fred Sanger, genetic pioneer and inspiration to many has passed away.

A sad day. Still, a damn fine innings sir.

No doubt the Sanger Institute will be planning something special to celebrate his life and his discoveries.

Read more here and here.

Posted in DNA | 1 Comment

Free Book Time Yet Again

..and from Red-gate again. And no – I don’t work there although when I went to their offices it did look like rather a wonderful place to work. Anyhow, this book is very useful.

red1

Posted in SQL Server | Leave a comment

Publishing Personal Genomes

Hi,

I heard about this on the radio a week or so ago and ever since have been wondering if I should sign up. Take a look here or click on the logo below.  

personal genome

So the idea here is that you volunteer lots of information about yourself including medical details and that includes, it would seem, your personal genome. This  then creates a vast amount of data (‘big data’) that can be mined and manipulated to help solve some of the big medical questions that are being asked.

A noble cause but it would mean that a lot of information about yourself could be available to a large number of people. It’s not intended to be used to identify individuals but due to the amount of information gathered it is likely to be an easy task for anybody who is that way inclined.

I’m in a quandary…

Posted in DNA | Leave a comment

Time for Another Freebie from Redgate

Hi,

Just a quickie and I might be teaching various Grandmothers to suck eggs by posting this one but it won’t take long to read and has links to some more in depth books at the end so check it out.

45-tips-cover

Posted in SQL Server | Leave a comment

Not Only SQL

Not every DBA works with NoSQL. However, every DBA (and DBA manager for that matter) should know what it is, or rather what they, are.

Rather than try to explain NoSQL myself I’ll recommend the following. The first is a very entertaining blog by the wonderful Cary Millsap and the second is a presentation by Martin Fowler. I’d not heard of this guy before but he’s very good.

Posted in Oracle, PostgreSQL, SQL Server | Leave a comment

Biomedical Pictures

If you’ve arrived on my feeble blog via a biological search you might also be interested in this site – The Biomedical Picture Of The Day.  It’s a lovely (and educational) way to spend a few minutes.

My wife sometimes posts to the site so I thought that I would mention it to the many millions of visitors to my site :-P

Posted in DNA | Leave a comment

The Human Brain Project ..and other memory matters.

First off, apologies for neglecting this site even more than usual. I blame life. Well, that plus DIY. And a polecat. But I won’t go into details – this isn’t facebook after all.

Anyhow, the human brain project. I first heard about this a couple of years ago. At that stage it was just an idea, one of several which were set to be comparable to The Human Genome Project and were looking for some serious funding.

Like the Human Genome Project it has the potential to dramatically change our lives. Finally having a serious insight into how the human brain works and how to simulate it will be remarkable. Find out more here or here

A lot has happened recently. Open World has ended (unfortunately I wasn’t able to go this year) and there were two notable events that happened to my mind, both of which are attributable to Mr Ellison. First there was the announcement of the 12c in-memory caching (not free of course but I doubt if that will be a surprise to many existing Oracle clients) and then there was the ‘no show’ by Larry when he was due to do a key note speech.

The memory caching looks interesting – it’s basically an in-memory column store of the data that you’re accessing. There must be an overhead of maintaining this but this overhead is offset by a massive improvement in many types of queries. I plan to test this out when I can – it will be interesting to see it working alongside the other Oracle caches. Still, Oracle corp. is a cache rich company :-P.

I don’t know why the ‘Larry no-show‘ upset so many people. If I’d spent as much money on a boat as Larry had I’m not sure I could resist sneaking out of an IT conference to watch it win a world championship.

well done team Larry

Posted in DNA, Oracle | Leave a comment

Avoiding Analytic Functions

I’m a big fan of analytic functions in Oracle and I use them now and then ..but probably not enough. I know that a lot of experienced programmers use them less than me, using the excuse that all this malarkey with windows and partitions is too difficult to remember.

Well, let’s start small. Very small.

These days you might find yourself using sqlplus less and less frequently. SQL Developer and TOAD (other SQL GUIs are also available) are pretty good interactively and for some tasks are often a more attractive option than sqlplus. So this means that you’ve lost the nice formatting options in sqlplus as well as the ability to manipulate numbers e.g. averages and totals within sqlplus itself. For example:

set lines 120
break on report
compute sum of meg on report

SELECT tablespace_name, 
       SUM(bytes/1024/1024) AS meg
FROM  dba_data_files
GROUP BY tablespace_name
ORDER BY tablespace_name;
TABLESPACE_NAME                       MEG
------------------------------ ----------
APEX_1930613455248703                   7
EXAMPLE                                82
SYSAUX                               1125
SYSTEM                                861
UNDOTBS1                              208
USERS                                 225
                               ----------
sum                                  2508

So, what to do? How do we get the sum without sqlplus? I guess you could do 2 selects. Better still, lets use an analytic function. Don’t panic – it will look very similar to the code above and is just as easy to use:

SELECT NVL(tablespace_name,'** TOTAL **'),
SUM(bytes/1024/1024) AS meg
FROM dba_data_files
GROUP BY ROLLUP(tablespace_name)
ORDER BY INSTR(tablespace_name,'*'), tablespace_name;
NVL(TABLESPACE_NAME,'**TOTAL**        MEG
------------------------------ ----------
APEX_1930613455248703                   7
EXAMPLE                                82
SYSAUX                               1125
SYSTEM                                861
UNDOTBS1                              208
USERS                                 225
** TOTAL **                          2508

Not much difference – ‘GROUP BY ROLLUP(tablespace_name)‘ rather than ‘GROUP BY tablespace_name‘. The amount of work to derive the total is pretty small – and is a lot less than having 2 separate selects.

Here are the 2 plans. The first is for the SQL without the total and the second is the SQL with the total:

plan1

plan2

Once you’re happy with this, try listing space used by each segment type for each user in a database by using ‘ROLLUP’ again. Something along these lines:

SELECT OWNER,
       SEGMENT_TYPE,
       SUM(bytes/1024/1024) AS meg
FROM   dba_segments
GROUP BY ROLLUP(owner, segment_type);

To be honest I’ve not run this one yet but it looks about right! If it works, try replacing ‘ROLLUP’ with ‘CUBE’ and see what you get.

Quote | Posted on by | Leave a comment

A Terminal Experience

Anybody you meet who works on Linux will probably have a favourite terminal emulator. I  quite like PuTTY, rxvt and Terminal (if working on a Mac) but there are quite a few out there, many of which are free. However, I’ve got a new favourite now – MobaXTerm.

It too is free (you must know by now how much I like ‘free’!), can run XTerm out of the box and includes an SFTP client. It also includes some other utilities like ‘grep’, ‘vim’ and ‘perl’ which means that I don’t need to install cygwin or similar in order to get access to powerful linux commands on windows. I love it – hope you do too.

You can buy a ‘professional edition’ and you might want to do this if you’re using this in a corporate environment but the freebie version is more than enough for my humble needs.

Oh, by the way, it also includes a version of space invaders. I’m not quite sure why but I’m not complaining!

Moba

Posted in Uncategorized | Leave a comment

So Many Languages, So Little Time

In the past I’ve programmed in Basic, Pascal, Assembly Language, Fortran, Cobol, C, Java, Flash (does that count?), Shell Scripts, Quel, ABF, HTML, SQL, Perl, PSQL, PL/SQL and probably a few more if I really think about it and it seems that I’m not particularly unusual. A few of us at work decided to see how many ways we could program the FizzBuzz game. I submitted a couple of entries – one in PL/SQL and another in LOLCode:

SET SERVEROUTPUT ON FORMAT WRAPPED
DECLARE
i PLS_INTEGER:=0;
str VARCHAR2(8);
BEGIN
WHILE (i <= 100) LOOP
DBMS_OUTPUT.new_line;
str := CHR(10);
i := i+1;
IF (MOD(i,3) = 0) THEN
str:=’Fizz';
END IF;
IF (MOD(i,5) = 0) THEN
str:= str || ‘Buzz';
END IF;
DBMS_OUTPUT.put_line(str);
END LOOP;
END;
/

HAI
BTW Go Here for more on LOLCode – http://progopedia.com/language/lolcode/
CAN HAS STDIO?
O NOES
INVISIBLE “Error!”

I HAS A LIMIT ITZ 100
I HAS A LOOPYCOUNT ITZ 0
I HAS A NUFFIN ITZ 0
I HAS A STRING
BTW LOLCats love string

IM IN YR LOOP UPPIN YR LOOPYCOUNT TIL BOTH SAEM LOOPYCOUNT AN LIMIT
I HAS A NUM ITZ MOD OF LOOPYCOUNT AN 3
SAEM NUM AN NUFFIN, O RLY?
YA RLY,
I HAS A NUVVERNUM ITZ MOD OF LOOPYCOUNT AN 5
SAEM NUVVERNUM AN NUFFIN, O RLY?
YA RLY, STRING R ‘FizzBuzz’
NO WAI, STRING R ‘Fizz’
OIC
NO WAI,
I HAS A NUVVERNUVVERNUM ITZ MOD OF LOOPYCOUNT AN 5
SAEM NUVVERNUVVERNUM AN NUFFIN, O RLY?
YA RLY, STRING R ‘Buzz’
NO WAI, STRING R ‘ ‘
OIC
OIC
VISIBLE STRING
IM OUTTA YR LOOP
KTHXBYE

(actually, and somewhat surprisingly, I think my LOLCode is better than my PL/SQL as I should really have used a FOR LOOP instead of a WHILE loop).

Anyhow, other people submitted their examples in their favourite language and we had quite a list before someone pointed out that this had already done and to a ridiculous extent. Take a wander here and be truly amazed. My favourite is probably whitespace but there are some others that will probably make you smile too.

Posted in Uncategorized | Leave a comment