DB2 on the Mac arrives
Antonio Cangiano just posted that DB2 Express-C for 64-bit Intel Mac OS X 10.5 (Leopard) is now available for download from IBM.
Stay tuned to his site for more details.
Listing DB2 triggers, routines, indexes and keys
I recently compared two DB2 databases that should have been identical, but for some reason were not. The foreign keys were missing from one of the instances.
I suspect the keys were lost during a migration when the administrator commented out the constraints in the DDL as a means to avoid errors on import. Unfortunately, the admin never ran the ALTER statements to add them even after all tables were present.
To be sure nothing else was different, I checked for the existence of other database objects to make sure they were not lost as well. DB2 offers a simple way to query for these objects via the SYSIBM and SYSCAT schemas:
Viewing triggers
FROM SYSIBM.SYSTRIGGERS
WHERE SCHEMA = ‘[SCHEMA]‘
ORDER BY NAME
Viewing stored procedures and UDFs: P = Procedure, F = Function
FROM SYSIBM.SYSROUTINES
WHERE ROUTINESCHEMA = ‘[SCHEMA]‘
ORDER BY ROUTINENAME
Viewing indexes
FROM SYSIBM.SYSINDEXES
WHERE CREATOR = ‘[SCHEMA]‘
ORDER BY NAME
Viewing foreign keys (by database)
SUBSTR(TABNAME, 1, 30) TABLE_NAME,
SUBSTR(CONSTNAME, 1, 20) FK_NAME,
SUBSTR(REFTABNAME, 1, 12) PARENT_TABLE,
SUBSTR(REFKEYNAME, 1, 20) PK_ORIG_TABLE,
FK_COLNAMES
FROM SYSCAT.REFERENCES
ORDER BY TABLE_NAME
Viewing foreign keys (by table)
SUBSTR(TABNAME, 1, 30) TABLE_NAME,
SUBSTR(CONSTNAME, 1, 20) FK_NAME,
SUBSTR(REFTABNAME, 1, 12) PARENT_TABLE,
SUBSTR(REFKEYNAME, 1, 20) PK_ORIG_TABLE,
FK_COLNAMES
FROM SYSCAT.REFERENCES
WHERE TABNAME = ‘[TABLE]‘
To make sure I don’t have consistency problems in the future, my next step is to put together a short script to automate these queries post install.
IDUG India highlights
I just returned from two weeks in Bengaluru (Bangalore). The trip was quite productive, as I was able to work with my team on a complex Eclipse RCP/Apache Derby application in person, and solidify the two most important pillars of an extended team development effort; communication and collaboration.
Since I worked US Eastern time while in India – late afternoon to late evening weekdays – I also had a chance to attend the IDUG 2008 India Forum in the early part of the day Friday and all day Saturday.
Much like the on site face time with my development team, this conference provided an excellent opportunity to interact with DB2 experts and to put all the new Information Management technologies and products into a meaningful context.
Of particular relevance to my day job, the forum clarified where DB2 fits into the larger WebSphere, Web 2.0, and SOA picture. I was able to pick up some clever ideas for the IBM Press Room migration to DB2 9.5 next spring.
A few highlights and lessons learned from the conference:
- Attending Curt Cotner’s keynote on the new IBM Data Studio tool and pureQuery technology. This Eclipse-based tool has a lot of potential as a standalone application development platform, or plug-in to my existing Rational Software Architect setup. Using pureQuery to improve performance and ease root cause analysis for WebSphere and DB2 apps was impressive. I also had a chance to meet Curt and chat with him briefly about PHP Web application frameworks and drivers.
- Hearing from Leon Katsnelson about how DB2 fits into the larger SOA picture, with two very innovative case studies. One example in particular about managing volatile data in DB2 – such as currency rates and weather conditions – using a Java stored procedure to make a Web services call was very enlightening.
- Finally getting my head around REST. The past weeks have featured a storm of misunderstanding about SOAP and RESTful Web services, sparked by a comment made by Damien Katz. Following the conversations there helped me understand the pros and cons of each philosophy, and attending a few sessions at the conference helped solidify the fundamental differences in approach to SOA.
- Reminding myself to look into the Web 2.0 Starter Toolkit for IBM DB2. There seems to be some really cool sample applications and monitoring tools in there.
- Getting a primer on Ruby as a language and seeing a live demo of Ruby on Rails as a framework. I’m not planning to jump ship anytime soon, but there are tons of ideas in there that can be fed back into the architectures I develop in my day job.
- Thanks to Matthias Nicola, who was kind enough to copy his XQuery & SQL/XML cheatsheet onto a pen drive for me, I was able to play around with pureXML on my local copy of DB2.
- Finally figuring out the difference between Data Studio and Data Studio Developer. The former is the free tool, the latter is the kit that can be licensed from IBM for a fee and includes all the cool pureQuery stuff.
- Taking advantage of the opportunity for a free shot at the DB2 9 Application Developer exam (I passed!) and shoring up my cursor usage and trace analysis skills through some pre-test cramming.
So, all in all a great business trip and excellent conference. Kudos to the conference organizers, IDUG, and the presenters.
Up and Running with DB2 on Linux
The second edition of “Up and Running with DB2 on Linux” was published in June. This IBM Redbook gives readers the latest information they need to exploit DB2 9.5 for Linux.
I performed a technical review of this book, recommending updates here and there to the introductory section and the chapter on using the new Eclipse-based IBM Data Studio tool. I also provided the short section on using DB2 with PHP in chapter 8.
The editor took my suggestion to include a link to planetdb2.com in the online resources list, to give readers a way to keep on top of day-to-day news about DB2 from the experts who blog about it.
The entire review process was a great way to learn about the latest developments in the DB2 for Linux world. I hope the book provides you with the same insight.
Have a look and submit your feedback to help improve the next edition.
Charlotte, North Carolina
I spent ten days on business in Charlotte, North Carolina in the middle of February. The city and its metropolitan area were much larger than I had expected.
The airport’s big, the IBM complex is massive (it used to be the home of 6,000 manufacturing jobs), and the city really does have a relative importance I hadn’t realized (forgive my Northeastern, non-finance sector prejudices). On top of that it’s growing fast.
I found out later that had I stuck around a few more days I could have stopped by the SIRDUG meeting and had a chance to hear from DB2 gurus Robert Catterall and Roger Sanders at the same facility. Damn.
I didn’t have much time to see the sights, but I did grab some not-so spectacular pictures of downtown.
One of the highlights was a Saturday afternoon trip to the outskirts for some of the best barbecue I’ve ever had, at a biker bar called Mac’s.
Perhaps the most incredible part of the trip was that not one, but two places sold Genny Cream Ale by the bottle. The importance of this can not be overstated, though I don’t have time to go into the details just yet…
Interesting links of the week
Well, not exactly this week. I gathered a few links from the end of January that I figured would have some blogworthiness to them.
Instead of dedicating a whole post to each, here they are with a bit of commentary.
First up, because it’s my sister’s first appearance on TV, are Mona‘s remarks to local news in St. Louis on what the female demographic means to this year’s presidential campaigns. While it is a Fox affiliate, congrats are still in order. :)
Yossi Leon announced that Zend Studio for Eclipse was tantalizing close to release. We heard a few more details at NYPHP about its launch. The Zend page carries the official announcement.
If you’re wondering exactly how the new Zend Studio for Eclipse differs from the Eclipse PDT (PHP Development Tools), this chart breaks it all down.
Jon Udell backs up my “.htm is dogsqueeze” argument in his much more eloquent .NET-specific rant, .aspx considered harmful.
I caught a glance of this article on naming the Triborough Bridge for Robert F. Kennedy in the New York Times.
I too am a little weary of the Kennedy badge on so many public buildings, but have an alternate suggestion… Rename the bridge for John F. Kennedy, and rechristen his namesake disaster of an airport for someone worthy of its reputation for mismanagement, George W. Bush.
And finally, though it pains me greatly to see Tom Brady’s name on a Web site I lovingly crafted for all that is good, there is an interesting press release on how IBM and the NFL have gone about making all those random stats available to announcers in real time.
That about wraps it up. Enjoy the weekend, I know I will.
Mashups from IBM at NYPHP in January
On Tuesday, January 22nd, Dan Gisolfi will talk about the latest PHP-based technologies from IBM for developing Web 2.0 mashups at New York PHP.
Centered around the concept of “situational applications,” IBM’s work with mashups targets a growing trend in Web site development.
Applications are increasingly built by end users to meet their particular needs at a particular time without the time and expense of a traditional software development process.
A recent paper in the IBM Systems Journal describes the new approach in great detail.
Situational applications are created rapidly by teams or individuals who best understand the business need, but without the overhead and formality of traditional information technology (IT) methods.
Understandably, traditional PHP developers might be wary of this new technology; as a general contractor would be if a Home Depot opened around the corner.
Instead, IT specialists should embrace the model as a foothold for PHP in the enterprise. To that end, Dan Gisolfi will:
- Demo IBM’s Mashup Starter Kit (which includes IBM Mashup Hub and QEDWiki).
- Highlight best practices for designing and assembling data-driven mashups.
- Discuss IBM’s collaboration with Zend and ProgrammableWeb to bring mashups to the enterprise.
As always, New York PHP meetings are free and open to the public, but you must RSVP by 3pm on Monday, January 21st.