| 1 | # $Header: /home/mike/cvs/mike/zSQLgate/lib/Net/Z3950/DBIServer/Intro.pm,v 1.19 2007-10-23 11:26:20 mike Exp $ | ||
| 2 | |||
| 3 | package Net::Z3950::DBIServer::Intro; | ||
| 4 | use strict; | ||
| 5 | |||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | Net::Z3950::DBIServer::Intro - An Introduction to zSQLgate | ||
| 10 | |||
| 11 | =head1 SYNOPSIS | ||
| 12 | |||
| 13 | C<zSQLgate> | ||
| 14 | provides an Z39.50 interface to your relational databases. | ||
| 15 | That is, it provides a generic gateway between the Z39.50 Information | ||
| 16 | Retrieval protocol and pretty much any relational database you | ||
| 17 | care to mention. | ||
| 18 | |||
| 19 | The Perl module L<Net::Z3950::DBIServer> provides the guts of the | ||
| 20 | gateway. Both the C<zSQLgate> program and the | ||
| 21 | C<Net::Z3950::DBIServer> module are included in this distribution. | ||
| 22 | |||
| 23 | =head1 DESCRIPTION | ||
| 24 | |||
| 25 | The ANSI/NISO Z39.50 information retrieval protocol (now ratified as | ||
| 26 | international standard ISO 23950) is a mature and powerful protocol | ||
| 27 | used in application domains as diverse as bibliographic information, | ||
| 28 | geo-spatial mapping, cultural heritage, | ||
| 29 | and structured vocabulary navigation. It's particularly useful in | ||
| 30 | distributed systems that need to provide uniform access to a variety | ||
| 31 | of different information resources, and has therefore provided the | ||
| 32 | technical backbone of many European and international collaborative | ||
| 33 | projects. You can read more at the Z39.50 Maintenance Agency, at | ||
| 34 | http://lcweb.loc.gov/z3950/agency/ | ||
| 35 | |||
| 36 | Relational database managegement systems (or RDBMSs) have been with us | ||
| 37 | for decades, but don't seem to be showing any signs of going away yet | ||
| 38 | :-) The ubiquitous SQL language, which is used to search them, has its | ||
| 39 | roots three decades ago in 1973, when an early version (then called | ||
| 40 | ``Sequel'') was described in R. F. Boyce and D. D. Chamberlin's paper | ||
| 41 | I<Using a Structured English Query Language as a Data Definition | ||
| 42 | Facility> (I<IBM RJ 1381>, December). | ||
| 43 | |||
| 44 | Z39.50 and relational databases may seem to belong to separate | ||
| 45 | universes, but in practice they often need to play nicely | ||
| 46 | together. Many, perhaps most, Z39.50 servers are built on top of | ||
| 47 | relational databases; and many IR projects need to add Z39.50 | ||
| 48 | interfaces to existing relational databases. | ||
| 49 | |||
| 50 | This has traditionally been an awkward and error-prone process, as | ||
| 51 | most of the available tools are rather low-level, and require | ||
| 52 | extensive programming. C<zSQLgate> changes that by providing a | ||
| 53 | generic gateway - a Z39.50 server which | ||
| 54 | serves the data from a relational database. Instead of requiring | ||
| 55 | programming, setting it up is a matter of writing a relatively | ||
| 56 | straightforward configuration file. | ||
| 57 | |||
| 58 | |||
| 59 | =head1 WHO NEEDS zSQLgate? | ||
| 60 | |||
| 61 | You may need C<zSQLgate> if: | ||
| 62 | |||
| 63 | =over 4 | ||
| 64 | |||
| 65 | =item * | ||
| 66 | |||
| 67 | You already have an established project built on Oracle, Sybase, | ||
| 68 | PostgreSQL, MySQL or any of a seemingly infinite number of | ||
| 69 | alternatives, and you need to build an Z39.50 interface to it. | ||
| 70 | |||
| 71 | Z<> | ||
| 72 | |||
| 73 | =item * | ||
| 74 | |||
| 75 | You have a wide variety of relational databases, similar in concept | ||
| 76 | but different in the details, possibly running on different machines | ||
| 77 | and using different RDBMSs; and you want to build a single interface that | ||
| 78 | treats them all uniformly. | ||
| 79 | |||
| 80 | Z<> | ||
| 81 | |||
| 82 | =item * | ||
| 83 | |||
| 84 | You want to build a Z39.50 server from scratch, and for some reason | ||
| 85 | dedicated tools such as Index Data's Zebra - | ||
| 86 | http://www.indexdata.com/zebra/ - are not suitable. You may want to | ||
| 87 | use a relational database because you're used to it, or because you | ||
| 88 | need industrial-strength data integrity, or commit/rollback, or some | ||
| 89 | other feature of a particular RDBMS. | ||
| 90 | |||
| 91 | Z<> | ||
| 92 | |||
| 93 | =back | ||
| 94 | |||
| 95 | |||
| 96 | =head1 Z39.50 CAPABILITIES | ||
| 97 | |||
| 98 | Part of the strength, and also part of the weakness, of Z39.50 is the | ||
| 99 | fact that it is not a monolithic standard: implementations are not | ||
| 100 | required to implement all of it - indeed, there is probably I<no> | ||
| 101 | Z39.50 implementation that supports the whole standard - but only | ||
| 102 | those parts which are useful to it. | ||
| 103 | |||
| 104 | In this section, we briefly discuss which parts of the Z39.50 standard | ||
| 105 | C<zSQLgate> supports. | ||
| 106 | |||
| 107 | =head2 Searching | ||
| 108 | |||
| 109 | C<zSQLgate> supports the Z39.50 Type-1 query (``RPN''), and the | ||
| 110 | identical Type-101 query. Queries may include arbitrary combinations | ||
| 111 | of the AND, OR and ANDNOT boolean operators, nested to any depth. | ||
| 112 | Proximity operators are not supported. | ||
| 113 | |||
| 114 | Within individual terms, the following attributes are supported: | ||
| 115 | |||
| 116 | =over 4 | ||
| 117 | |||
| 118 | =item Access points (attribute type = 1) | ||
| 119 | |||
| 120 | Any access points from any attribute sets may be supported, depending | ||
| 121 | on the C<attrset> clauses in the configuration file. | ||
| 122 | |||
| 123 | The configuration file may specify what access-point is used if none | ||
| 124 | is explicitly indicated by a query. | ||
| 125 | |||
| 126 | =item BIB-1 relations (attribute type = 2) | ||
| 127 | |||
| 128 | The ordering relations | ||
| 129 | 1 (less than), | ||
| 130 | 2 (less then or equal), | ||
| 131 | 3 (equal), | ||
| 132 | 4 (greater than or equal), | ||
| 133 | 5 (greater than) | ||
| 134 | and | ||
| 135 | 6 (not equal) | ||
| 136 | are all supported; but not the more esoteric relations | ||
| 137 | 100 (phonetic), | ||
| 138 | 101 (stem), | ||
| 139 | 102 (relevance) | ||
| 140 | and | ||
| 141 | 103 (AlwaysMatches). | ||
| 142 | |||
| 143 | If no explicit relation attribute is specified, equality (value = 3) | ||
| 144 | is assumed unless overridden by the configuration file. | ||
| 145 | |||
| 146 | =item BIB-1 truncations (attribute type = 5) | ||
| 147 | |||
| 148 | Truncation attributes | ||
| 149 | 1 (right-truncation), | ||
| 150 | 2 (left-truncation), | ||
| 151 | 3 (left- and right-truncation), | ||
| 152 | 100 (do not truncate) | ||
| 153 | and | ||
| 154 | 101 (process # in search term) are supported; | ||
| 155 | but not | ||
| 156 | 102 (RegExpr-1) | ||
| 157 | or | ||
| 158 | 103 (RegExpr-2). | ||
| 159 | |||
| 160 | If no explicit relation attribute is specified, no truncation (value = | ||
| 161 | 100) is assumed unless overridden by the configuration file. | ||
| 162 | |||
| 163 | =back | ||
| 164 | |||
| 165 | Attributes of type 3 (position), 4 (structure) and 6 (completeness) | ||
| 166 | are ignored. All search terms are treated as being of type string - | ||
| 167 | that is, as though an attribute of type 4 (structure) and value 108 | ||
| 168 | (string) had been specified. | ||
| 169 | |||
| 170 | =head2 Retrieval | ||
| 171 | |||
| 172 | C<zSQLgate> currently supports retrieval using the following record | ||
| 173 | syntaxes: | ||
| 174 | |||
| 175 | =over 4 | ||
| 176 | |||
| 177 | =item SUTRS | ||
| 178 | |||
| 179 | The SUTRS record-syntax is supported natively, with no need for any | ||
| 180 | configuration. The returned record is extremely raw, consisting only | ||
| 181 | of a list of elements, one per line, in the format ``C<field: value>'', | ||
| 182 | sorted in alphabetical order by fieldname. This can be useful for | ||
| 183 | debugging a configuaration because of the minimal munging involved. | ||
| 184 | |||
| 185 | This default formatting of SUTRS records may optionally be overridden | ||
| 186 | by the configuaration file, for servers that need to support | ||
| 187 | SUTRS-based clients. | ||
| 188 | |||
| 189 | =item XML | ||
| 190 | |||
| 191 | C<zSQLgate> supports the generation of XML in any format, using a | ||
| 192 | two-stage process. An initial, simple, record is formed using a set | ||
| 193 | of elements whose names are mapped to expressions from the database; | ||
| 194 | then that record may be passed through an arbitrary XSLT stylesheet to | ||
| 195 | transform it into the desired format. In this way, for example, | ||
| 196 | MarcXML or RDF records can be generated. | ||
| 197 | |||
| 198 | =item GRS-1 | ||
| 199 | |||
| 200 | The GRS-1 record-syntax is supported, but at present the generated | ||
| 201 | records can include only top-level fields (i.e. tag-paths of a single | ||
| 202 | element). Support for sub-records will be added in a subsequent | ||
| 203 | release if there is demand for it. | ||
| 204 | |||
| 205 | =item MARC | ||
| 206 | |||
| 207 | MARC records can be generated by a field-mapping specification. The | ||
| 208 | precise dialect of MARC (MARC21, UKMARC, etc.) supported by a | ||
| 209 | particular deployment of C<zSQLgate> is a function of the mapping | ||
| 210 | specified in the configuration file. MARC records may contain | ||
| 211 | repeated fields. | ||
| 212 | |||
| 213 | =back | ||
| 214 | |||
| 215 | =head2 Other | ||
| 216 | |||
| 217 | C<zSQLgate> does not currently include any support for Z39.50's | ||
| 218 | C<sort>, C<scan> or C<extended services>. This functionality can be | ||
| 219 | added if required: contact the author if you wish to build a server | ||
| 220 | that provides these services. | ||
| 221 | |||
| 222 | |||
| 223 | =head1 LIMITATIONS | ||
| 224 | |||
| 225 | C<zSQLgate> is focused on doing one thing well: that is, providing the | ||
| 226 | means for Z39.50 clients to search in, and fetch data from, relational | ||
| 227 | databases. So it does not currently address any of the following: | ||
| 228 | |||
| 229 | =over 4 | ||
| 230 | |||
| 231 | =item * | ||
| 232 | |||
| 233 | Database update. C<zSQLgate> provides a read-only interface. | ||
| 234 | |||
| 235 | Z<> | ||
| 236 | |||
| 237 | =item * | ||
| 238 | |||
| 239 | Z39.50 ``extras'' such as inter-library loan (ILL). | ||
| 240 | |||
| 241 | Z<> | ||
| 242 | |||
| 243 | =item * | ||
| 244 | |||
| 245 | ``Fan out'', or the provision of ``union catalogues'' (though this | ||
| 246 | could be added in subsequent versions if there's demand for it.) | ||
| 247 | |||
| 248 | Z<> | ||
| 249 | |||
| 250 | =back | ||
| 251 | |||
| 252 | |||
| 253 | =head1 FUTURE DIRECTIONS | ||
| 254 | |||
| 255 | Intended enhancements for C<zSQLgate> include the following: | ||
| 256 | |||
| 257 | =over 4 | ||
| 258 | |||
| 259 | =item * | ||
| 260 | |||
| 261 | Allow specification of semantics for attributes other than access | ||
| 262 | points. (Relation and truncation are handled by hardwired code that | ||
| 263 | knows about the relevant attributes in the BIB-1 and Utility sets.) | ||
| 264 | |||
| 265 | Z<> | ||
| 266 | |||
| 267 | =item * | ||
| 268 | |||
| 269 | Allow elements to be marked for inclusion in the brief record | ||
| 270 | (element-set name C<b>). More generally, provide the wherewithal for | ||
| 271 | the configuration file to specify the contents of arbitrary element | ||
| 272 | sets. | ||
| 273 | |||
| 274 | Z<> | ||
| 275 | |||
| 276 | =item * | ||
| 277 | |||
| 278 | Allow the configuration file to override some global parameters on a | ||
| 279 | per-logical-database basis. For example, the back-end data-source | ||
| 280 | (DBI database, or DSN) and authentication parameters. | ||
| 281 | |||
| 282 | Z<> | ||
| 283 | |||
| 284 | =item * | ||
| 285 | |||
| 286 | Allow the configuration file to set other DBI parameters such as | ||
| 287 | C<auto_commit>. | ||
| 288 | |||
| 289 | Z<> | ||
| 290 | |||
| 291 | =item * | ||
| 292 | |||
| 293 | Allow the configuration file to specify which port or ports the server | ||
| 294 | should listen on. Maybe also other Z39.50 server options. | ||
| 295 | |||
| 296 | Z<> | ||
| 297 | |||
| 298 | =item * | ||
| 299 | |||
| 300 | Allow the inclusion of sub-files. This will be useful to allow, for | ||
| 301 | example, element sets to be specified in their own files. | ||
| 302 | |||
| 303 | Z<> | ||
| 304 | |||
| 305 | =item * | ||
| 306 | |||
| 307 | Provide the ability to make multiple back-end databases look like a | ||
| 308 | single large data repository (``union catalogue''). This is a much | ||
| 309 | bigger deal the most of the other enhancements mentioned here, and | ||
| 310 | will probably only happen if there's a real need for it in a specific | ||
| 311 | project. | ||
| 312 | |||
| 313 | Z<> | ||
| 314 | |||
| 315 | =back | ||
| 316 | |||
| 317 | I plan to implement these enhancements more or less in the order that | ||
| 318 | customers need them, so do give me a shout if anything listed here (or | ||
| 319 | indeed anything not listed) is high on your ``must have'' list, and | ||
| 320 | I'll see what I can do. | ||
| 321 | |||
| 322 | |||
| 323 | =head1 TERMS AND CONDITIONS | ||
| 324 | |||
| 325 | This module is released under | ||
| 326 | non-free terms - see L<Net::Z3950::DBIServer::LICENCE>. In a | ||
| 327 | nutshell, you can download, unpack, build and evaluate it for free, | ||
| 328 | for you may not deploy it without first purchasing a deployment | ||
| 329 | licence. | ||
| 330 | |||
| 331 | The price of a deployment licence is either £2500 as a one-off fee for | ||
| 332 | perpetual deployment, or £1000 for a one-year deployment licence and | ||
| 333 | an additional £750 per year thereafter. That fee includes limited | ||
| 334 | support and a small amount of development work where appropriate. | ||
| 335 | |||
| 336 | |||
| 337 | =head1 NOW WHAT? | ||
| 338 | |||
| 339 | If you've not already read the licence, you should. | ||
| 340 | L<Net::Z3950::DBIServer::LICENCE>. | ||
| 341 | If you need help installing, you might find | ||
| 342 | L<Net::Z3950::DBIServer::Install> | ||
| 343 | helpful. | ||
| 344 | Then it's on to the the tutorial, | ||
| 345 | L<Net::Z3950::DBIServer::Tutorial>, | ||
| 346 | after which you may wish to go on to some of the more brutally | ||
| 347 | technical documents, including the configuration file specification, | ||
| 348 | L<Net::Z3950::DBIServer::Spec>. | ||
| 349 | |||
| 350 | |||
| 351 | =head1 AUTHOR | ||
| 352 | |||
| 353 | Mike Taylor E<lt>mike@miketaylor.org.ukE<gt> | ||
| 354 | |||
| 355 | First version Sunday 24th February 2002. | ||
| 356 | |||
| 357 | =cut | ||
| 358 | |||
| 359 | 1; |