AT ORACLE: Interview
Obsessed with PL/SQLBy Tom Haunert
Steven Feuerstein talks about his long and productive PL/SQL journey.
Steven Feuerstein is a PL/SQL evangelist, author, and Oracle Magazine columnist. Oracle Magazine editor in chief Tom Haunert recently sat down with Feuerstein to talk about his past, present, and future with PL/SQL; his advice for PL/SQL developers; and the future of PL/SQL. The following is an excerpt from that interview. Download the full podcast at oracle.com/magcasts.
Oracle Magazine: How did you get started with Oracle technology?
Feuerstein: It was pretty much an accident. I had been working as a programmer, mostly in FORTRAN, when I got out of college, and I started dabbling with databases. I moved into a consulting job at an insurance company and took a step forward with my database programming. That job was incredibly boring. I was basically managing reports.
So, I started looking for a database-related job, and I answered an ad for a company that needed somebody with relational database experience. I had no idea what relational databases were, but I found and memorized E.F. Codd’s 12 rules of relational databases and went to my interview. It was with a headhunter looking for people to work for Oracle—which I had barely even heard of—in presales. He didn’t ask me a single question about relational databases, though, and the big question for me became, did I want to wear a suit and tie every day?
Fortunately, I decided it was worth it and went from being a programmer to going out and doing presentations on Oracle technology. And at that point—this was 1987—a presentation on Oracle technology consisted of showing canned SQL*Plus scripts and saying, “Check it out—a join of two tables! Check it out—you can update the content of a table with a simple statement!”
Oracle Magazine: What drew you to PL/SQL?
Feuerstein: I’ve always been interested in creating new things. I joined Oracle in presales, but all the time I was learning how to use the tools and looking for ways to apply them.
Then in 1989, I realized that our sales team had no sales management tools. So, I wrote an application with SQL *Forms 3.0 called Team Sell to help salespeople keep track of activity in their accounts.
At the same time, the head of Oracle USA sales was building a consulting team to create applications on a national level. I was recruited to work with his team and soon found myself spending two-thirds of my time building applications in SQL *Forms with PL/SQL. That was the real grabber for me. When PL/SQL was introduced to the SQL *Forms toolset, it opened up huge vistas in the flexibility of both forms and report building. I was delighted to put SQL *Forms 2.3 triggers behind me and dive into the world of PL/SQL.
Oracle Magazine: Can you give us the high points of your work with PL/SQL and tell us what projects you’re working on now?
Feuerstein: I left Oracle in ’92 and became a consultant, where my main focus was still on Oracle development tools and PL/SQL.
About ’94, publishers were starting to ask people if they would like to write books about Oracle7 Database. I wrote a lot of pretty awful science fiction in high school, and teachers liked my essays, so I thought that I should be able to write a technical book. I didn’t know Oracle7 Database all that well, but I knew PL/SQL, so I counterproposed. The result was the first book on PL/SQL published independently of Oracle: Oracle PL/SQL Programming (O’Reilly Media, 1995).
I wrote it with a sense of humor, and the result seemed to be that developers found that they could actually understand what I wrote—and even enjoy it. Well, that book changed my life, virtually overnight. And from that point on, I focused almost exclusively on PL/SQL—studying it, writing about it, and writing programs in it. I have published 10 different books on the PL/SQL language, which is probably about six or seven too many. At this point, I update the three most popular of these: Oracle PL/SQL Programming, Oracle PL/SQL Language Pocket Reference, and Oracle PL/SQL Best Practices (all O’Reilly Media).
I’ve also been involved in many tools development efforts over the years. Back in ’99, I discovered test-driven development and created utPLSQL, which is basically JUnit for PL/SQL. There are probably several hundred organizations still using that around the world, though it’s not an actively maintained project. I was also involved in building another automated testing tool, Quest Code Tester for Oracle, as well as error management and code generation tools.
But for the last several years, my focus has been less on tools and more on strengthening the worldwide community of PL/SQL developers. PL/SQL is a rich, mature language—and there are tens of thousands of programmers who have been working with it for a long time. I think one of the key challenges for all of us is to find a way to cohere those individuals into a community in which everybody’s expertise can be shared and magnified. Too much of the way that we tend to work in the technology world is that people look for gurus, and basically ask for a “download.” I’m pleased to do it, but many people out there know PL/SQL as well as I do in certain areas and have a lot more to offer in their real-world experience. So, what I’m really focusing on these days, primarily through the PL/SQL Challenge Website, is to provide a way for people around the world to not only learn from me, but for me and everybody else to learn from them.
Oracle Magazine: You’ve said that your days of traveling for work are limited. What’s the latest on your PL/SQL roadwork plans?
Feuerstein: In 2010, I finally decided that I had enough of living in airplanes, airports, and hotels. I had been doing 100,000-plus miles a year, and I was tired of being away from home. I was interested in working on building this global community, and the way you build a global community is not necessarily to try to meet everybody personally, but to provide Websites where people can get together and share and promote their expertise. These days, in terms of traveling, I prioritize key conferences—for example, Oracle OpenWorld and ODTUG Kscope.
Oracle Magazine: Do you have any suggestions for aspiring and senior PL/SQL developers to help them manage their own PL/SQL training and experience?
Feuerstein: I get a lot of questions from developers about what they should be doing with their careers. They’re trained in PL/SQL. They’ve got pretty solid experience under their belts, and they want to know what to do to protect and enhance their careers. They also want to know about the future of PL/SQL. Ever since Oracle8i Database, when the Java Virtual Machine was put into the database, people have been asking, “Is PL/SQL going to stick around? Is Oracle switching over to Java? Is PL/SQL going to go away?”
PL/SQL is absolutely not going to go away. It’s critical technology in so many parts of the Oracle technology stack. And even if it weren’t, there are literally millions of lines of PL/SQL code out there that have been running in mission-critical applications for decades. So, I think that everybody should be quite confident that PL/SQL is not only going to stick around, but it will be enhanced. The PL/SQL team is still working hard at making it the best possible database programming language.
Having said that, I have heard from a number of developers that they’re seeing the opportunities for PL/SQL shrinking. That makes some sense, because it’s not the only language you can use to deploy Oracle applications. I think it’s really critical that anybody who is a PL/SQL developer today also has a working knowledge of Java—so that they can, at a minimum, leverage Java technology from within their PL/SQL programs.
It’s also important that PL/SQL developers are familiar with XML, which will be a critical mechanism for managing and transmitting information between application architecture elements. Also make sure you’re really strong on the latest implementations of SQL and the enhancements to SQL in Oracle Database, so you’re not writing PL/SQL when you can do the work in SQL instead.
Oracle Magazine: What are the key features that developers should know about PL/SQL?
Feuerstein: One critical datatype of PL/SQL that you’ve got to be really sharp on is collections—PL/SQL’s version of arrays. They form the foundation for critical performance-related features of PL/SQL, including FORALL and BULK COLLECT.
In addition, every PL/SQL developer needs to be aware of the Function Result Cache feature in Oracle Database 11g. This is a really nice feature that involves putting one keyword into your existing functions, result_cache, and potentially speeding up the performance of data retrievals from the database by a significant margin, with minimal impact to your code.
And as a best practice that also enables the use of the Function Result Cache, I recommend that PL/SQL developers encapsulate their implementation details as much as possible. Hide your queries behind functions, hide your SQL statements, hide your formulas, hide your literals, and so on. So encapsulate and learn about the Function Result Cache, and then you’ll be able to see a significant boost in performance just in the process of upgrading to Oracle Database 11g and taking advantage of those new features.
Oracle Magazine: Do you have any words of wisdom for PL/SQL newbies?
Feuerstein: There are people coming into the language, and there are people who have been around for 20 years. I tell newcomers to PL/SQL: don’t be intimidated by people who have been doing it for a long time. We’re often stuck in ruts, doing things the “old way.” Just make sure that you’re keeping up with the latest and leveraging the language fully. You’ll have caught up with us in no time.
Tom Haunert (email@example.com) is editor in chief of Oracle Magazine.
Send us your comments