Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.databases Subject: Re: Embedded SQL: Same across vendors? Message-ID: Date: 15 Feb 91 19:13:40 GMT References: <1991Feb14.190411.12999@DRD.Com> Sender: davidm@cimshop.UUCP Distribution: comp Organization: Consilium Inc., Mountain View, California Lines: 32 In-reply-to: mark@DRD.Com's message of 14 Feb 91 19:04:11 GMT >>>>> On 14 Feb 91 19:04:11 GMT, mark@DRD.Com (Mark Lawrence) said: Mark> I've had a look at the reference manuals for Oracles embedded SQL Mark> program interface (happened to be for DOS, but I imagine that its Mark> consistent for all platforms supported) and I've looked at the Ingres Mark> reference books for ESQL for SCO UNIX/ODT. The way host variables are Mark> handled and so forth appear amazingly similar. I was wondering, for Mark> those of you who've dealt with the equivalent 3gl interfaces in sybase, Mark> informix and what-not, is it the same there too? Is embedded SQL Mark> similar for all vendors which support it? Is it a part of the SQL Mark> standard (if such exists)? Embedded SQL is part of the ANSI standard (to what degree, I'm not sure), so it will be "amazingly similar" from platform to platform. However, there is still enough flexibility in the standards that there are gotchas to watch for. For instance, data definition statements as opposed to data manipulation statements were not really addressed in the standard (that may have changed recently). I still think the safest approach to building portable programs for multiple types of relational database systems is to *extremely* modularize your code and put the SQL statements in functions/procedures by themselves. If there are differences between platforms, only the code with the data access statements will change. The 3GL tends to be more standardized than the database access statements (especially with the coming wave of object orientation), so you're better off using the tried and true methodologies of systems design to modularize/encapsulate unknown quantities into safe areas. -- ==================================================================== David Masterson Consilium, Inc. (415) 691-6311 640 Clyde Ct. uunet!cimshop!davidm Mtn. View, CA 94043 ==================================================================== "If someone thinks they know what I said, then I didn't say it!"