DB2 9.0 has a lot for the newcomer or seasoned hand alike.
DB2 9.0 has a lot for the newcomer or seasoned hand alike.
As the database market continues to grow and mature, it is sometimes hard for developers to get excited when a new version of a database server hits the shelves. The day after the upgrade, you are still writing the same SQL using the same tools you did before. And if you are a command-line junkie, chances are you won't notice a lot of difference anyway.
With the release of DB2 9 (formerly code-named "Viper"), IBM has finally given developers something to get excited about. In this release, IBM now provides native XML support, an updated set of developer tools and enough enhancements in administration, security and memory management to make even the most battle-worn DBA give it a second look.
In this review, we are going to look at some of the new features in DB2 9 from a developer's perspective, starting with the tools provided in this release.Updated Developer Tools
If you have used DB2 before, you will have either loved or hated the developer and administrative tools provided in previous versions. Devotees will be happy to know the tools are all still there and have been updated for this release. You can still use the Control Center to manage your database and the command line is still at your beck and call if you want to go geek.
However, if you weren't too impressed with the tools previously provided with DB2, you definitely need to have a look at the new DB2 Developer Workbench (DWB). The DWB is based on the Eclipse framework and provides an environment where you can create XML queries, SQL scripts, stored procedures, XML schema documents and user-defined queries.
With the new Developer Workbench, you can create queries with SQL and Xquery, as well as stored procedures, user-defined functions, etc.
Using the DWB, developers and administrators can create projects that can be used to create and work with most database objects within a familiar environment. When you first enter the DWB, you will be in the "Data" perspective, which you can use to create new projects to design databases, XML schemas, etc. and any projects you create will be shown in the Data Project Explorer.
From the Data Project Explorer window you can create a number of different database models, including the physical, logical, domain and glossary models for your database, as well as the DDL statements that will be used to create the physical database itself.
There is also a Database Explorer window, which can be used to connect to your database and browse the objects that is contains. You can filter the database contents from the explorer, as well as invoke a SQL editor directly from the explorer menu.
And because the DWB is built on Eclipse, there are a number of other fantastic developer features included, including the ability to track tasks, problems, errors, etc. directly from within the workbench, as well as a number of wizards for querying data with XQuery and SQL, creating new stored procedures, user-defined functions and more.
The workbench is also tightly integrated with CVS which makes working in a team environment easier, in addition to providing much-needed support for source control. Leveraging the Eclipse framework was a smart move for IBM and developers who are already familiar with the Eclipse environment should feel right at home.
For developers who need to integrate DB2 into their .NET applications, there is also an updated DB2 data provider included with this release, as well as add-ins for the Visual Studio.NET design environment.Server Enhancements
With this release, DB2 now includes two different processing engines, one for relational data and one for XML. IBM has labeled this technology "PureXML" and now stores XML directly in the database, enabling developers to use SQL or XQuery to access the data. This will have a real impact on XML-intensive applications and cut down on development time.
IBM has also introduced additional support for database partioning, with support for range or table partitioning, hashing and multi-dimensional clustering. For experienced database developers, these partioning options provide more flexibility in storing data across different servers, managing updates or backups by partition and more. In addition to partitioning improvements, DB2 9 is also optimised for data storage and claims the new technology can reduce required disk space by 45 to 69 percent. This should reduce the need for additional disk space and the compression algorithms used ensure that you won't lose any data in the process.
On the management site, DB2 9 also includes self-tuning memory settings that can determine the best configuration automatically based on server usage patterns. The memory tuner should eliminate some of the manual tweaks database administrators may have made in the past, in addition to increasing the performance of each server.
The DB2 Control Center has also been updated with the version 9 release.
There are also new features aimed at day-to-day administration, including restarting recovery operations, redirected restores and database rebuilds from table space backup images. Administrators will love the ability to change table attributes without actually having to drop and recreate the table and new templates make it easy to copy database and model schemas. This is especially handy when you need to take a production database schema and make multiple copies for testing, migration, etc.
From the security side of things, DB2 9 includes "Label-based Access Control" which allows administrators to create labels on rows of data which can be used to control security access. There are also a number of security enhancements designed to cut down on round-trips to the database to check security credentials.
One of the nice features of DB2 is that it supports a wide range of platforms, including Windows, Linux and AIX and supports both 32 and 64-bit implementations of their product. There are four versions of DB2 9 that are shipping, including Express, Workgroup and Enterprise and pricing varies. The fourth version of DB2 v9 is the "Express-C" edition, which is free and includes the ability to redistribute the database and server.
The Express-C edition is the logical choice if you are looking to develop your own applications on DB2 and eventually distribute them to other users or if you are looking to come up to speed with the new version before upgrading.Summary
On a whole, DB2 9 has really raised the bar for database development. The introduction of a pure XML solution and the Express-C edition will make DB2 competitive among developers creating and distributing XML-based applications. For existing DB2 customers, the enhancements to administration features and functionality could make it a compelling upgrade.
Besides, who can go past the slick new Developer Workbench? With the workbench, IBM should be able to claw back some ground from developers who in the past may have looked past DB2 for a platform that was easier to develop on.
When put up against recent database server releases from Oracle and Microsoft, DB2 is still a solid contender and can go head-to-head with both platforms. The XML features in DB2 9 could definitely swing more licenses IBM's way and with the world focused on XML and SOA-based applications, it may be a good bet.