SQL vs. 4GL
Posted in 1992
In Message <wemhoff.697427191@judy.cs.iastate.edu>, Becky Wemhoff says: > I'm working in a new Informix shop, and there's a minor debate going > on here about when to use SQL code only and when to use 4GL code. We > all agree that a simple one-time-only report will be SQL'ed. However, > our current 4GL guru would like everything else written in 4GL. The > SQL guru thinks that the code would be simpler and easier to maintain > if we could write most of our applications in SQL. Well Becky, as Informix distributors, we need to make this decision very often. We have come to a point where SQL is only used as a database schema editor and as a tool for start data-entry until the finished 4GL program is installed. OK, some reports stay in Ace... but sometimes you need to do some updates while running a report, or open a window with a construct form to choose what data is going to be in the report, and 4GL is then the way to do it. Also, in busy data-entry environments you don't want to use perform because the clerk has to enter "A", fill the fields, and then the Accept key (usually [Esc]). That is 2 keystrokes too much per record (imagine that one person is required to enter 2,000 records (80 chars) dayly, 4 records a minute!) and could represent 50 less records dayly per person. With 4GL you can do a WHILE loop to accept all entries but those which don't comply with some standards (like a verification digit math). The bottom line is, if you want to use only ONE product to develop ALL your applications (complete), then use 4GL. If you know 'C' and have SQL and ESQL/C, then you can use SQL and C mixed to match 4GL. Otherwise your SQL code would be too simple and limited to handle those applications that require lots of controls and updating other table's data. About the maintenance point, if you use a 4GL code generator tool, like FourGen-Screen or Informix-Forms, then you don't have to worry about this anymore! These tools standarize your code making maintenance almost zero, and if you still have to modify code, it is always in the same place, with the same variable names, etc. That is my opinion. +--------------------+----------------------------------------+ | Eric C. Leschhorn | MICROCOMPUTOS Fax:(809)688-6044 | | Marketing Director | Dominican Republic Tel:(809)530-8506 | | uunet!microc!eric | Puerto Rico, USA Tel:(809)250-8789 | +--------------------+----------------------------------------+ | I N F O R M I X L A T I N A M E R I C A N T E A M | +-------------------------------------------------------------+