re: database engine
Posted in 1992
<Sorry, David, I cannot reply directly> ->>...... How is information passed back and forth between the ->>4gl/esql-C program and the database engine? For example, if a query ->>returns 100 rows from a table, how can a pointer to this information ->>be passed back to the calling program? -> I believe that the two programs are link by a pipe. Network version -> are probably linked by sockets. The selected data is returned across -> the pipe one row at a time. Wow, that must be some kind of interface: requires 2-way pipe with hand-shaking ("give me the next row now" and "okay, here's the next row"), or ("forget the next row, give me a new list sorted some other way"). ->> ... Why can't all functions ->>that the engine fulfills be incorporated into the 4gl/esql-C ->>program itself? Why must we have this phantom program floating ->>around in the background? -> I have heard this strategy called dynamic or runtime linking. All -> of this backend code (about 300K on my system) could be linked into -> every program that you build, but it seem like a was of disk space. -> Also, you would be forced to re-link every program after every upgrade. Yes, but how much of the 300K is really the database engine and how much is for maintenance of the link between the engine and the program? And every program you write probably wouldn't require the entire engine. For example, if part of the engine dealt with re-indexing, then a program that only did queries would not need that part of the engine. And relinking shouldn't be a problem, since most programs need periodic modifications and updates that require re-compiling anyways. Just my $0.02. Why the interest in the engine, aside from curiosity? To understand/answer questions such as: 1) If the 4gl/esql-C program dies and the sqlexec engine is left running by itself in memory (this happens, for example, when the LAN goes down, or the user doesn't properly log-out), will killing the sqlexec cause corruption in the database? Will letting it run cause corruption? 2) Is it possible to write a stand-alone Informix 4gl/esql-C application that can be ported from one machine (same model, of course) to another, without Informix on the second machine? I know the answer to this (NO!), but dBase allows you to write stand-alone applications, why not Informix? Once a C/Pascal/Cobol/Basic program is compiled, you don't need a $20K compiler or interpreter to run it. It would be nice to be able to do the same with database programs. ->David Stockel Internet: dccrjc9@bpats.bell-atl.com -> of ADIA Information Technologies Voice: (215) 466-3216 -> at Bell Atlantic Fax: (215) 665-1329 -> 1717 Arch Street 4-N-8 -> Philadelphia, PA 19103 Proudly serving my corporate masters Todd Glidden, CSC, Sacramento Army Depot doimic01@saad-emh1.army.mil All opinions expressed are mine alone, etc. "Today's Army: Building a kinder, gentler tomorrow through superior firepower."