Showing posts with label fun with databases. Show all posts
Showing posts with label fun with databases. Show all posts
Tuesday, November 27, 2012
Getting my grind on
I spent all today number crunching. I spent all of yesterday on the plane wrestling with my database, trying to get it to conform to my ambitions, and only admitting defeat when we started our descent to Changi. I often suffer from a dilemma: am I trying to do something in the hardest way possible, and should really be giving it a rest and doing something else, or am I suffering from a paucity of willpower and just need to force myself to stick to the task for a little longer?
Wednesday, March 30, 2011
Capital punishment in 2010
The Guardian published an infographic based on statistics Amnesty International compiled on the number of death sentences and executions, by country for the last four years. It's a very pretty picture, but I felt that there was something missing; you might suggest that China gets a bad rap, but because it's much bigger than any other country except India, of course it's going to have a higher execution rate.
It's said that a liberal is just a conservative who hasn't been mugged yet; I wonder if my opposition to the death penalty is because I haven't suffered from any crimes yet where I'd want the perpetrator to be killed. I've been fortunate; of all my friends and family, I only know of one person to be affected by violent crime. I'll return to that later, but first I wanted to use data to try to examine some of my prejudices about where and why capital punishment was popular. Well, frequent might be a better word.
It's said that a liberal is just a conservative who hasn't been mugged yet; I wonder if my opposition to the death penalty is because I haven't suffered from any crimes yet where I'd want the perpetrator to be killed. I've been fortunate; of all my friends and family, I only know of one person to be affected by violent crime. I'll return to that later, but first I wanted to use data to try to examine some of my prejudices about where and why capital punishment was popular. Well, frequent might be a better word.
Business Intelligence & Analytics
Today I attended the Business Intelligence & Analytics Forum in the Hong Kong Convention & Exhibition Centre. That's already quite a lot of ampersands. I'll try to use no more.
Monday, September 13, 2010
Learning to talk - artificial unintelligence
After a frustrating hour or two mucking around with my laptop today, I realised that I'd made a rudimentary error when I was coding things up, and created a stored procedure that would always do nothing. Sprinkling a few extra characters here and there and now it runs lickety-spit, or at least it now reliably spits out unreliable verbiage in response to an input. Now that it (sort of) works, I'm going to call it Robo Cod, and when I say "nice and caring person" to it, I expect Robo Cod to retort with "But just remember that I am not sure that I am not the only person who calls it that. It's a potato"
That's right, I've succeeded in building artificial unintelligence. I feel so proud of myself.
That's right, I've succeeded in building artificial unintelligence. I feel so proud of myself.
Saturday, November 04, 2006
An honest comparison of databases
Most people who compare databases have an axe to grind, and a fairly jaundiced view of the opposition (insert MS/IBM links here). If they’re not employed by the company that makes the thing, then usually there’s a terrible prejudice engendered by only ever using the one database, and therefore believing the other one to be rubbish just because it’s different. (This was neatly summarised on Usenet a long time ago, although there’s an obvious counterpoint to the idea that you’ll prefer that which you’re most familiar with*). Now, nobody can honestly claim to be independent, but I do have at least a few reasons to justify having opinions that aren’t solely the product of hard cash or only ever using one system.
In my life, there’s been heartache and pain. As well as that, I’ve used Access 97, 2000 (settle down, I know they’re not ‘really’ databases), SQL Server 7, 2000, 2005, Informix 8, postgresql, mySQL and DB2 UDB 8 and 9. About the only thing I haven’t touched is Oracle, and that’s mainly because it seemed too common; one of the great things about programming for Informix is you always seem to be able to say “If we had Oracle, this would work much better” and get away with it, rather than actually bothering to optimise your application.
So why DB2? Well, when I finished smoking crack**, it seemed like the thing to do. Plus I’d never used it, it turned out to be marginally cheaper than SQL Server, and at the time my curmudgeonly IT team kept telling me that you couldn’t run PHP with SQL Server, because it wasn’t Open Source.***
I used it for three years, I didn’t ever get to play in a WW2 tank like IBM promised me, and in total I got a cup of black coffee and two ballpoint pens as bribes. These were all long after the procurement procedure, so I don’t think they blighted my perspective.
A few things that are different between Microsoft and IBM
Tablespaces – designed to upset people by being one extra thing to think about, and most people don’t like thinking. Microsoft do the decent thing and hide it away somewhere, so it never bothers you. But don’t forget Douglas Adams’ maxim: The only difference between something that can go wrong, and something that can’t go wrong, is that when the latter does go wrong, it’s harder to fix.
Schemas Likewise. If you never had them, it’s a frightful pain to encounter them. But if you have had them, and then you find you don’t get the ability to divide up your database by purpose of tables, views, etc, without ReallyLongNamingConventions, you tend to miss them.
CaSE sEnsItIvIty DB2 is case sensitive on table names, in certain scenarios. This is rather annoying. mySQL seems to always be case sensitive, and SQL Server doesn’t care. But on the other hand, DB2 is always case sensitive when it comes to the contents of a column, and the other two don’t seem to be. And to be honest, that’s more annoying: MR JOHN SMITH is not how Mr John Smith wants to be addressed, thank you very much. Opinion and coding practice will imply for you whether you’ll be more annoyed by DB2 or SQL Server.
DTS workflow I like tools where you can easily drag and drop tasks and build relationships between them. I like SQL Server for this. I heavily resent DB2 for making me handcode a lot more of this.
Chaining tasks in DB2 But I also like the way that DB2 is good at having tasks trigger other tasks, in more complicated ways than the success/failure/anyway that SQL Server implements within DTS.
More as it comes to me, or if anybody makes a helpful suggestion. A lot of these differences boil down to nothing works out of the box vs nothing ever gets better than it was out of the box, but your mileage may vary.
* which might be called The DBA’s Lament: “I may be more experienced with ugly women, but I still prefer beautiful ones”
** as in “hmm. That’s an interesting application. Say next week, me and the CEO are smoking crack, and we decide it has to run on DB2. Can you handle that?” – this always provokes interesting behaviour from salespeople. Try it some time.
*** Yes, I know. It just seemed a bit odd to be talking to ‘the database expert’ and have to teach them how to suck ODBC eggs, and I figured it was really political grief (it’s not politic to actually ask people to do any work) that was getting in the way of some Microsoft product.
In my life, there’s been heartache and pain. As well as that, I’ve used Access 97, 2000 (settle down, I know they’re not ‘really’ databases), SQL Server 7, 2000, 2005, Informix 8, postgresql, mySQL and DB2 UDB 8 and 9. About the only thing I haven’t touched is Oracle, and that’s mainly because it seemed too common; one of the great things about programming for Informix is you always seem to be able to say “If we had Oracle, this would work much better” and get away with it, rather than actually bothering to optimise your application.
So why DB2? Well, when I finished smoking crack**, it seemed like the thing to do. Plus I’d never used it, it turned out to be marginally cheaper than SQL Server, and at the time my curmudgeonly IT team kept telling me that you couldn’t run PHP with SQL Server, because it wasn’t Open Source.***
I used it for three years, I didn’t ever get to play in a WW2 tank like IBM promised me, and in total I got a cup of black coffee and two ballpoint pens as bribes. These were all long after the procurement procedure, so I don’t think they blighted my perspective.
A few things that are different between Microsoft and IBM
Tablespaces – designed to upset people by being one extra thing to think about, and most people don’t like thinking. Microsoft do the decent thing and hide it away somewhere, so it never bothers you. But don’t forget Douglas Adams’ maxim: The only difference between something that can go wrong, and something that can’t go wrong, is that when the latter does go wrong, it’s harder to fix.
Schemas Likewise. If you never had them, it’s a frightful pain to encounter them. But if you have had them, and then you find you don’t get the ability to divide up your database by purpose of tables, views, etc, without ReallyLongNamingConventions, you tend to miss them.
CaSE sEnsItIvIty DB2 is case sensitive on table names, in certain scenarios. This is rather annoying. mySQL seems to always be case sensitive, and SQL Server doesn’t care. But on the other hand, DB2 is always case sensitive when it comes to the contents of a column, and the other two don’t seem to be. And to be honest, that’s more annoying: MR JOHN SMITH is not how Mr John Smith wants to be addressed, thank you very much. Opinion and coding practice will imply for you whether you’ll be more annoyed by DB2 or SQL Server.
DTS workflow I like tools where you can easily drag and drop tasks and build relationships between them. I like SQL Server for this. I heavily resent DB2 for making me handcode a lot more of this.
Chaining tasks in DB2 But I also like the way that DB2 is good at having tasks trigger other tasks, in more complicated ways than the success/failure/anyway that SQL Server implements within DTS.
More as it comes to me, or if anybody makes a helpful suggestion. A lot of these differences boil down to nothing works out of the box vs nothing ever gets better than it was out of the box, but your mileage may vary.
* which might be called The DBA’s Lament: “I may be more experienced with ugly women, but I still prefer beautiful ones”
** as in “hmm. That’s an interesting application. Say next week, me and the CEO are smoking crack, and we decide it has to run on DB2. Can you handle that?” – this always provokes interesting behaviour from salespeople. Try it some time.
*** Yes, I know. It just seemed a bit odd to be talking to ‘the database expert’ and have to teach them how to suck ODBC eggs, and I figured it was really political grief (it’s not politic to actually ask people to do any work) that was getting in the way of some Microsoft product.