Help With BLOBs, General Informix Comments
Posted in 1994
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Data Types & Schema Design
I am just now starting to work with Informix BLOBs, and seem to be encountering some serious limitations. Hopefully, I am simply mis- reading the manuals, or there are simple workarounds if I am not. 1) You can not use standard record assignments when the record contains a BLOB. LET rec1.* = rec2.* Works fine if no BLOBs are in the records, but returns an error that rec2 is too complex a type. It seems that Informix should have designed 4GL well enough that it could recognize it's own data types and be able to manipulate them. This strikes me as a major design oversight. 2) You can not use standard assignments of any kind on BLOBs. LET rec1.textblob = "This is the new contents of BLOB" Back to the "too complex" error again. 3) It seems that the only way to manipulate a BLOB other than having the user type it in in an INPUT statement is to LOCATE it in a disk file, and work on it from there. LET stringvar = blobvar[1,20] I could understand this for BYTE fields, but it seems that Informix should have at least rudimentary support for TEXT fields to be manipulated within a 4GL application. The need to write everything out to disk adds serious overhead when working on a large set of TEXT fields, since there is overhead added to: a) Write it out to disk, b) Shell out to an external program to process the program c) Have the external program read the file [do stuff] d) Have the external program write the file back out again e) Read the file back in to update the record. That's A LOT of overhead for EACH record! ~~~~~ ~~~~ 4) You can't even use the multiline text editor to edit a TEXT field. This seems like a rediculously blinding oversight. Instead of allowing a user to simply enter a "Notes:" field with a simple, right there on the screen field, they have to press "!" (intuitive) run another program (which they must now be taught how to use), exit it, and return to the screen to see all or part of a simple text message with "?" marks in it. 5) [4GL Issue] There is no support for multi-screen forms, as there was in ISQL. The lack of multiscreen forms puts a *SERIOUS* burden on the programmer when dealing with records with more then just a few fields, and is a tragic oversight. 6) [4GL Issue] It is impossible to use arrays of such structures as WINDOW and CURSOR variables in a program. The inability to make an array of window variables makes it necessary to use lengthy CASE statements in order to switch between active windows, instead of simply being able to use something like: CURRENT WINDOW IS winarray[winnum] This would not be such a problem, except that it makes resolving point number five even more difficult. 7) [Forms Issue] There is no support for scrollable fields, or even the option of opening up the bottom line of the screen, like you get with a CONSTRUCT condition in a field smaller than it. This requires the form designer to make every field the maximum size possible, in the event that the use will need all of it, even if the data is usually only a few characters wide. 8) [Forms/4GL Issue] There is no way to remap the default field editor keys (Ctrl-A,D,R,etc) or disable the features if they are unwanted. I am extremely upset with the lack of robustness that a company as successful as Informix has put into their Online product, which I've gotten the impression they are promoting as their flagship product. This message was not intended as a flame, but as constructive criticism of a package that could easily have been much more robust. I have been programming in a variety of languages for over a decade, and found the oversights in this product to be quite severe and limiting to the work that I need to do with this product. The key to a good database application is that people with minimal training can use it easily, and that design goal is made much more difficult when the engine you are building on does not have such basic features as detailed above. If anyone has or knows of workarounds for the above issue, either in the public domain/shareware/freeware or commercial, please let me know. I hope that at least a few of my comments are completely wrong, and I just need to read the manuals more thoroughly, and ask that any corrections to my comments are posted here so as not to unduly denegrate the product. Sincerely, - Brian Gallagher -- Senior Programmer, Andrulis Research Corporation, Washington, DC.