Focus on Database Management

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

If I were to ask you how the System/36 and native AS/400 differ, you’d probably mention that the AS/400 lets you define files externally to programs. You might also mention that DB2/400 logical files are more powerful than S/36 alternate indexes. You’d be saying that the S/36 has a file system but that the AS/400 has a database management system (DBMS).

Here is a short list of features you can expect to find in any decent relational DBMS but not in a file system:

• Null—A null value is not the same as a blank or zero value. A cost of zero means that something is free. A cost of null means the cost is unknown or there is no cost.

• Joins—If you need data from related files, join them. To put the billing address on a sales order, join to the customer master file.

• Date and time data types—When the DBMS understands that a certain field contains a date or time, it can do arithmetic. You can tell the system to find all the customers who are at least 30 days overdue in making their payments.

• Journaling and commitment control—Journaling logs changes to the database as they occur, so you can back out changes to the database and you can recover lost work by applying journaled changes to a restored backup.

• Referential integrity—Referential integrity has to do with the way files relate to one another. You can tell the system that the lines of a purchase order belong to the header of the purchase order. When someone deletes an order header, the DBMS can remove the line items automatically.

• Triggers—A trigger program runs when a record is added, deleted, or changed. When you entrust a task to a trigger program, you don’t have to depend on programmers to remember to do that task when they write programs that use that database file.

• User-defined functions—A function converts one or more values into another value. The square root function converts 16 into four. You can make DB2/400 convert an item number and customer class code into a price.


• Stored procedures—Stored procedures are programs that are called from SQL. You like the way RPG programs can call each other, don’t you? Why not let ODBC programs that run on PCs do the same thing?

This list boils down to one thing: Get the business logic out of the program and into the database. If you don’t use these features—and many AS/400 shops don’t—you don’t have a database, but a glorified file system.

Part of my job is to keep up with what’s going on in the information-processing industry and to help you make some sense of what’s good and what’s rotten. Closely related is my duty to encourage you to change with the times whenever I believe you’ll be better off for doing so.

To that end, I’ve collected a few articles dealing with database topics. I didn’t have enough room to run articles on all the topics I thought were important, but that’s OK. I’ve got more database articles planned for upcoming issues.


TED HOLT

Ted Holt is IT manager of Manufacturing Systems Development for Day-Brite Capri Omega, a manufacturer of lighting fixtures in Tupelo, Mississippi. He has worked in the information processing industry since 1981 and is the author or co-author of seven books. 


MC Press books written by Ted Holt available now on the MC Press Bookstore.

Complete CL: Fifth Edition Complete CL: Fifth Edition
Become a CL guru and fully leverage the abilities of your system.
List Price $79.95

Now On Sale

Complete CL: Sixth Edition Complete CL: Sixth Edition
Now fully updated! Get the master guide to Control Language programming.
List Price $79.95

Now On Sale

IBM i5/iSeries Primer IBM i5/iSeries Primer
Check out the ultimate resource and “must-have” guide for every professional working with the i5/iSeries.
List Price $99.95

Now On Sale

Qshell for iSeries Qshell for iSeries
Check out this Unix-style shell and utilities command interface for OS/400.
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: