Z39.50 is a client-server protocol for searching and retrieving information from remote computer databases. It is covered by ANSI/NISO standard Z39.50, and ISO standard 23950. The standard's maintenance agency is the Library of Congress. Z39.50 is widely used in library environments and is often incorporated into integrated library systems and personal bibliographic reference software. Interlibrary catalogue searches for interlibrary loan are often implemented with Z39.50 queries.Work on the Z39.50 protocol began in the 1970s, and led to successive versions in 1988, 1992, and 1995. The Common Query Language is based on Z39.50 semantics.
It supports a number of actions, including search, retrieval, sort, and browse. Searches are expressed using attributes, typically from the bib-1 attribute set, which defines six attributes to be used in searches of information on the server computer: use, relation, position, structure, truncation, completeness. The syntax of the Z39.50 protocol allows for very complex queries.
In practice, however, the functional complexity is limited by the uneven implementations by developers and commercial vendors. The syntax of Z39.50 is abstracted from the underlying database structure; for example, if the client specifies an author search (Use attribute 1003), it is up to the server to determine how to map that search to the indexes it has at hand. This allows Z39.50 queries to be formulated without having to know anything about the target database; but it also means that results for the same query can vary widely among different servers. One server may have an author index; another may use its index of personal names, whether they are authors or not; another may have no name index and fall back on its keyword index; and another may have no suitable index and return an error.
I have developed a z39.50 client which is based on zoom.net (which in turn uses the YAZ.dll to incorporate the z39.50). The client has been built on c#.net. Here I have used some basic queries of searching via author, title and publisher. Further I have used only AND and OR clauses in the query. The record is being fetched in MARCXML and selected parameters are displayed to user. The application is successfully retrieving data from the loc server whose connection parameters are:
You can get the Zoom.Net dll from here [zoom.net dll] and the Yaz.dll from here [Yaz dll]. The support that the above mentioned server gives in regard to query syntax and symantics is described in loc server page. Kindly refer it to know more about the LOC server that I have used to query in the application.
The code for it is :
//namespaces to include
using Zoom.Net.YazSharp;
using Zoom.Net;
using System.Xml;
//create a connection and provide the server details. Here I have used the LOC server
Connection ob1 = new Connection("z3950.loc.gov", 7090);
//provide the name of the database on the server
ob1.DatabaseName = "Voyager";
//define the syntax type that will be required. Here i am defining XML viz MarcXml
ob1.Syntax = Zoom.Net.RecordSyntax.XML;
//Connect to the server
ob1.Connect();
//Declare your query
query = "Title=\"" + txtTitle.Text.Trim() + "\"";
//Create the object for query.
Zoom.Net.YazSharp.CQLQuery q = new CQLQuery(query);
IResultSet results;
//perform search
results = (ResultSet)ob1.Search(q);
Now iterate through to the results and get the xml of each record fetched and derive from it the needed values.
for (uint i = 0; i < results.Size; i++)
{
string temp = Encoding.UTF8.GetString(results[i].Content);
//This string is having the xml in string format. Convert it into the xml via XmlDocument
XmlDocument doc = new XmlDocument();
doc.LoadXml(temp);
//perform the needful operations
//...............
//...............
//...............
}
Hope this helps... Do keep me updated about your views and queries.
A comprehensive and exhaustive list of avaliable z39.50, sru and srw servers is given in indexdata website. Another list having avaliable z39.50 free softwares is in loc website.
It supports a number of actions, including search, retrieval, sort, and browse. Searches are expressed using attributes, typically from the bib-1 attribute set, which defines six attributes to be used in searches of information on the server computer: use, relation, position, structure, truncation, completeness. The syntax of the Z39.50 protocol allows for very complex queries.
In practice, however, the functional complexity is limited by the uneven implementations by developers and commercial vendors. The syntax of Z39.50 is abstracted from the underlying database structure; for example, if the client specifies an author search (Use attribute 1003), it is up to the server to determine how to map that search to the indexes it has at hand. This allows Z39.50 queries to be formulated without having to know anything about the target database; but it also means that results for the same query can vary widely among different servers. One server may have an author index; another may use its index of personal names, whether they are authors or not; another may have no name index and fall back on its keyword index; and another may have no suitable index and return an error.
I have developed a z39.50 client which is based on zoom.net (which in turn uses the YAZ.dll to incorporate the z39.50). The client has been built on c#.net. Here I have used some basic queries of searching via author, title and publisher. Further I have used only AND and OR clauses in the query. The record is being fetched in MARCXML and selected parameters are displayed to user. The application is successfully retrieving data from the loc server whose connection parameters are:
Server name : z3950.loc.gov
Port : 7090
Database : Voyager
The code for it is :
//namespaces to include
using Zoom.Net.YazSharp;
using Zoom.Net;
using System.Xml;
//create a connection and provide the server details. Here I have used the LOC server
Connection ob1 = new Connection("z3950.loc.gov", 7090);
//provide the name of the database on the server
ob1.DatabaseName = "Voyager";
//define the syntax type that will be required. Here i am defining XML viz MarcXml
ob1.Syntax = Zoom.Net.RecordSyntax.XML;
//Connect to the server
ob1.Connect();
//Declare your query
query = "Title=\"" + txtTitle.Text.Trim() + "\"";
//Create the object for query.
Zoom.Net.YazSharp.CQLQuery q = new CQLQuery(query);
IResultSet results;
//perform search
results = (ResultSet)ob1.Search(q);
Now iterate through to the results and get the xml of each record fetched and derive from it the needed values.
for (uint i = 0; i < results.Size; i++)
{
string temp = Encoding.UTF8.GetString(results[i].Content);
//This string is having the xml in string format. Convert it into the xml via XmlDocument
XmlDocument doc = new XmlDocument();
doc.LoadXml(temp);
//perform the needful operations
//...............
//...............
//...............
}
Hope this helps... Do keep me updated about your views and queries.
A comprehensive and exhaustive list of avaliable z39.50, sru and srw servers is given in indexdata website. Another list having avaliable z39.50 free softwares is in loc website.