root / README @ e27cb406a8e0181c7880525ed996d20947ed7214
View | Annotate | Download (5.7 KB)
| 1 | $Id: README,v 1.19 2004/10/07 03:35:27 wwg Exp $ |
|---|---|
| 2 | |
| 3 | The APQ Ada95 Binding to PostgreSQL & MySQL |
| 4 | Warren W. Gay VE3WWG |
| 5 | mailto:ve3wwg@cogeco.ca |
| 6 | http://home.cogeco.ca/~ve3wwg |
| 7 | APQ Version 2.2 |
| 8 | |
| 9 | The software you have in this directory, when compiled and installed, is |
| 10 | the APQ Ada95 binding to the PostgreSQL, MySQL and Sybase database servers. |
| 11 | For C/C++ types, this "binding" represents an interface between the |
| 12 | Ada95 language, and the C language libraries provided by those database |
| 13 | products. |
| 14 | |
| 15 | Why use APQ over other products? |
| 16 | |
| 17 | |
| 18 | APQ Features: |
| 19 | ------------- |
| 20 | |
| 21 | - It is a thick binding, making it natural for Ada programmers. |
| 22 | - It is very simple to use, making programming easy. |
| 23 | - Can be used with strong Ada types. |
| 24 | - Generic procedure and function support for strong types. |
| 25 | - Supports multiple database engines generically |
| 26 | - MySQL supported as of APQ-2.0 |
| 27 | - Sybase supported as of APQ-2.2 |
| 28 | - Database neutral code is possible (portable) |
| 29 | |
| 30 | - Full BLOB support (for PostgreSQL) |
| 31 | - Blob I/O is performed through Ada95 stream I/O. |
| 32 | - High performance blob I/O through buffered stream I/O |
| 33 | - Optionally blob I/O can be unbuffered. |
| 34 | |
| 35 | - Native binding (no ODBC muss or fuss!) |
| 36 | - Full support for NULL values. |
| 37 | - Additional support for DATE, TIME and TIMESTAMP data types. |
| 38 | - Some support for TIMEZONE types (PostgreSQL) |
| 39 | - Supports bit string types (PostgreSQL) |
| 40 | - Leaves the SQL in human readable form |
| 41 | |
| 42 | - 4 levels of tracing for application debugging |
| 43 | - Trace_None (no tracing) |
| 44 | - Trace_DB (C library trace information only) |
| 45 | - Trace_APQ (SQL query trace information only) |
| 46 | - Trace_Full (both Trace_DB and Trace_APQ) |
| 47 | - Trace_APQ output can be fed as SQL text for testing |
| 48 | |
| 49 | - Dual-license : |
| 50 | - ACL (Ada Community License) |
| 51 | - GPL2 (GNU Public License) |
| 52 | |
| 53 | - Extensive manual, with examples for nearly every function. |
| 54 | - Manual includes a chapter on generic database programming. |
| 55 | |
| 56 | - Experimental support of the Decimal_Type package (using |
| 57 | decimal routines used internally by the PostgreSQL database |
| 58 | engine). |
| 59 | - Under active development |
| 60 | |
| 61 | Design Goals: |
| 62 | ------------- |
| 63 | |
| 64 | The main design goals for the APQ binding development were: |
| 65 | |
| 66 | - simple to use |
| 67 | - easy to read |
| 68 | - reliable |
| 69 | - database vendor neutral (generic database programming) |
| 70 | - at the user's option, strongly typed |
| 71 | - strong blob support |
| 72 | - No C language interfaces or types |
| 73 | - good documentation |
| 74 | |
| 75 | It is the author's belief that these goals have been suitably met, |
| 76 | although the package is still undergoing active research. Excluding blob |
| 77 | support, there are only 2 tagged object types that the programmer must |
| 78 | become familiar with. These objects include Finalization and nicely |
| 79 | clean up after themselves. Blob support adds one more tagged object that |
| 80 | the programmer can interact with. |
| 81 | |
| 82 | 1. The Connection_Type object for database connections |
| 83 | 2. The Query_Type object for SQL interactions with server |
| 84 | 3. The Blob_Type type for Blob I/O and operations |
| 85 | |
| 86 | Having few objects reduces the learning curve substantially. A large |
| 87 | number of functions and procedures are overloaded -- reusing the same |
| 88 | name. This also reduces the learning curve, since the remaining |
| 89 | differences are only in the involved data types. Much complexity |
| 90 | is hidden within the state driven objects. |
| 91 | |
| 92 | The APQ binding allows the Ada95 programmer to interface with blobs |
| 93 | using stream I/O. This preserves the Ada advantage for strong type |
| 94 | checking while making it simple for the programmer to perform I/O. As of |
| 95 | APQ 1.2, the blob I/O is buffered, giving the stream I/O for blobs a |
| 96 | major performance boost. No longer will the programmer need to search |
| 97 | for performance work-arounds for blob operations. |
| 98 | |
| 99 | Version 2.2 of APQ brings Sybase into the fold of supported |
| 100 | databases. This is particularly useful now that Sybase has |
| 101 | generously made their ASE-12.5x Express edition of their |
| 102 | server available to developers for free. |
| 103 | |
| 104 | |
| 105 | Trial Programs: |
| 106 | --------------- |
| 107 | |
| 108 | Before you commit to a package like this, you want to see it |
| 109 | work. No problem for UNIX users. Just try the example program in |
| 110 | the ./eg2 directory. This example program is a simple |
| 111 | illustration of how to load your /etc/passwd and /etc/group |
| 112 | files into database tables. The example program does just this, |
| 113 | and then performs some rudimentary checks on them. |
| 114 | |
| 115 | Just cd to the directory and type make. Follow the |
| 116 | instructions from there. |
| 117 | |
| 118 | The ./eg directory is PostgreSQL only. The ./eg2 directory is |
| 119 | the same example, but will operate for PostgreSQL or MySQL |
| 120 | (depending upon your database support installed). |
| 121 | |
| 122 | The ./sybase directory has more extensive test programs |
| 123 | available for those that are using APQ with Sybase (or have |
| 124 | Sybase available). |
| 125 | |
| 126 | Platforms: |
| 127 | ---------- |
| 128 | |
| 129 | This binding has been tested under Linux and Win2k. |
| 130 | using the installed debian GNAT 3.14p compiler. The two |
| 131 | databases used in testing were: |
| 132 | |
| 133 | PostgreSQL 7.3.5 |
| 134 | MySQL 4.0.14 |
| 135 | Sybase ASE 12.52 |
| 136 | |
| 137 | While not yet tested on all platforms, this package will likely |
| 138 | port well for must UNIX platforms, including: |
| 139 | |
| 140 | - FreeBSD (2.0 untested) |
| 141 | - NetBSD (untested) |
| 142 | - OpenBSD (untested) |
| 143 | - Linux (tested) |
| 144 | - HP-UX 10.2 or higher (to be tested) |
| 145 | - Sun Solaris (possibly) |
| 146 | |
| 147 | |
| 148 | Win32 Builds: |
| 149 | ------------- |
| 150 | |
| 151 | Win32 builds are now possible. See the pdf document |
| 152 | named win32.pdf for instructions on how to build APQ |
| 153 | from sources. |
| 154 | |
| 155 | |
| 156 | Feedback: |
| 157 | --------- |
| 158 | |
| 159 | Please feedback suggestions and bugs to ve3wwg@cogeco.ca . |
| 160 | |
| 161 | When reporting bugs, please indicate : |
| 162 | |
| 163 | - PostgreSQL server version (if used) |
| 164 | - MySQL server version (if used) |
| 165 | - Sybase server version (if used) |
| 166 | - O/S and kernel release |
| 167 | - Ada compiler vendor and version |
| 168 | (do gnatls -v) |
| 169 | |
| 170 | Thank-you for downloading and using APQ. |
| 171 | |
| 172 | Warren W. Gay. |
| 173 | |
| 174 | |
| 175 | See file HISTORY for revision history, or see the |
| 176 | History chapter of the manual. |
| 177 | |
| 178 | - End - |