RPG Academy – Modernization: Is Restructuring the Database the Way to Go?

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

The IBM i has one of the best databases in the world. We’re just using it wrong.

Now that I have your attention (and possibly also a few angry comments), let me explain what I mean. It’s a fact that DB2 for i is one of the best databases in the world. This is not something that we just discovered; it’s something that most of us have known for years. However, the functionality provided by that database has evolved over the years, and most (I’d dare say, almost all) applications weren’t updated to make use of those changes. This wouldn’t be a problem if the data volume processed by the applications hadn’t changed. However, the ever-changing nature of business needs (and a little thing called the Internet) made sure that different data and, more importantly, more and more data storing and processing capacity is required to keep up with the competition. What happened in most shops? The systems’ hardware was upgraded, and more workers were hired…to keep doing things the same way!

Since it wasn’t “broken,” nobody “fixed” it. Nobody stopped to think that a proper redesign of the database or even a much simpler use of embedded SQL to replace low-performing sequential reads in data-hungry programs would be a good idea. It’s interesting to see that the myth of embedded SQL’s poor performance is still current in many shops. It’s part of an almost irrational fear of change that runs deeply in the IBM i technical community, which helps to keep that “old and outdated” image that our beloved system unfairly has. Well, it’s time to start changing that!

DB2 Evolved—And So Should We

The DB2 evolution encompasses performance improvements, new data types, new and extremely useful APIs, and a lot more. The problem is the usual “if it’s not broken, don’t fix it” dogma that we’re forced to live by. A database modernization sits somewhere between code modernization and UI redesign, when it comes to getting management support. You can sell it by saying that less-cryptic field and table names (not shackled to the 10-letter limit of DDS) will help users create their own queries more quickly and with less IT support. In turn, this can potentially increase user productivity and free IT resources for other tasks, perceived as more profitable (by the managers) and interesting (by the IT people).

It’s also interesting to note that sometimes the “old and outdated” label comes from the performance aspect of an application. You can have a great green-screen front-end, tailored to the business needs, as good as DDS allows, and still get that bad vibe from users. Why? Well, for instance, if a program is using sequential reads or chains over five different files instead of a SQL SELECT statement over a customized view built on those files, you’re not making use of what one of the best databases in the world has to offer!

But There’s More Than the Database

At this point, let’s sum up the possible modernization approaches you can take:

  • Code modernization—This can be achieved by taking advantage of the knowledge about ILE the “RPG Academy” article series provided and by writing structured, modular, and easier-to-maintain code. The TechTips of this modernization series thus far should have given you a solid foundation for redesigning your application structure. The next subseries, which discusses the MVC paradigm, should also help with this modernization area.
  • User interface modernization—Listening to your users, redesigning your ages-old green-screens to something friendlier, and, if you’re up to it, migrating to a graphical UI are the steps to take in this area. I’ll provide some pointers on choosing the right tool for the job at hand later in this series.
  • Database modernization—Modernizing the database can be a complex process, but there are tools to help you. I’ll provide some guidelines and examples on how you can proceed in a few articles, but my latest book, SQL for IBM i: A Database Modernization Guide, goes into greater depth and takes you on a guided tour of what an application modernization process (usually) entails.

This essentially sums up how to modernize your application, but before going into details, it’s important to stop and ask yourself the million-dollar (or sometimes, even more than a million) question: Is my application worth modernizing?

I’ll discuss that topic and provide you with a few pointers (with the generous help of recognized experts in this area) in the next TechTip of this subseries.

Rafael Victoria-Pereira

Rafael Victória-Pereira has more than 20 years of IBM i experience as a programmer, analyst, and manager. Over that period, he has been an active voice in the IBM i community, encouraging and helping programmers transition to ILE and free-format RPG. Rafael has written more than 100 technical articles about topics ranging from interfaces (the topic for his first book, Flexible Input, Dazzling Output with IBM i) to modern RPG and SQL in his popular RPG Academy and SQL 101 series on mcpressonline.com and in his books Evolve Your RPG Coding and SQL for IBM i: A Database Modernization Guide. Rafael writes in an easy-to-read, practical style that is highly popular with his audience of IBM technology professionals.

Rafael is the Deputy IT Director - Infrastructures and Services at the Luis Simões Group in Portugal. His areas of expertise include programming in the IBM i native languages (RPG, CL, and DB2 SQL) and in "modern" programming languages, such as Java, C#, and Python, as well as project management and consultancy.


MC Press books written by Rafael Victória-Pereira available now on the MC Press Bookstore.

Evolve Your RPG Coding: Move from OPM to ILE...and Beyond Evolve Your RPG Coding: Move from OPM to ILE...and Beyond
Transition to modern RPG programming with this step-by-step guide through ILE and free-format RPG, SQL, and modernization techniques.
List Price $79.95

Now On Sale

Flexible Input, Dazzling Output with IBM i Flexible Input, Dazzling Output with IBM i
Uncover easier, more flexible ways to get data into your system, plus some methods for exporting and presenting the vital business data it contains.
List Price $79.95

Now On Sale

SQL for IBM i: A Database Modernization Guide SQL for IBM i: A Database Modernization Guide
Learn how to use SQL’s capabilities to modernize and enhance your IBM i database.
List Price $79.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: