Inuendo: An Associative Database Model for IBM i
February 18, 2014 Alex Woodie
It’s often said the strength of the IBM i server is its integrated database. However, while IBM‘s relational database is very much a rock-solid engine, the data models that people deploy on top of DB2 for i are often overly complex, brittle, and inefficient. One person who’s doing something about the legacy data models is Christopher Burns and his open source Inuendo project that distributes a sleek, SQL-based associative data model for the platform.
Inuendo represents a radical rethinking of what a database on IBM i is–what it looks like, how it works, what it stores, and how developers access it. Instead of storing data in a traditional relational scheme and then building virtual access paths to them with indexes, Inuendo’s associative model dramatically simplifies the approach with a much leaner model that’s grounded in the power of SQL.
In Inuendo, data is assigned to business objects called entities, and these entities are described using just eight tables. “One of those tables describes the classes and their properties, and another I call the entity header [contains] a row for every business object or entity in the entire database,” Burns says. “That header contains the basic metadata that every business has, the unique identifier or descriptions. The remaining six tables are used to hold the values assigned to the properties of each entity.” There are six today, but that doesn’t mean there couldn’t be more.
These six tables hold every value of every property that every entity ever had, Burns says. “So all that’s in these tables is the unique identifier of the entity, the name of the property, and the value,” he says. A series of stamps–timestamps, user stamps, program stamps–are used to track each transaction in perpetuity.
Instead of coding an application to have record-level I/O access to the database using F specs in RPG, with Inuendo, programmers read and write data through a set of APIs. They also have access to “link” data types that allow developers to link entities together. “These are the only legitimate ways to extract the data out of this virtualized structure,” Burns says.
The data schema is much more flexible in this associative data model, and makes it easier for businesses to adapt their databases as needs demand. It’s a much more virtual and object-oriented (OO) approach.
“What I’m trying to do in this model is let the data do all the work, or at least the majority of the work, and also take the shackles off and make it very simple for it to adapt and grow,” he says. “When you have tables, you are constrained. Let’s face it: It’s not always an easy thing to expand the tables. There’s a lot of dependent programs. Sometimes it’s not a simple recompiling of everything. It’s a lot bigger than that.”
With Inuendo’s associative model, users can add new entities at any time, and start associating values with them. “The virtualized model allows you to build virtualized relationships and start capturing new information instantly,” Burns says. “And the time travel feature, I think, is one of the strongest [aspects of the approach]. You can exist in any moment in time and you can see the data as it would have been at that moment.”
Performance isn’t always faster with this approach. Benchmark tests have shown that it may be slower on some applications than “plain old” F spec record-level access, Burns says. “But you gain by only getting the information you need, the tractability, the movement through time, and the dynamic layout, which is the ability to add properties on the fly.”
Streamlined Data and Code
More data is not always better data. In some data models, data that’s unneeded is routinely collected and processed, making the whole system inefficient. As part of the process of adopting the Inuendo model, users can clean up their processes and focus only on the data their applications and businesses actually need.
“When you think about it, in most application programs, so much data is brought in that doesn’t need to be there,” Burns says. “Not only do you have a lot of non-strategic data in most legacy databases, but they’re dragging all that non-strategic data into programs and then doing a lot of non-strategic operations to handle that data.”
The focus on SQL over RPG also brings Inuendo users more productivity, Burns says. “Record-level IO in RPG was great in its day, but it has a lot of warts and some of those warts involved all the nonproductive code that comes with it,” Burns says. “When you’re interfacing with your database using the Inuendo functions, all that nonproductive code goes away. Your programs start taking on the flavor of Java or Python or Visual Basic.”
Burns started the Inuendo project years ago at GEMKO Information Group, an Upstate New York accounting and IT services firm where he works as a senior consultant. GEMKO works with many large IBM i clients in the Eastern U.S., and Burns would use the Inuendo model in application modernization engagements.
“Over the course of the last decade I helped some of these organization get off old monolithic data models, take better advantage of SQL data types, educate their people on modern RPG, modern SQL, and what DB2 is capable of,” he says.
The Inuendo code has been validated at five large IBM i clients, including two insurance companies, a manufacturer, and a distributor, among others, Burns tells IT Jungle. The Inuendo code is mostly complete, save for a security model that Burns is still pondering the best way to implement.
Burns continues to update the code regularly and evangelize on the benefits of database modernization, the associative data model, and the open source approach. He continues to work with clients, with a big focus on education and user-empowerment through open source software.
One of the benefits of the Inuendo approach is that users don’t have to “get in bed with another software vendor,” Burns says. “We say, ‘Here’s an open source extraction layer and a data model and we’ll teach you how to use it.’ We’re an education provider, so of course there’s a lot of opportunity for GEMKO to provide education. We’ll be consultative and coach you. You can take it and run with it. If you can imagine it, you can build it in Inuendo, because it’s virtual.”
What Inuendo needs now is some fresh faces to help take it to the next level. “As luck would have it, about the time when I was getting it open source ready to put out on Web, GEMKO was getting out of the application modernization business,” he says. “So the product is all dressed up with no place to go.”
If you are interested in working with Burns on Inuendo, you can contact him through the project’s website at inuendo.us or through the Inuendo LinkedIn group. Burns is also hosting a webinar titled “Inuendo–Out of the Garage” Thursday, February 20, at 9 p.m. ET. Information about how to join this webinar is available on the innuendo.us website noted above.