As per Relevance of the word relation , we have this rfc below:
Network Working Group J.
Request for Comments : 2259 Epic Systems
Category: Informational J.
Bell Labs, Lucent
January 1998
Simple Nomenclator Query Protocol (SNQP
Status of this
This memo provides information for the Internet community . It
not specify an Internet standard of any kind. Distribution of
memo is unlimited
Copyright
Copyright (C) The Internet Society (1998). All Rights Reserved
The Simple Nomenclator Query Protocol (SNQP) allows a client
communicate with a descriptive name service or other relational-
query service. The protocol is useful to services that search
data repositories for query responses. Clients can pose queries
relations, list descriptions of relations, and obtain advice
reducing the search time and cost of their queries. Clients
informed of the age of information in caches, and may request
recent information . SNQP provides support for graphical
interfaces. It also supports different types of
operators, so services can use SNQP with a variety of back-
servers, e.g. relational database servers, CCSO servers, and
providing relational views of X.500.
SNQP is an ASCII protocol in the request-reply style of SMTP. It
specifically designed for use with the Nomenclator name
information service, and has been useful elsewhere
1.
The Simple Nomenclator Query Protocol (SNQP) is a protocol
querying servers that search collections of data repositories .
retrieve information from an SNQP server by describing attributes
the information . SNQP servers contact one or many data
to retrieve the response to a user query. If the data
Elliott & Ordille Informational [Page 1]
RFC 2259 SNQP January 1998
differ in protocol or data format, it is responsibility of the
server to translate protocols and data formats to provide one
integrated answer to the user's query
SNQP servers share the protocol needs of centralized
repositories that answer queries with locally stored data.
servers also require specialized protocol features due to
distributed search characteristics
In highly distributed environments , it is unreasonable to expect
data repositories that need to be searched to be available
queries are posed. SNQP servers require facilities for
partial results in the presence of communications errors with
repositories . The partial results must indicate how to resubmit
query only to those data repositories that are unavailable
In addition , users may pose queries without realizing the cost of
search for query responses. SNQP provides facilities for
users of query costs and advising them on limiting that cost.
and advice are returned before queries are executed
Finally, SNQP servers may cache data and meta-data to speed
responses. Servers can inform users of the t-bound for their
response . A t-bound is the time after which changes may
occurred to the data that are not reflected in the query
[6,2]. A t-bound is the time of the oldest cache entry used
calculate the response . Users can request that query responses
more current then a particular t-bound. Making such a
flushes older items from the cache
SNQP provides support for graphical user interfaces. It
supports different types of comparison operators, so SNQP servers
query a variety of back-end data repositories , e.g.
databases, CCSO servers [3], and servers providing relational
of X.500 [10].
SNQP is a connection -oriented protocol . A client initiates a
session with an SNQP server by making a TCP connection to a well
known port. The client then executes a series of SNQP commands
These commands are listed briefly in Table 1. Section 2
some typical scenarios for using these commands , and Section 3
describes the commands fully. The server replies to each
using the theory of reply codes described for the Simple
Transfer Protocol (SMTP) [9]. The theory of reply codes and
defined reply codes are described in Section 4.
Elliott & Ordille Informational [Page 2]
RFC 2259 SNQP January 1998
---------------------------------------------------------------------
Command
---------------------------------------------------------------------
advice Provide advice on query costs without
query
attributes List the attributes for a relation
compare Set type of comparison operation
help Explain the SNQP commands
imagui Format replies for a graphical user interface
next Stop processing current query, continue with
query in block
noadvice Provide responses to queries. Do not
on costs
noimagui Format replies for people
query Submit a block of one or more SQL query statements
relations List the relations available through the
server
stop End processing of current query, and cancel
queries remaining in block
quit Terminate the query session
Table 1: SNQP
---------------------------------------------------------------------
SNQP queries are posed in SQL, a standard relational database
language [4,12]. Information that is obtained through SNQP
is organized by type into database relations. SQL queries may
have more functionality then a server supports or an
demands. Moreover, advice on query costs, some types of
operations or t-bounds may not be supported by a particular server
SNQP defines a minimal subset of functionality for a working
protocol . Functionality beyond this subset is optional .
that do not support optional functionality must return replies
indicate this to the user. The required and optional features
SNQP are summarized in Section 5.
SNQP was specifically designed for use with the Nomenclator name
information service [8,7,5]. Nomenclator produces query responses
integrating information from data repositories with
protocols and data formats. It constrains the searches for
responses through a variety of distributed indexing techniques .
has also been found useful elsewhere, even as a query language for
single data repository
SNQP is defined for US-ASCII only, and use with other character
will require further work
Elliott & Ordille Informational [Page 3]
RFC 2259 SNQP January 1998
Section 6 concludes this document with a description of
considerations
2.
This section illustrates the basic SNQP commands by
several client scenarios. The scenarios include a new user, a
who prefers CCSO style comparisons and more current responses,
graphical user interface program, a user with a change of mind, and
user worried about costs. Although SNQP will work for a human
on a bare connection (like one provided by telnet), it also works
client programs . Several of these programs have been written
provide enhanced interfaces
2.1 New
A new SNQP user will first make a tcp connection to an SNQP server
For purposes of illustration, we will assume that the user makes
connection with the Unix telnet command, and that the server
located at nomen.research .bell-labs.com on port 4224. The user
a relation command to discover what relations are available , and
attributes command to discover the attributes for a
relation . The user eventually asks for people with a given name
"J*" and a surname of "Ordille" who work for "Lucent Tech*".
response is current through June 11, 1996 at 11 p.m. EDT. Figure 1
and Figure 1b provide this scenario
Elliott & Ordille Informational [Page 4]
RFC 2259 SNQP January 1998
---------------------------------------------------------------------
> telnet nomen.research .bell-labs.com 4224
Trying 135.104.70.9...
Connected to nomen.research .bell-labs.com
Escape character is '^]'.
220 nomen.research .bell-labs.com Nomenclator Query Service
211-There is 1 relation defined
211
attributes
212-There are 20 attributes in relation "People":
212-Given_
212-Middle_
212-
212-Name_
212-
212-
212-
212-
212-
212-
212-
212-State_or_
212-Postal_
212-
212-
212-
212-
212-
212-Last_
212
Figure 1a: New User Queries
---------------------------------------------------------------------
Elliott & Ordille Informational [Page 5]
RFC 2259 SNQP January 1998
---------------------------------------------------------------------
350 Send the query text, end with .
select * from People
given_name = "J*" and surname = "Ordille"
organization = "Lucent Tech*";
.
351 Partial response follows, ended with .
Given_Name:
Middle_Name: J
Surname:
Title:
Organization : Lucent
Division: Bell
Department : Computing Sciences Research
Building : 2C-301
Street: 700 Mountain
City: Murray
State_or_Province: New
Postal_Code: 07974
Country: United
Phone: +1 908 582 7114
Email: joann@bell-labs.
Source: nomen://bell-labs.com:17036/email=joann@bell-labs.
.
250 All queries processed. Current through 11-Jun-1996 23:00 EDT
221 nomen.research .bell-labs.com closing transmission
Connection closed by foreign host
Figure 1b: New User Queries
(continued
---------------------------------------------------------------------
2.2 User with CCSO and Currentness
A user who is accustomed to CCSO name servers prefers CCSO word-
matching within attribute strings. Each word in the query string
an attribute must appear in some order in the response string.
wildcard "*" matches any substring within a word. The
Elliott & Ordille Informational [Page 6]
RFC 2259 SNQP January 1998
matching , illustrated in Figure 1b, is exact matching of a
string. The query string may include "*" wildcards which match
substring within the response string. Both types of matching
case insensitive
In Figure 2, the CCSO-style user connects to the SNQP server,
csso matching , and requests some information about Ordille who
in research at a lab division of some company. The request asks
information that is more current than June 11, 1996 at 11 p.m. if
is available
---------------------------------------------------------------------
compare
213 Performing ccso equality
query 11-Jun-1996 23:00
350 Send the query text, end with .
select given_name, surname, organization , division, department
email from
where surname = "Ordille" and department = "research
and division = "lab*";
.
351 Partial response follows, ended with .
Given_Name:
Surname:
Organization : Lucent
Division: Bell
Department : Computing Sciences Research
Email: joann@bell-labs.
.
250 All queries processed. Current through 12-Jun-1996 22:35 EDT
Figure 2: User with CCSO Preferences Queries
---------------------------------------------------------------------
2.3 Graphical User Interface
A user designs a Windows program as a front end to the SNQP server
In Figure 3, the program requests replies formatted for a
user interface program. The program submits two SQL queries,
Elliott & Ordille Informational [Page 7]
RFC 2259 SNQP January 1998
receives detailed responses that indicate the type and position
errors. The error messages are discussed in more detail in
3.
---------------------------------------------------------------------
214 GUI responses
350 Send the query text, end with .
select * from Peple where name = "Elliott";
.
735 00000001a000015 e Unknown relation , "Peple
735 00000001a000027 e Attribute "name" not found in any relation used
250 All queries processed. Current through 12-Jun-1996 22:35 EDT
350 Send the query text, end with .
select * from People wher surname = "Elliott";
.
730 00000001a000022 e syntax
730 00000001a000027 e syntax
730 00000001a000037 e syntax
730 00000001a000039 e syntax
250 All queries
Figure 3: Graphical User Interface Program Queries
---------------------------------------------------------------------
2.4 User Changes
An exuberant user decides to search everywhere for family members
then look up a friend who works at Epic Systems, and finally
everywhere for an old school friend. Once the query set starts,
user realizes the folly of searching everywhere, stops the
Elliott & Ordille Informational [Page 8]
RFC 2259 SNQP January 1998
query, executes the second query and then stops executing the
block. This scenario is illustrated in Figure 4. The t-bound
represented by in this scenario due to space restrictions
---------------------------------------------------------------------
350 Send the query text, end with .
select * from people where surname = "Smith";
select given_name, surname, email from
where surname = "Elliott
and organization = "Epic Systems*";
select * from people where surname = "Brown";
.
352 Starting next query. Any pending responses discarded
351 Partial response follows, ended with .
Given_Name:
Surname:
Email: jim@apocalypse.
.
352 Beginning next query. Previous current through .
251 All pending queries and responses
Figure 4: User Changes Mind About Submitted
---------------------------------------------------------------------
2.5 User Worries About
In Figure 5a, the exuberant user decides to apply more caution,
asks for advice on searching for a friend named "Susan Brown".
user can not recall the name of the organization where Susan works
but remembers that the state name begins with "I". The
response lists the locations of the data repositories that will
contacted. These locations can be supplied to the SNQP server
the "source" attribute . Each location is followed by a blank and
descriptive phrase for the data repository . Continuing in Figure 5b
the SNQP server also supplies a list of attributes that may
Elliott & Ordille Informational [Page 9]
RFC 2259 SNQP January 1998
the query further. The user recognizes the name Northeastern,
submits the query directly to that location . The user could
have added "organization = "Northeastern*"" to the original query
Other advice options are described in Section 3.
---------------------------------------------------------------------
214 Basic advice enabled. Query responses disabled
350 Send the query text, end with .
select * from people where surname = "Brown"
given_name = "Susan"
state_or_province = "I*";
.
354 The query will contact 8 data repositories , ended with .
ccso://ns.dacc.cc.il.us:105/* Danville Area Community
ccso://ns.eiu.bgu.edu:105/* Eastern Illinois
ccso://ns.ilstu.edu:105/* Illinois State
ccso://ns.imsa.edu:105/* Illinois Math and Science
ccso://ns.ne.edu:105/* Northeastern Illinois
ccso://ns.uiuc.edu:105/* University of Illinois at Urbana-
ccso://ns.iup.edu:105/* Indiana University of
ccso://ph.indstate.edu:105/* Indiana State
.
Figure 5a: User Asks About Costs Before Executing
---------------------------------------------------------------------
Elliott & Ordille Informational [Page 10]
RFC 2259 SNQP January 1998
---------------------------------------------------------------------
355 There are 8 attributes that may constrain the query, ended with .
State_or_
Postal_
.
250 All queries processed. Current through 12-Jun-1996 22:35 EDT
214 Query responses returned . Advice disabled
350 Send the query text, end with .
select * from people where surname = "Brown"
given_name = "Susan"
state_or_province = "I*"
source ="ccso://ns.neiu.bgu.edu:105/*";
.
351 Partial response follows, ended with .
Given_Name:
Middle_Name: W
Surname:
Organization : Northeastern Illinois
Email: sw-brown@ne.
Source: ccso://ne.edu:105/alias=SW-
.
250 All queries processed. Current through 12-Jun-1996 22:35 EDT
Figure 5b: User Asks About Costs Before Executing
---------------------------------------------------------------------
Elliott & Ordille Informational [Page 11]
RFC 2259 SNQP January 1998
3.
SNQP commands are case insensitive and terminated with a newline
or carriage return . In the following descriptions,
commands are in upper case and SNQP replies are in mixed case.
in a command list are separated by blanks
Most SNQP replies are short. They have a rely code (see Section 4),
followed by a continuation character and reply text. If
continuation character is blank, the reply is complete . If
continuation character is a dash ("-"), the reply continues on
next line. Text within the reply can vary, but the reply
remains the same. A two line reply example is given below
---------------------------------------------------------------------
nnn-Message
nnn Message
---------------------------------------------------------------------
In some cases commands or replies may be long, so
commands /replies use the '.'-terminated block structure that is
for message bodies in SMTP. Blocks are comprised of lines of
that constitute the command/reply. Blocks are terminated with
period on a line by itself
SNQP generally ignores blank lines in both directions, except
blanks lines separate tuples within query response blocks
Whenever a time is listed in a command or response , it has
format
---------------------------------------------------------------------
DD-MMM-YYYY HH:MM
---------------------------------------------------------------------
where DD is the day, MMM are the first three characters of the month
YYYY is the year, HH the hours on a 24 hour clock, MM the minutes
and ZZZ the commonly used US timezone abbreviations. If time zone
unspecified in a command, the timezone of the SNQP server is assumed
SNQP servers support a source attribute in every relation .
queries, the source attribute directs the SNQP server to a
data repository . In query responses, the source attribute
the origin of the information in a tuple. In advice and
Elliott & Ordille Informational [Page 12]
RFC 2259 SNQP January 1998
messages , the source attribute is provided so the client can
the source in later queries. The source attribute has two
forms
---------------------------------------------------------------------
<protocol >://:
<protocol >://:/
---------------------------------------------------------------------
<protocol > identifies the protocol used to contact the
repository . The data repository can be (was) contacted at
name> and . When present, identifies a
entry in the data repository . It is missing when the data
does not have an attribute that uniquely identifies its entries
Although the source string is similar to a URL, the protocols
may or may not be supported by World-Wide Web browsers. An
should be made to keep the protocol identifiers consistent
accepted standards , but in the end they are specific to SNQP servers
When a connection is established with an SNQP server, the
returns the following greeting where is the domain
of the server host, e.g. nomen.research .bell-labs.com,
is the name of the service, e.g. Nomenclator
---------------------------------------------------------------------
220 Query Service
---------------------------------------------------------------------
The following sections describe each command in detail. The
are ordered alphabetically. Typical reply messages are
with each command. Exceptional error conditions, for example
errors or rejection of connections due to load, may sometimes occur
These error replies are documented in Section 4.
Elliott & Ordille Informational [Page 13]
RFC 2259 SNQP January 1998
3.1
---------------------------------------------------------------------
214 Basic advice enabled. Query responses disabled
514 Advice not
ADVICE <RELATION > <ATTRIBUTE
214 Advice enabled for "<attribute >" in "<relation >"
553 Unknown
554 Unknown
514 Advice not available for "<attribute >"
---------------------------------------------------------------------
In all cases, advice disables query searches. When queries
submitted, advice is returned about the cost of the query or ways
constraining the query further. There are two forms of the
command
The first form of command does not include an attribute name.
an SQL query is processed, the SNQP server returns a list of
repositories that it will contact. It also returns a list
attributes that may constrain the query further. The specific
of the attributes will determine whether the query is
further. If advice is not available from the server, an error
returned
The second form of advice includes the name of a relation and
name of an attribute in that relation . SQL queries return a list
possible values for the attribute . The list may be complete , or
only include values that are known to constrain the search.
distinction is described further in the query command. If advice
not available on the attribute or the relation or attribute
unknown, an error is returned . When advice is not available on
attribute , basic advice and advice on other attributes may
available
Basic advice and advice for one or more attributes can be
simultaneously. They are not mutually exclusive
The advice command is useful to application programs which
lists of alternatives to the user. A query-form program can
advice for an attribute , submit an empty query, and obtain the
of options for the attribute . The list will indicate whether it is
full list of all values for the attribute , or a constraint list
Elliott & Ordille Informational [Page 14]
RFC 2259 SNQP January 1998
only those values known to constrain queries. The program can
full lists to create a selection menu on its query form. A
can also enable basic advice, submit the query, and then ask the
to select the data repositories to search from the resulting list
3.2
---------------------------------------------------------------------
ATTRIBUTES <RELATION >
212-There are attributes in relation "<RELATION >":
212-<Attribute -name
212-<Attribute -name
212 Current through
553 Unknown relation . Current through .
556 T-bounds not
---------------------------------------------------------------------
The attributes command lists the attributes defined for the
relation . Since characteristics of relations may be defined
the SNQP server and cached there, the user may ask for an answer
is more recent than . The SNQP server will endeavor to
this information . The first line of the reply notes the number
attributes . Subsequent lines list the attribute names.
information in the response is current through the time returned ,
may have changed after that time. Accepting requests to improve
t-bound and indicating the t-bound of the result are optional
SNQP servers
If the relation is unknown, an error is returned . If
submitted when t-bounds are not supported , an error is returned
3.3
---------------------------------------------------------------------
COMPARE <COMPARISON -TYPE
213 Performing <COMPARISON -TYPE>
555 Unknown comparison
---------------------------------------------------------------------
The compare command lists the type of equality comparison
for SQL queries. The compare command can be followed by a
type to set the type. Reply 555 is returned if the comparison
Elliott & Ordille Informational [Page 15]
RFC 2259 SNQP January 1998
is unknown or unsupported . "Default" and "CCSO" are
comparison types. The default equality comparison is exact
matching . The query string may include "*" wildcards which match
substring within the response string. The CCSO equality
matches words within strings. Each word in the query string for
attribute must appear in some order in the response string.
are delimited by blank, comma, colon, semi-colon, tab, and newline
The wildcard "*" matches any substring within a word. Both
and word comparisons are case insensitive
3.4
---------------------------------------------------------------------
210-The following commands are available
210-
210
HELP
210->
210 >
500 Sorry, no help available for ""
---------------------------------------------------------------------
The help command returns the list of available commands . If
commands are not supported , for example advice, they should not
listed. Use of unsupported commands should still return
informative error message. Help can be followed by a command
for information on that command. If no help is available for
command or the command does not exist, Reply 500 is returned
3.5
---------------------------------------------------------------------
215 GUI responses
---------------------------------------------------------------------
The imagui command informs the server that the client is a
user interface (GUI). The client requests more comprehensive
program-oriented errors and progress reports. It replies that
responses are enabled. See Section 4 for more information on
responses
Elliott & Ordille Informational [Page 16]
RFC 2259 SNQP January 1998
3.6
---------------------------------------------------------------------
353 Starting next query. Any pending responses discarded
450 No query in
---------------------------------------------------------------------
The next command stops processing of the current SQL query.
starts the next SQL query in the block submitted with the last
command. If none remain, the query command is completed. An
is returned if no query is in progress
3.7
---------------------------------------------------------------------
216 Query responses enabled. Advice disabled
---------------------------------------------------------------------
The noadvice command disables advice for query commands .
activates query searches, so queries will return responses. See
advice command for more information
3.8
---------------------------------------------------------------------
215 GUI responses
---------------------------------------------------------------------
The noimagui command disables detailed messages to a graphical
interface program. It replies that GUI responses are disabled.
Section 4 for more information on GUI responses
3.9
The query command behaves differently depending on whether
or advice are enabled. We first describe the submission of a
and the possible immediate error responses. We then describe
Elliott & Ordille Informational [Page 17]
RFC 2259 SNQP January 1998
possible replies to the query command when responses are enabled.
finish by describing the possible replies to the query command
advice is enabled
---------------------------------------------------------------------
QUERY
350 Send query text, end with .
450 Query already in
552 Query blocks are limited to one SQL
556 T-bounds not
---------------------------------------------------------------------
The query command submits a block of SQL queries to the SNQP server
Each SQL query must be terminated with a semi-colon, and the
block is terminated with a line containing a single period.
characters in query string constants can be included using the
language conventions , e.g. "\n" is the newline character
Since a variety of cached information can be used in processing
SQL queries, the user may ask for answers that are more recent
. The SNQP server will endeavor to provide this information
Accepting requests to improve a t-bound is optional for SNQP servers
If a query command is already in process, the entire block
refused. If multiple SQL queries are submitted in one block to
server that does not support multi-query blocks, an error
returned . If is submitted when t-bounds are not supported ,
error is returned
---------------------------------------------------------------------
351 Partial response follows ended with .
352 Beginning next query. Previous query current through .
250 All queries processed. Current through .
653 <Communications err> with <location > <location description
660 from <location > <location description
700
750 semantic error
761 <Requirements Error> for <location > <location description
---------------------------------------------------------------------
Elliott & Ordille Informational [Page 18]
RFC 2259 SNQP January 1998
Responses are returned in blocks as they arrive from
repositories . Reply 351 begins a response block. Response
are terminated with periods. Tuples are sent within the block as
list of attribute name and value pairs
---------------------------------------------------------------------
<attribute -name>: <attribute -value
: <attribute -value
---------------------------------------------------------------------
Only the first line of a multi-line attribute returns
<attribute -name>. Successive tuples are separated with blank lines
Attributes with null or blank values are suppressed at the option
the SNQP server
In between response blocks, error replies can be reported .
653, 660 and 761 are examples of such errors. Reply 653 reports
communication error with the data repository identified by the
location and described by the associated string. Reply 660 reports
error returned by a data repository . Reply 761 reports a
requirement of the data repository that the query failed to satisfy
Reply 761 reflects comparison of the query with known
of the data repository by the SNQP server. For example, some
repositories refuse queries that do not contain a specific subset
attributes in the relation . Other replies are possible . It is
to check the the type and severity of the reply against the theory
reply codes in Section 4.
When an SQL query in a block is successfully completed, the
server sends Reply 352 to indicate that the next query is
started. Reply 352 reports the t-bound of the previous query if
is available . Reply 352 is sent even if the previous query
due to permanent errors. The one exception is that permanent
generated by the next or stop command supersede Reply 352.
When all SQL queries are complete , the SNQP server sends Reply 250
indicate that all queries have been processed. A query
containing one query that has no responses will only return
250. Reply 250 reports the t-bound of the last SQL query in
block if it is available . Reply 250 is sent even if the last
in the block terminated due to permanent errors. The one
is that permanent errors generated by the stop command
Reply 352.
Elliott & Ordille Informational [Page 19]
RFC 2259 SNQP January 1998
Note that this command follows the convention that "intermediate
reply codes, as defined in Section 4, are used until the SQL query
complete . Final query completion error codes abort the processing
the SQL query. Examples of these errors include parsing
(Reply 700) and semantic errors (Reply 750) in the SQL query.
SNQP server will attempt to continue with the next query if possible
The block of queries will be terminated with Reply 250 or 251 (
the stop command) to indicate that another query will be accepted
Indicating the t-bound of a query response is optional for
servers
---------------------------------------------------------------------
354-The query will contact data repositories , ended with .
<location > <location -description
355-There are attributes that may constrain the query, ended with .
<attribute -name
356-There are possible values for "<attribute >", ended with .
<attribute -value
357-There are constraining values for "<attribute >", ended with .
357-<attribute -value
357 <attribute -value
352 Beginning next query. Previous query current through .
250 All queries processed. Current through .
700
750 semantic error
---------------------------------------------------------------------
Different kinds of advice are returned in different blocks.
advice about the number, n, of data repositories that will
searched is returned with Reply 354. Subsequent lines list
and location description for the data repositories that will
searched. The data repository locations can be supplied to the
server using the "source" attribute . Each location is followed by
blank and a descriptive phrase for the data repository
Basic advice about the attributes that may constrain the query
returned with reply code 355. The first line of the reply
the number, n, of attributes. Subsequent lines list the names of
attributes. The specific values of the attribute will
whether the query is constrained further
Elliott & Ordille Informational [Page 20]
RFC 2259 SNQP January 1998
Advice for a particular attribute has two forms. First, the
may list the n possible values for the attribute in reply 356.
list is complete ; no other values for the attribute exist within
context of the query. Second, the advice may list the n values
the attribute that are known to constrain the query. The list
incomplete; other values of the attribute may exist within
context of the query
When advice for an SQL query in a block is successfully completed
the SNQP server sends reply 352 to indicate that the next query
being started. Reply 352 reports the t-bound of the advice for
previous query if it is available . Reply 352 is sent even if
previous query terminated due to permanent errors. The
exception is that permanent errors generated by the next or
command supersede Reply 352.
When all SQL queries are complete , the SNQP server sends Reply 250
indicate that all queries have been processed. Reply 250 reports
t-bound of the last SQL query in the block if it is available .
250 is sent even if the last query in the block terminated due
permanent errors. The one exception is that permanent
generated by the stop command supersede Reply 352.
Final query completion error codes abort the processing of the
query. Examples of these errors include parsing errors and
errors in the SQL query. The SNQP server will attempt to
with the next query if possible . The block of queries will
terminated with Reply 250 or 251 (from the stop command) to
that another query will be accepted . Indicating the t-bound
advice is optional for SNQP servers
3.10
---------------------------------------------------------------------
RELATIONS
211-There are relations defined
211-<Relation -name
211-<Relation -name
211 Current through .
556 T-bounds not
---------------------------------------------------------------------
The relations command lists the currently available relation names
Since characteristics of relations can be cached, the user may
for an answer that is more recent than . The SNQP server
Elliott & Ordille Informational [Page 21]
RFC 2259 SNQP January 1998
endeavor to provide this information . The first line of the
notes the number of relations . Subsequent lines list
relation names. The information in the response is current
the time returned , but may have changed after that time.
requests to improve a t-bound and indicating the t-bound of
result are optional for SNQP servers
If is submitted when t-bounds are not supported , an error
returned
3.11
---------------------------------------------------------------------
251 All pending queries and responses
450 No query in
---------------------------------------------------------------------
The stop command ends processing of the current SQL query,
cancels any that may have followed it in the last query command.
error is returned if no queries are in progress
3.12
---------------------------------------------------------------------
221 closing transmission
---------------------------------------------------------------------
The quit command ends the session. It closes the TCP
after signing off with the domain name of the SNQP server
4.
Most SNQP replies are short. They have a rely code followed by
continuation character and reply text. If the continuation
is blank, the reply is complete . If the continuation character is
dash ("-"), the reply continues on the next line. Text within
reply can vary, but the reply code remains the same. A two
reply example is given below
Elliott & Ordille Informational [Page 22]
RFC 2259 SNQP January 1998
---------------------------------------------------------------------
nnn-Message
nnn Message
---------------------------------------------------------------------
In some cases commands or replies may be long, so
commands /replies use the '.'-terminated block structure that is
for message bodies in SMTP. Blocks are comprised of lines of
that constitute the command/reply. Blocks are terminated with
period on a line by itself
The theory of reply codes explained for SMTP in RFC-821 is used here
Table 2 defines the reply code structure . Reply codes are
digits, xyz. The x digit indicates the command status. The y
indicates the component of the system that generated the reply.
z digit allows for further distinctions within replies from the
component
---------------------------------------------------------------------
Code
---------------------------------------------------------------------
1yz Positive preliminary reply (not used in SNQP
2yz Positive completion
3yz Positive intermediate
4yz Transient negative completion
5yz Permanent negative completion
6yx Transient negative intermediate
7yx Permanent negative intermediate
x0z Syntax or semantic
x1z Informational
x2z Related to transmission
x3z Formatted (location coded) report for
x4z Status message to be displayed by
x5z Related to query
x6z Related to data
x9z Component generating the error is unknown or
Table 2: Reply Code
---------------------------------------------------------------------
Elliott & Ordille Informational [Page 23]
RFC 2259 SNQP January 1998
The GUI-related reply codes are only used if the server has
informed that it is communicating with a graphical user interface
via the imagui command. For such codes in the x3z space, digit "z
takes on the role of digit "y" in other codes. I.e. 735 are
negative intermediate replies about the query resolver
Table 3a and Table 3b list the defined regular (non-GUI) reply codes
Text messages for the reply codes may vary. The codes are
numerically
---------------------------------------------------------------------
210-The following commands are available
211-There are relations defined
212-There are attributes in relation "<relation >":
213 Performing <comparison -type> type equality
214 Basic advice enabled. Query responses disabled
214 Advice enabled for "<attribute >" in "<relation >"
215 GUI responses
215 GUI responses
216 Query responses enabled. Advice disabled
220 Query Service
221 closing transmission
250 All queries
250 All queries processed. Current through .
251 All pending queries and responses
340 Searching data
350 Send the query text, end with .
351 Partial response follows, ended with .
352 Beginning next query in
352 Beginning next query in batch. Previous current through .
353 Starting next query. Any pending responses discarded
354 The query will contact data repositories , ended with .
355 There are attributes that may constrain the query, ended with .
356 There are possible values for attribute "<attribute >":
357 There are constraining values for attribute "<attribute >":
420 Too many connections in progress. Try later
421 Error in communicating with
450 No query in
451 Cancel
Table 3a: Reply
---------------------------------------------------------------------
Elliott & Ordille Informational [Page 24]
RFC 2259 SNQP January 1998
---------------------------------------------------------------------
450 Query already in
490 Internal error: Invalid query reference
491 System error:
492 Internal error: Out of client table
499 shutting
500 Sorry, no help is available for ""
501 Unknown
502 Too many arguments for this
502 Not enough arguments for this
514 Advice not
514 Advice not available on <attribute
552 Query blocks are limited to one SQL
553 Unknown
553 Unknown relation . Current through .
554 Unknown
555 Unknown comparison
556 T-bounds not
557 Will not list more than data
557 Will not list more than attribute
557 Will not list more than
557 Too many data repositories to
557 Too many attribute values to
557 Too many responses to
557 Too many data repositories to
651 resolver
653 <Communications error> with <location > <location description
660 from <location > <location description
700
750 semantic error message
751 resolver
761 <Requirements error> for <location > <location description
790 Internal error:
Table 3b: Reply
(Continued
---------------------------------------------------------------------
Elliott & Ordille Informational [Page 25]
RFC 2259 SNQP January 1998
Table 4 lists the defined GUI reply codes. Text messages for
reply codes may vary. The codes are sorted numerically.
explanation of the codes follows the table
---------------------------------------------------------------------
331 nnnnnnn!
331 nnnnnnn.mmmmmm
331 nnnnnnn-mmmmmm
730 nnnnnnnammmmmm e
735 nnnnnnnammmmmm e <semantic error message
340
Table 4: GUI Reply
---------------------------------------------------------------------
In Table 4, nnnnnnn is the line number in a query block, and
is the column in the line. Both numbers begin counting with 1.
exclamation point response directs the program to list
after line n. The period response directs the program to break
n at column m. The hyphen response directs the program to flag
n at column m. Replies 730 and 735 direct the GUI to indicate
parsing or semantic error at line n, column m. Response 340
status information that can be displayed immediately in the GUI'
status line. A sample status message is one that indicates
data repository is being contacted
5. Protocol
SQL queries may often have more functionality then a server
or an application demands. Moreover, query blocks larger than
SQL query, advice on query costs, some types of comparison
or t-bounds need not be supported by a particular server.
defines a minimal subset of functionality for a working
protocol . Functionality beyond this subset is optional .
that do not support optional functionality must return replies
indicate this to the user
Table 5 lists the minimum functionality for an SNQP server
Elliott & Ordille Informational [Page 26]
RFC 2259 SNQP January 1998
---------------------------------------------------------------------
Command
---------------------------------------------------------------------
advice Not supported
attributes List the attributes for a relation
compare List type of comparison operation . At
one of CCSO and default comparison types
be supported . Wildcards in SQL query
can be rejected by the query command with
appropriate semantic error message
help Explain the available SNQP commands
imagui Not supported
next Not supported
noadvice Supported , but has no effect since
is not supported
noimagui Supported , but has no effect since
is not supported
query Submit a block containing one SQL query statement
The minimum supported SQL query statement
a selection query that performs
comparisons between attribute values
constant strings. Conjunctions of such
are supported . The minimum SQL query does not
projections, but returns all the
for matching tuples
relations List the relations available through the
server
stop End processing of current query
quit Terminate the query session
Table 5: Minimum SNQP Server
(Commands do not support t-bounds
---------------------------------------------------------------------
6. Security
SNQP clients and servers depend on the Domain Name Service. They
subject to all the security issues that arise in that context.
version of the SNQP protocol does not define procedures
protecting the information communicated to and from an SNQP server
Elliott & Ordille Informational [Page 27]
RFC 2259 SNQP January 1998
7.
[1] American National Standards Institute. "SQL," ANSI
X3.135-1989. 1989.
[2] H. Garcia-Molina, G. Wiederhold. "Read-Only Transactions
a Distributed Database ," ACM Transactions on Database
7(2), pp. 209-234. June 1982.
[3] S. Dorner, P. Pomes. "The CCSO Nameserver : A Description ,"
Computer and Communications Services Office Technical Report
University of Illinois, Urbana, USA. 1992. Available in
current "qi" distribution
packages/ph
[4] J. Levine, T. Mason, D. Brown. "Parsing SQL," lex yacc, 2
ed. O'Reilly and Associates, Inc. 1992.
[5] Ordille, J., "The Internet Nomenclator Project", RFC 2258,
January 1998.
[6] J. Ordille. "Descriptive Name Services for Large Internets,"
Ph. D. Dissertation. University of Wisconsin. 1993.
[7] J. Ordille, B. Miller. "Distributed Active Catalogs
Meta-Data Caching in Descriptive Name Services ,"
International IEEE Conference on Distributed Computing Systems
pp. 120-129. May 1993.
[8] J. Ordille. "Nomenclator Home Page." 1997.
nomenclator/>
[9] Postel, J., "Simple Mail Transfer Protocol ", STD 10, RFC 821,
August 1982.
[10 Yeong, W., Howes, T., and S. Kille. "Lightweight
Access Protocol ", RFC 1777, March 1995.
Elliott & Ordille Informational [Page 28]
RFC 2259 SNQP January 1998
8. Authors'
Jim
Epic Systems
5301 Tokay
Madison, WI 53711
EMail: jim@apocalypse.
Joann J.
Bell Labs, Lucent
Computing Sciences Research
700 Mountain Avenue, Rm 2C-301
Murray Hill, NJ 07974
EMail: joann@bell-labs.
Elliott & Ordille Informational [Page 29]
RFC 2259 SNQP January 1998
9. Full Copyright
Copyright (C) The Internet Society (1998). All Rights Reserved
This document and translations of it may be copied and furnished
others, and derivative works that comment on or otherwise explain
or assist in its implementation may be prepared , copied,
and distributed , in whole or in part, without restriction of
kind, provided that the above copyright notice and this paragraph
included on all such copies and derivative works. However,
document itself may not be modified in any way, such as by
the copyright notice or references to the Internet Society or
Internet organizations , except as needed for the purpose
developing Internet standards in which case the procedures
copyrights defined in the Internet Standards process must
followed , or as required to translate it into languages other
English
The limited permissions granted above are perpetual and will not
revoked by the Internet Society or its successors or assigns
This document and the information contained herein is provided on
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
Elliott & Ordille Informational [Page 30]
if you see any problems within the linking, don't worry be happy,
this is version 0.1 of the Relevance System and you gotta expect some crappy subroutines sometimes,
just be content we did not write this in Java, which would have made this "bigger and better" HAHAHHA.
RFC documents can be found at I.E.T.F.
Relevance System Copyright © 2002 Spectrum WorldResearch
other technical nosh by ServerMasters Corporation
collaboration of BobX