Wednesday, December 03, 2008

UKOUG2008 - Tuesday

The water tastes funny. This is not just a Londoner whinging about leaving his comfort zone, other people have commented on it too. And it's not just the water in the ICC it's the water in the hotel too. Perhaps it's time to resort to the medieval practice of drinking beer all the time.

Or then again perhaps not. People stopping by the Rittman-Mead Consulting booth can sample their branded beer (lager). Indeed beer will be pressed upon them. It's not bad but I totally blame Mark's beer for what happened next. I was chairing Steven Feuerstein's session on Weird PL/SQL. We were chattting about this and that when I glanced at my watch and noticed that the session should have started three minutes earlier. Tut tut. Steven's session was further interrupted by a screen blackout but he's a trouper and coped admirably. His presentation focused on some the quirks in PL/SQL. For instance are exceptions negative or positive? The answer is, it depends. Most are negative, execpt USER_DEFINED_ERROR and NO_DATA_FOUND. And then some of the built-in PL/SQL utilities store them as positive numbers. He also showed us some features in PL/SQL which had been implemented but not quite finished.

More fun was poked into Oracle in the next session I attended, a double bill from Hugh Darwen and Toon Koppelaars on DB Constraints, A Woeful State Of Affairs. Hugh led the attack. He had set his undergraduate students an exercise in modelling a simple banking application in two different ways. The first approach was to use Tutorial D implemented in Rel, which is a fully compliant relational language, and the second approach was to use Oracle SQL 10g, which is not. There were three things which Oracle could not implement. The first was enforcing the rule that a Customer must have an Account. The second to ensure that a Customer could have several different phone numbers but only one of a given type (Home, Work, Mobile). I'm not sure about this one, as I think it could have been modelled differently and in a way which Oracle could support, but I'm not going to cross swords with a modeller of Hugh's experience. The third hitch concerned outgoing transactions: payments with a cheque or credit card use the account number but paymenst with a debit card use the card number instead. The first two problems were due to DBMS vendors not implementing features in the SQL standard (such as CREATE ASSERTION) but this third was due to a peculiarity in Oracle's implentation, which don't allow compound unique indexes to have multiple null values in one of the columns.

Toon was responsible for defending the position of the vendors with regards to assertions. He did this by walking us through the complexities involved in enforcing the rule "If a Dept employs a Mgr or a President it must also employ an Admin". The basic principles are quite straightforward, the difficulty lies in tuning the rule so that it doesn't completely kill your application. For instance, you don't need to run the rule if you're inserting an employee who's not a manager or if you're deleting an employee who's not an administrator. I guess the place where Toon was heading is the difficulty of enforcing such rules in a multi-user environment. Unfortunately, the session overran with the start of the focus pubs, which as a SIG chair I had to attend. So I'll have to wait until I download his presentations to discover the denouement.

The stated aim of the focus pubs is networking: to allow delegates to meet the people people who run the SIGs and for us to badger them into doing presentations. Unfortunately the ambience is more like a nightclub than a pub: dim lighting so you can't see anybody, loud music so you can't hear anybody. Thus you end up mainly talking to people you already know. But that's good too.

Labels: ,


Blogger Hugh said...

Hi Andrew,

Thanks for your comments on the "woeful state of affairs".

I'm not sure I'm a "data modeller" of great experience. Designing languages and DBMSs isn't the same as designing databases! Anyway, I'm intrigued that you think the phone number problem can be done in Oracle--presumably without violating 5NF (i.e., not via the hack I presented). I do not count having separate (nullable) columns for home, work, cell, because that design doesn't allow for new phone types (such as voip) to be easily accommodated.

Hugh Darwen

4 December 2008 at 08:58:00 GMT-8  

Post a Comment

<< Home