home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_i / draft-ietf-ids-snqp-01.txt < prev    next >
Text File  |  1997-08-07  |  58KB  |  1,676 lines

  1. INTERNET-DRAFT                                               Jim Elliott
  2. draft-ietf-ids-snqp-01.txt                      Epic Systems Corporation
  3. Expires: January 1998                     Joann J. Ordille
  4.                                           Bell Labs, Lucent Technologies
  5.                                 July 1997
  6.  
  7.                 Simple Nomenclator Query Protocol (SNQP)
  8.                   Filename: draft-ietf-ids-snqp-01.txt
  9.  
  10.  
  11. Status of this Memo
  12.  
  13.       This document is an Internet-Draft.  Internet-Drafts are working
  14.       documents of the Internet Engineering Task Force (IETF), its
  15.       areas, and its working groups.  Note that other groups may also
  16.       distribute working documents as Internet-Drafts.
  17.  
  18.       Internet-Drafts are draft documents valid for a maximum of six
  19.       months and may be updated, replaced, or obsoleted by other
  20.       documents at any time.  It is inappropriate to use Internet-
  21.       Drafts as reference material or to cite them other than as ``work
  22.       in progress.''
  23.  
  24.       To learn the current status of any Internet-Draft, please check
  25.       the ``1id-abstracts.txt'' listing contained in the Internet-
  26.       Drafts Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net
  27.       (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East
  28.       Coast), or ftp.isi.edu (US West Coast).
  29.  
  30. Abstract
  31.  
  32.    The Simple Nomenclator Query Protocol (SNQP) allows a client to
  33.    communicate with a descriptive name service or other relational-style
  34.    query service.  The protocol is useful to services that search many
  35.    data repositories for query responses.  Clients can pose queries on
  36.    relations, list descriptions of relations, and obtain advice on
  37.    reducing the search time and cost of their queries.  Clients are
  38.    informed of the age of information in caches, and may request more
  39.    recent information.  SNQP provides support for graphical user
  40.    interfaces.  It also supports different types of comparison
  41.    operators, so services can use SNQP with a variety of back-end
  42.    servers, e.g. relational database servers, CCSO servers, and servers
  43.    providing relational views of X.500.
  44.  
  45.    SNQP is an ASCII protocol in the request-reply style of SMTP.  It was
  46.    specifically designed for use with the Nomenclator name and
  47.    information service, and has been useful elsewhere.
  48.  
  49.  
  50.  
  51.                                                                 [Page 1]
  52.  
  53.  
  54. INTERNET-DRAFT                                                 July 1997
  55.  
  56.  
  57.    Distribution of this document is unlimited.  Comments should be sent
  58.    to the authors.
  59.  
  60. 1. Introduction
  61.  
  62.    The Simple Nomenclator Query Protocol (SNQP) is a protocol for
  63.    querying servers that search collections of data repositories.  Users
  64.    retrieve information from an SNQP server by describing attributes of
  65.    the information.  SNQP servers contact one or many data repositories
  66.    to retrieve the response to a user query.  If the data repositories
  67.    differ in protocol or data format, it is responsibility of the SNQP
  68.    server to translate protocols and data formats to provide one,
  69.    integrated answer to the user's query.
  70.  
  71.    SNQP servers share the protocol needs of centralized data
  72.    repositories that answer queries with locally stored data.  SNQP
  73.    servers also require specialized protocol features due to their
  74.    distributed search characteristics.
  75.  
  76.    In highly distributed environments, it is unreasonable to expect all
  77.    data repositories that need to be searched to be available when
  78.    queries are posed.  SNQP servers require facilities for returning
  79.    partial results in the presence of communications errors with data
  80.    repositories.   The partial results must indicate how to resubmit the
  81.    query only to those data repositories that are unavailable.
  82.  
  83.    In addition, users may pose queries without realizing the cost of the
  84.    search for query responses.  SNQP provides facilities for informing
  85.    users of query costs and advising them on limiting that cost.  Costs
  86.    and advice are returned before queries are executed.
  87.  
  88.    Finally, SNQP servers may cache data and meta-data to speed query
  89.    responses.  Servers can inform users of the t-bound for their query
  90.    response.   A t-bound is the time after which changes may have
  91.    occurred to the data that are not reflected in the query response
  92.    [6,2].  A t-bound is the time of the oldest cache entry used to
  93.    calculate the response.  Users can request that query responses are
  94.    more current then a particular t-bound.  Making such a request
  95.    flushes older items from the cache.
  96.  
  97.    SNQP provides support for graphical user interfaces.  It also
  98.    supports different types of comparison operators, so SNQP servers can
  99.    query a variety of back-end data repositories, e.g. relational
  100.    databases, CCSO servers [3], and servers providing relational views
  101.    of X.500 [10].
  102.  
  103.    SNQP is a connection-oriented protocol.  A client initiates a query
  104.    session with an SNQP server by making a TCP connection to a well-
  105.  
  106.  
  107.                                                                 [Page 2]
  108.  
  109.  
  110. INTERNET-DRAFT                                                 July 1997
  111.  
  112.  
  113.    known port.  The client then executes a series of SNQP commands.
  114.    These commands are listed briefly in Table 1.  Section 2 provides
  115.    some typical scenarios for using these commands, and Section 3
  116.    describes the commands fully.  The server replies to each command
  117.    using the theory of reply codes described for the Simple Mail
  118.    Transfer Protocol (SMTP) [9]. The theory of reply codes and the
  119.    defined reply codes are described in Section 4.
  120.  
  121.    ---------------------------------------------------------------------
  122.       Command       Description
  123.    ---------------------------------------------------------------------
  124.       advice        Provide advice on query costs without executing
  125.                     query.
  126.       attributes    List the attributes for a relation.
  127.       compare       Set type of comparison operation.
  128.       help          Explain the SNQP commands.
  129.       imagui        Format replies for a graphical user interface.
  130.       next          Stop processing current query, continue with next
  131.                     query in block.
  132.       noadvice      Provide responses to queries.  Do not advise
  133.                     on costs.
  134.       noimagui      Format replies for people.
  135.       query         Submit a block of one or more SQL query statements.
  136.       relations     List the relations available through the SNQP
  137.                     server.
  138.       stop          End processing of current query, and cancel any
  139.                     queries remaining in block.
  140.       quit          Terminate the query session.
  141.  
  142.  
  143.                          Table 1: SNQP Commands
  144.  
  145.    ---------------------------------------------------------------------
  146.  
  147.    SNQP queries are posed in SQL, a standard relational database query
  148.    language [4,12].  Information that is obtained through SNQP servers
  149.    is organized by type into database relations.  SQL queries may often
  150.    have more functionality then a server supports or an application
  151.    demands.  Moreover, advice on query costs, some types of comparison
  152.    operations or t-bounds may not be supported by a particular server.
  153.    SNQP defines a minimal subset of functionality for a working SNQP
  154.    protocol.  Functionality beyond this subset is optional.  Servers
  155.    that do not support optional functionality must return replies that
  156.    indicate this to the user.  The required and optional features of
  157.    SNQP are summarized in Section 5.
  158.  
  159.    SNQP was specifically designed for use with the Nomenclator name and
  160.    information service [8,7,5].  Nomenclator produces query responses by
  161.  
  162.  
  163.                                                                 [Page 3]
  164.  
  165.  
  166. INTERNET-DRAFT                                                 July 1997
  167.  
  168.  
  169.    integrating information from data repositories with different
  170.    protocols and data formats.  It constrains the searches for query
  171.    responses through a variety of distributed indexing techniques.  SNQP
  172.    has also been found useful elsewhere, even as a query language for a
  173.    single data repository.
  174.  
  175.    Section 6 concludes this document with a description of security
  176.    considerations.
  177.  
  178.  
  179. 2. Scenarios
  180.  
  181.    This section illustrates the basic SNQP commands by presenting
  182.    several client scenarios.  The scenarios include a new user, a user
  183.    who prefers CCSO style comparisons and more current responses, a
  184.    graphical user interface program, a user with a change of mind, and a
  185.    user worried about costs.  Although SNQP will work for a human client
  186.    on a bare connection (like one provided by telnet), it also works for
  187.    client programs.  Several of these programs have been written and
  188.    provide enhanced interfaces.
  189.  
  190.  
  191. 2.1 New User
  192.  
  193.  
  194.    A new SNQP user will first make a tcp connection to an SNQP server.
  195.    For purposes of illustration, we will assume that the user makes the
  196.    connection with the Unix telnet command, and that the server is
  197.    located at nomen.research.bell-labs.com on port 4224. The user enters
  198.    a relation command to discover what relations are available, and an
  199.    attributes command to discover the attributes for a particular
  200.    relation.  The user eventually asks for people with a given name of
  201.    "J*" and a surname of "Ordille" who work for "Lucent Tech*". The
  202.    response is current through June 11, 1996 at 11 p.m. EDT.  Figure 1a
  203.    and Figure 1b provide this scenario.
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.                                                                 [Page 4]
  220.  
  221.  
  222. INTERNET-DRAFT                                                 July 1997
  223.  
  224.  
  225.    ---------------------------------------------------------------------
  226.  
  227.       > telnet nomen.research.bell-labs.com 4224
  228.       Trying 135.104.70.9...
  229.       Connected to nomen.research.bell-labs.com.
  230.       Escape character is '^]'.
  231.       220 nomen.research.bell-labs.com Nomenclator Query Service ready
  232.  
  233.       relations
  234.       211-There is 1 relation defined:
  235.       211 People
  236.  
  237.       attributes People
  238.       212-There are 20 attributes in relation "People":
  239.       212-Given_Name
  240.       212-Middle_Name
  241.       212-Surname
  242.       212-Name_Suffix
  243.       212-Title
  244.       212-Organization
  245.       212-Division
  246.       212-Department
  247.       212-Building
  248.       212-Street
  249.       212-City
  250.       212-State_or_Province
  251.       212-Postal_Code
  252.       212-Country
  253.       212-Phone
  254.       212-Fax
  255.       212-Email
  256.       212-MHSmail
  257.       212-Last_Modified
  258.       212 Source
  259.  
  260.  
  261.                        Figure 1a: New User Queries Server
  262.  
  263.    ---------------------------------------------------------------------
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.                                                                 [Page 5]
  276.  
  277.  
  278. INTERNET-DRAFT                                                 July 1997
  279.  
  280.  
  281.    ---------------------------------------------------------------------
  282.  
  283.       query
  284.       350 Send the query text, end with .
  285.  
  286.       select * from People where
  287.              given_name = "J*" and surname = "Ordille" and
  288.              organization = "Lucent Tech*";
  289.       .
  290.       351 Partial response follows, ended with .
  291.  
  292.       Given_Name: Joann
  293.       Middle_Name: J.
  294.       Surname: Ordille
  295.       Title: MTS
  296.       Organization: Lucent Technologies
  297.       Division: Bell Laboratories
  298.       Department: Computing Sciences Research Center
  299.       Building: 2C-301
  300.       Street: 700 Mountain Avenue
  301.       City: Murray Hill
  302.       State_or_Province: New Jersey
  303.       Postal_Code: 07974
  304.       Country: United States
  305.       Phone: +1 908 582 7114
  306.       Email: joann@bell-labs.com
  307.       Source: nomen://bell-labs.com:17036/email=joann@bell-labs.com
  308.  
  309.       .
  310.       250 All queries processed.  Current through 11-Jun-1996 23:00 EDT.
  311.  
  312.       quit
  313.       221 nomen.research.bell-labs.com closing transmission channel
  314.  
  315.       Connection closed by foreign host.
  316.  
  317.  
  318.                       Figure 1b: New User Queries Server
  319.                                  (continued)
  320.  
  321.    ---------------------------------------------------------------------
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.                                                                 [Page 6]
  332.  
  333.  
  334. INTERNET-DRAFT                                                 July 1997
  335.  
  336.  
  337. 2.2 User with CCSO and Currentness Preferences
  338.  
  339.    A user who is accustomed to CCSO name servers prefers CCSO word-based
  340.    matching within attribute strings.  Each word in the query string for
  341.    an attribute must appear in some order in the response string.  The
  342.    wildcard "*" matches any substring within a word.  The default
  343.    matching, illustrated in Figure 1b, is exact matching of a query
  344.    string.  The query string may include "*" wildcards which match any
  345.    substring within the response string.  Both types of matching are
  346.    case insensitive.
  347.  
  348.    In Figure 2, the CCSO-style user connects to the SNQP server, enables
  349.    csso matching, and requests some information about Ordille who works
  350.    in research at a lab division of some company.  The request asks for
  351.    information that is more current than June 11, 1996 at 11 p.m. if it
  352.    is available.
  353.  
  354.    ---------------------------------------------------------------------
  355.  
  356.       compare ccso
  357.       213 Performing ccso equality comparisons
  358.  
  359.       query 11-Jun-1996 23:00
  360.       350 Send the query text, end with .
  361.  
  362.       select given_name, surname, organization, division, department,
  363.              email from People
  364.              where surname = "Ordille" and department = "research"
  365.              and division = "lab*";
  366.       .
  367.  
  368.       351 Partial response follows, ended with .
  369.  
  370.       Given_Name: Joann
  371.       Surname: Ordille
  372.       Organization: Lucent Technologies
  373.       Division: Bell Laboratories
  374.       Department: Computing Sciences Research Center
  375.       Email: joann@bell-labs.com
  376.  
  377.       .
  378.       250 All queries processed.  Current through 12-Jun-1996 22:35 EDT.
  379.  
  380.              Figure 2: User with CCSO Preferences Queries Server
  381.  
  382.    ---------------------------------------------------------------------
  383.  
  384.  
  385.  
  386.  
  387.                                                                 [Page 7]
  388.  
  389.  
  390. INTERNET-DRAFT                                                 July 1997
  391.  
  392.  
  393. 2.3 Graphical User Interface Program
  394.  
  395.    A user designs a Windows program as a front end to the SNQP server.
  396.    In Figure 3, the program requests replies formatted for a graphical
  397.    user interface program.  The program submits two SQL queries, and
  398.    receives detailed responses that indicate the type and position of
  399.    errors.  The error messages are discussed in more detail in Section
  400.    3.
  401.  
  402.    ---------------------------------------------------------------------
  403.  
  404.       imagui
  405.       214 GUI responses enabled
  406.  
  407.       query
  408.       350 Send the query text, end with .
  409.  
  410.       select * from Peple where name = "Elliott";
  411.       .
  412.       735 00000001a000015 e Unknown relation, "Peple"
  413.  
  414.       735 00000001a000027 e Attribute "name" not found in any relation used.
  415.  
  416.  
  417.       250 All queries processed.  Current through 12-Jun-1996 22:35 EDT.
  418.  
  419.       query
  420.       350 Send the query text, end with .
  421.  
  422.       select * from People wher surname = "Elliott";
  423.       .
  424.       730 00000001a000022 e syntax error
  425.  
  426.       730 00000001a000027 e syntax error
  427.  
  428.       730 00000001a000037 e syntax error
  429.  
  430.       730 00000001a000039 e syntax error
  431.  
  432.  
  433.       250 All queries processed
  434.  
  435.        Figure 3: Graphical User Interface Program Queries Server
  436.  
  437.    ---------------------------------------------------------------------
  438.  
  439.  
  440.  
  441.  
  442.  
  443.                                                                 [Page 8]
  444.  
  445.  
  446. INTERNET-DRAFT                                                 July 1997
  447.  
  448.  
  449. 2.4 User Changes Mind
  450.  
  451.    An exuberant user decides to search everywhere for family members,
  452.    then look up a friend who works at Epic Systems, and finally search
  453.    everywhere for an old school friend.  Once the query set starts, the
  454.    user realizes the folly of searching everywhere, stops the first
  455.    query, executes the second query and then stops executing the query
  456.    block.  This scenario is illustrated in Figure 4.  The t-bound is
  457.    represented by <time> in this scenario due to space restrictions.
  458.  
  459.    ---------------------------------------------------------------------
  460.  
  461.       query
  462.       350 Send the query text, end with .
  463.  
  464.       select * from people where surname = "Smith";
  465.       select given_name, surname, email from people
  466.              where surname = "Elliott"
  467.              and organization = "Epic Systems*";
  468.       select * from people where surname = "Brown";
  469.       .
  470.       next
  471.  
  472.       352 Starting next query.  Any pending responses discarded.
  473.  
  474.       351 Partial response follows, ended with .
  475.  
  476.       Given_Name: Jim
  477.       Surname: Elliott
  478.       Email: jim@apocalypse.com
  479.  
  480.       .
  481.       352 Beginning next query.  Previous current through <time>.
  482.  
  483.       stop
  484.  
  485.       251 All pending queries and responses discarded
  486.  
  487.  
  488.           Figure 4: User Changes Mind About Submitted Queries
  489.  
  490.    ---------------------------------------------------------------------
  491.  
  492.  
  493. 2.5 User Worries About Costs
  494.  
  495.    In Figure 5a, the exuberant user decides to apply more caution, and
  496.    asks for advice on searching for a friend named "Susan Brown".  The
  497.  
  498.  
  499.                                                                 [Page 9]
  500.  
  501.  
  502. INTERNET-DRAFT                                                 July 1997
  503.  
  504.  
  505.    user can not recall the name of the organization where Susan works,
  506.    but remembers that the state name begins with "I".  The advice
  507.    response lists the locations of the data repositories that will be
  508.    contacted. These locations can be supplied to the SNQP server using
  509.    the "source" attribute.  Each location is followed by a blank and a
  510.    descriptive phrase for the data repository. Continuing in Figure 5b,
  511.    the SNQP server also supplies a list of attributes that may constrain
  512.    the query further.  The user recognizes the name Northeastern, and
  513.    submits the query directly to that location.  The user could also
  514.    have added "organization = "Northeastern*"" to the original query.
  515.    Other advice options are described in Section 3.
  516.  
  517.    ---------------------------------------------------------------------
  518.  
  519.       advice
  520.       214 Basic advice enabled.  Query responses disabled.
  521.  
  522.       query
  523.       350 Send the query text, end with .
  524.  
  525.       select * from people where surname = "Brown" and
  526.                                  given_name = "Susan" and
  527.                                  state_or_province = "I*";
  528.       .
  529.  
  530.       354 The query will contact 8 data repositories, ended with .
  531.       ccso://ns.dacc.cc.il.us:105/* Danville Area Community College
  532.       ccso://ns.eiu.bgu.edu:105/* Eastern Illinois University
  533.       ccso://ns.ilstu.edu:105/* Illinois State University
  534.       ccso://ns.imsa.edu:105/* Illinois Math and Science Academy
  535.       ccso://ns.ne.edu:105/* Northeastern Illinois University
  536.       ccso://ns.uiuc.edu:105/* University of Illinois at Urbana-Champaign
  537.       ccso://ns.iup.edu:105/* Indiana University of Pennsylvania
  538.       ccso://ph.indstate.edu:105/* Indiana State University
  539.       .
  540.  
  541.  
  542.           Figure 5a: User Asks About Costs Before Executing Query
  543.  
  544.    ---------------------------------------------------------------------
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.                                                                [Page 10]
  556.  
  557.  
  558. INTERNET-DRAFT                                                 July 1997
  559.  
  560.  
  561.    ---------------------------------------------------------------------
  562.  
  563.       355 There are 8 attributes that may constrain the query, ended with .
  564.       Organization
  565.       Department
  566.       Email
  567.       State_or_Province
  568.       Country
  569.       Postal_Code
  570.       Phone
  571.       Source
  572.       .
  573.  
  574.       250 All queries processed.  Current through 12-Jun-1996 22:35 EDT.
  575.  
  576.       noadvice
  577.       214 Query responses returned.  Advice disabled.
  578.  
  579.       query
  580.       350 Send the query text, end with .
  581.  
  582.       select * from people where surname = "Brown" and
  583.                               given_name = "Susan" and
  584.                                  state_or_province = "I*" and
  585.                                  source ="ccso://ns.neiu.bgu.edu:105/*";
  586.       .
  587.  
  588.       351 Partial response follows, ended with .
  589.  
  590.       Given_Name: Susan
  591.       Middle_Name: W.
  592.       Surname: Brown
  593.       Organization: Northeastern Illinois University
  594.       Email: sw-brown@ne.edu
  595.       Source: ccso://ne.edu:105/alias=SW-Brown
  596.  
  597.       .
  598.       250 All queries processed.  Current through 12-Jun-1996 22:35 EDT.
  599.  
  600.           Figure 5b: User Asks About Costs Before Executing Query
  601.  
  602.    ---------------------------------------------------------------------
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.                                                                [Page 11]
  612.  
  613.  
  614. INTERNET-DRAFT                                                 July 1997
  615.  
  616.  
  617. 3. Commands
  618.  
  619.  
  620.    SNQP commands are case insensitive and terminated with a newline <LF>
  621.    or carriage return <CR>.  In the following descriptions, SNQP
  622.    commands are in upper case and SNQP replies are in mixed case.  Items
  623.    in a command list are separated by blanks.
  624.  
  625.    Most SNQP replies are short.  They have a rely code (see Section 4),
  626.    followed by a continuation character and reply text.  If the
  627.    continuation character is blank, the reply is complete.  If the
  628.    continuation character is a dash ("-"), the reply continues on the
  629.    next line.  Text within the reply can vary, but the reply code
  630.    remains the same.  A two line reply example is given below:
  631.  
  632.    ---------------------------------------------------------------------
  633.  
  634.       nnn-Message1
  635.       nnn Message2
  636.  
  637.    ---------------------------------------------------------------------
  638.  
  639.    In some cases commands or replies may be long, so these
  640.    commands/replies use the '.'-terminated block structure that is used
  641.    for message bodies in SMTP. Blocks are comprised of lines of text
  642.    that constitute the command/reply.  Blocks are terminated with a
  643.    period on a line by itself.
  644.  
  645.    SNQP generally ignores blank lines in both directions, except that
  646.    blanks lines separate tuples within query response blocks.
  647.  
  648.    Whenever a time is listed in a command or response, it has the
  649.    format:
  650.  
  651.    ---------------------------------------------------------------------
  652.  
  653.    DD-MMM-YYYY HH:MM ZZZ
  654.  
  655.    ---------------------------------------------------------------------
  656.  
  657.    where DD is the day, MMM are the first three characters of the month,
  658.    YYYY is the year, HH the hours on a 24 hour clock, MM the minutes,
  659.    and ZZZ the standard abbreviation for the time zone.  If time zone is
  660.    unspecified in a command, the timezone of the SNQP server is assumed.
  661.  
  662.    SNQP servers support a source attribute in every relation.  In
  663.    queries, the source attribute directs the SNQP server to a particular
  664.    data repository.  In query responses, the source attribute indicates
  665.  
  666.  
  667.                                                                [Page 12]
  668.  
  669.  
  670. INTERNET-DRAFT                                                 July 1997
  671.  
  672.  
  673.    the origin of the information in a tuple.  In advice and error
  674.    messages, the source attribute is provided so the client can contact
  675.    the source in later queries.  The source attribute has two possible
  676.    forms:
  677.  
  678.    ---------------------------------------------------------------------
  679.  
  680.    <protocol>://<domain-name>:<port>
  681.  
  682.    <protocol>://<domain-name>:<port>/<tuple-id>
  683.  
  684.    ---------------------------------------------------------------------
  685.  
  686.    <protocol> identifies the protocol used to contact the data
  687.    repository. The data repository can be (was) contacted at <domain-
  688.    name> and <port>.  When present, <tuple-id> identifies a specific
  689.    entry in the data repository.  It is missing when the data repository
  690.    does not have an attribute that uniquely identifies its entries.
  691.    Although the source string is similar to a URL, the protocols listed
  692.    may or may not be supported by World-Wide Web browsers.  An effort
  693.    should be made to keep the protocol identifiers consistent with
  694.    accepted standards, but in the end they are specific to SNQP servers.
  695.  
  696.    When a connection is established with an SNQP server, the server
  697.    returns the following greeting where <domain-name> is the domain name
  698.    of the server host, e.g.  nomen.research.bell-labs.com,  and
  699.    <service-name> is the name of the service, e.g. Nomenclator:
  700.  
  701.    ---------------------------------------------------------------------
  702.  
  703.       220 <domain-name> <snqp-service-name> Query Service ready
  704.  
  705.    ---------------------------------------------------------------------
  706.  
  707.    The following sections describe each command in detail.  The commands
  708.    are ordered alphabetically.  Typical reply messages are explained
  709.    with each command.  Exceptional error conditions, for example system
  710.    errors or rejection of connections due to load, may sometimes occur.
  711.    These error replies are documented in Section 4.
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                                                [Page 13]
  724.  
  725.  
  726. INTERNET-DRAFT                                                 July 1997
  727.  
  728.  
  729. 3.1 Advice
  730.  
  731.    ---------------------------------------------------------------------
  732.  
  733.       ADVICE
  734.       214 Basic advice enabled. Query responses disabled.
  735.       514 Advice not available
  736.  
  737.       ADVICE <RELATION> <ATTRIBUTE>
  738.       214 Advice enabled for "<attribute>" in "<relation>"
  739.       553 Unknown relation
  740.       554 Unknown attribute
  741.       514 Advice not available for "<attribute>"
  742.  
  743.    ---------------------------------------------------------------------
  744.  
  745.    In all cases, advice disables query searches. When queries are
  746.    submitted, advice is returned about the cost of the query or ways of
  747.    constraining the query further.  There are two forms of the advice
  748.    command.
  749.  
  750.    The first form of command does not include an attribute name.  When
  751.    an SQL query is processed, the SNQP server returns a list of data
  752.    repositories that it will contact.  It also returns a list of
  753.    attributes that may constrain the query further.  The specific values
  754.    of the attributes will determine whether the query is constrained
  755.    further.  If advice is not available from the server, an error is
  756.    returned.
  757.  
  758.    The second form of advice includes the name of a relation and the
  759.    name of an attribute in that relation.  SQL queries return a list of
  760.    possible values for the attribute.  The list may be complete, or may
  761.    only include values that are known to constrain the search.  This
  762.    distinction is described further in the query command.  If advice is
  763.    not available on the attribute or the relation or attribute is
  764.    unknown, an error is returned.  When advice is not available on an
  765.    attribute, basic advice and advice on other attributes may be
  766.    available.
  767.  
  768.    Basic advice and advice for one or more attributes can be enabled
  769.    simultaneously. They are not mutually exclusive.
  770.  
  771.    The advice command is useful to application programs which present
  772.    lists of alternatives to the user.  A query-form program can enable
  773.    advice for an attribute, submit an empty query, and obtain the list
  774.    of options for the attribute.  The list will indicate whether it is a
  775.    full list of all values for the attribute, or a constraint list of
  776.    only those values known to constrain queries.  The program can use
  777.  
  778.  
  779.                                                                [Page 14]
  780.  
  781.  
  782. INTERNET-DRAFT                                                 July 1997
  783.  
  784.  
  785.    full lists to create a selection menu on its query form.  A program
  786.    can also enable basic advice, submit the query, and then ask the user
  787.    to select the data repositories to search from the resulting list.
  788.  
  789.  
  790. 3.2 Attributes
  791.  
  792.    ---------------------------------------------------------------------
  793.  
  794.       ATTRIBUTES <RELATION> <TIME>
  795.       212-There are <n> attributes in relation "<RELATION>":
  796.       212-<Attribute-name>
  797.       212-<Attribute-name>
  798.       212 Current through <TIME>
  799.  
  800.       553 Unknown relation.  Current through <TIME>.
  801.       556 T-bounds not supported
  802.  
  803.    ---------------------------------------------------------------------
  804.  
  805.    The attributes command lists the attributes defined for the given
  806.    relation.  Since characteristics of relations may be defined outside
  807.    the SNQP server and cached there, the user may ask for an answer that
  808.    is more recent than <TIME>.  The SNQP server will endeavor to provide
  809.    this information.  The first line of the reply notes the number of
  810.    attributes <n>.  Subsequent lines list the attribute names.  The
  811.    information in the response is current through the time returned, but
  812.    may have changed after that time.  Accepting requests to improve a
  813.    t-bound and indicating the t-bound of the result are optional for
  814.    SNQP servers.
  815.  
  816.    If the relation is unknown, an error is returned.  If <TIME> is
  817.    submitted when t-bounds are not supported, an error is returned.
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.                                                                [Page 15]
  836.  
  837.  
  838. INTERNET-DRAFT                                                 July 1997
  839.  
  840.  
  841. 3.3 Compare
  842.  
  843.    ---------------------------------------------------------------------
  844.  
  845.       COMPARE <COMPARISON-TYPE>
  846.       213 Performing <COMPARISON-TYPE> comparisons
  847.  
  848.       555 Unknown comparison type
  849.  
  850.    ---------------------------------------------------------------------
  851.  
  852.    The compare command lists the type of equality comparison performed
  853.    for SQL queries.  The compare command can be followed by a comparison
  854.    type to set the type.  Reply 555 is returned if the comparison type
  855.    is unknown or unsupported.  "Default" and "CCSO" are defined
  856.    comparison types.  The default equality comparison is exact string
  857.    matching.  The query string may include "*" wildcards which match any
  858.    substring within the response string.  The CCSO equality comparison
  859.    matches words within strings.  Each word in the query string for an
  860.    attribute must appear in some order in the response string.  Words
  861.    are delimited by blank, comma, colon, semi-colon, tab, and newline.
  862.    The wildcard "*" matches any substring within a word.  Both string
  863.    and word comparisons are case insensitive.
  864.  
  865.  
  866. 3.4 Help
  867.  
  868.    ---------------------------------------------------------------------
  869.  
  870.       HELP
  871.       210-The following commands are available:
  872.       210-<comma-separated-command-list>
  873.       210 <comma-separated-command-list>
  874.  
  875.       HELP <COMMAND>
  876.       210-<explanation of <COMMAND>>
  877.       210 <explanation of <COMMAND>>
  878.  
  879.       500 Sorry, no help available for "<COMMAND>"
  880.  
  881.    ---------------------------------------------------------------------
  882.  
  883.    The help command returns the list of available commands. If some
  884.    commands are not supported, for example advice, they should not be
  885.    listed.  Use of unsupported commands should still return an
  886.    informative error message.  Help can be followed by a command name
  887.    for information on that command.  If no help is available for a
  888.    command or the command does not exist, Reply 500 is returned.
  889.  
  890.  
  891.                                                                [Page 16]
  892.  
  893.  
  894. INTERNET-DRAFT                                                 July 1997
  895.  
  896.  
  897. 3.5 Imagui
  898.  
  899.    ---------------------------------------------------------------------
  900.  
  901.       IMAGUI
  902.       215 GUI responses enabled
  903.  
  904.    ---------------------------------------------------------------------
  905.  
  906.    The imagui command informs the server that the client is a graphical
  907.    user interface (GUI).  The client requests more comprehensive,
  908.    program-oriented errors and progress reports. It replies that GUI
  909.    responses are enabled.  See Section 4 for more information on GUI
  910.    responses.
  911.  
  912.  
  913. 3.6 Next
  914.  
  915.    ---------------------------------------------------------------------
  916.  
  917.       NEXT
  918.       353 Starting next query.  Any pending responses discarded.
  919.  
  920.       450 No query in progress
  921.  
  922.    ---------------------------------------------------------------------
  923.  
  924.    The next command stops processing of the current SQL query.  It
  925.    starts the next SQL query in the block submitted with the last query
  926.    command.  If none remain, the query command is completed.  An error
  927.    is returned if no query is in progress.
  928.  
  929.  
  930. 3.7 Noadvice
  931.  
  932.    ---------------------------------------------------------------------
  933.  
  934.       NOADVICE
  935.       216 Query responses enabled.  Advice disabled.
  936.  
  937.    ---------------------------------------------------------------------
  938.  
  939.    The noadvice command disables advice for query commands.  It
  940.    activates query searches, so queries will return responses.  See the
  941.    advice command for more information.
  942.  
  943.  
  944.  
  945.  
  946.  
  947.                                                                [Page 17]
  948.  
  949.  
  950. INTERNET-DRAFT                                                 July 1997
  951.  
  952.  
  953. 3.8 Noimagui
  954.  
  955.    ---------------------------------------------------------------------
  956.  
  957.       NOIMAGUI
  958.       215 GUI responses disabled
  959.  
  960.    ---------------------------------------------------------------------
  961.  
  962.    The noimagui command disables detailed messages to a graphical user
  963.    interface program. It replies that GUI responses are disabled.  See
  964.    Section 4 for more information on GUI responses.
  965.  
  966. 3.9 Query
  967.  
  968.  
  969.    The query command behaves differently depending on whether responses
  970.    or advice are enabled. We first describe the submission of a query
  971.    and the possible immediate error responses.  We then describe the
  972.    possible replies to the query command when responses are enabled.  We
  973.    finish by describing the possible replies to the query command when
  974.    advice is enabled.
  975.  
  976.    ---------------------------------------------------------------------
  977.  
  978.       QUERY <TIME>
  979.       350 Send query text, end with .
  980.  
  981.       450 Query already in progress
  982.       552 Query blocks are limited to one SQL query
  983.       556 T-bounds not supported
  984.  
  985.    ---------------------------------------------------------------------
  986.  
  987.    The query command submits a block of SQL queries to the SNQP server.
  988.    Each SQL query must be terminated with a semi-colon, and the entire
  989.    block is terminated with a line containing a single period.  Special
  990.    characters in query string constants can be included using the C
  991.    language conventions, e.g. "\n" is the newline character.
  992.  
  993.    Since a variety of cached information can be used in processing the
  994.    SQL queries, the user may ask for answers that are more recent than
  995.    <TIME>.  The SNQP server will endeavor to provide this information.
  996.    Accepting requests to improve a t-bound is optional for SNQP servers.
  997.  
  998.    If a query command is already in process, the entire block is
  999.    refused.  If multiple SQL queries are submitted in one block to a
  1000.    server that does not support multi-query blocks, an error is
  1001.  
  1002.  
  1003.                                                                [Page 18]
  1004.  
  1005.  
  1006. INTERNET-DRAFT                                                 July 1997
  1007.  
  1008.  
  1009.    returned.  If <TIME> is submitted when t-bounds are not supported, an
  1010.    error is returned.
  1011.  
  1012.    ---------------------------------------------------------------------
  1013.  
  1014.       351 Partial response follows ended with .
  1015.       352 Beginning next query.  Previous query current through <TIME>.
  1016.       250 All queries processed.  Current through <TIME>.
  1017.  
  1018.       653 <Communications err> with <location> <location description>
  1019.       660 <Error> from <location> <location description>
  1020.  
  1021.       700 <SQL query parsing error>
  1022.       750 <SQL query semantic error>
  1023.       761 <Requirements Error> for <location> <location description>
  1024.  
  1025.    ---------------------------------------------------------------------
  1026.  
  1027.    Responses are returned in blocks as they arrive from data
  1028.    repositories.  Reply 351 begins a response block.  Response blocks
  1029.    are terminated with periods.  Tuples are sent within the block as a
  1030.    list of attribute name and value pairs:
  1031.  
  1032.    ---------------------------------------------------------------------
  1033.  
  1034.    <attribute-name>: <attribute-value>
  1035.                    : <attribute-value>
  1036.  
  1037.    ---------------------------------------------------------------------
  1038.  
  1039.    Only the first line of a multi-line attribute returns the
  1040.    <attribute-name>.  Successive tuples are separated with blank lines.
  1041.    Attributes with null or blank values are suppressed at the option of
  1042.    the SNQP server.
  1043.  
  1044.    In between response blocks, error replies can be reported.  Replies
  1045.    653, 660 and 761 are examples of such errors.  Reply 653 reports a
  1046.    communication error with the data repository identified by the source
  1047.    location and described by the associated string. Reply 660 reports an
  1048.    error returned by a data repository.  Reply 761 reports a known
  1049.    requirement of the data repository that the query failed to satisfy.
  1050.    Reply 761 reflects comparison of the query with known characteristics
  1051.    of the data repository by the SNQP server.  For example, some data
  1052.    repositories refuse queries that do not contain a specific subset of
  1053.    attributes in the relation.  Other replies are possible.  It is best
  1054.    to check the the type and severity of the reply against the theory of
  1055.    reply codes in Section 4.
  1056.  
  1057.  
  1058.  
  1059.                                                                [Page 19]
  1060.  
  1061.  
  1062. INTERNET-DRAFT                                                 July 1997
  1063.  
  1064.  
  1065.    When an SQL query in a block is successfully completed, the SNQP
  1066.    server sends Reply 352 to indicate that the next query is being
  1067.    started.  Reply 352 reports the t-bound of the previous query if it
  1068.    is available. Reply 352 is sent even if the previous query terminated
  1069.    due to permanent errors.   The one exception is that permanent errors
  1070.    generated by the next or stop command supersede Reply 352.
  1071.  
  1072.    When all SQL queries are complete, the SNQP server sends Reply 250 to
  1073.    indicate that all queries have been processed.  A query block
  1074.    containing one query that has no responses will only return Reply
  1075.    250.  Reply 250 reports the t-bound of the last SQL query in the
  1076.    block if it is available.  Reply 250 is sent even if the last query
  1077.    in the block terminated due to permanent errors.   The one exception
  1078.    is that permanent errors generated by the stop command supersede
  1079.    Reply 352.
  1080.  
  1081.    Note that this command follows the convention that "intermediate"
  1082.    reply codes, as defined in Section 4, are used until the SQL query is
  1083.    complete.  Final query completion error codes abort the processing of
  1084.    the SQL query.  Examples of these errors include parsing errors
  1085.    (Reply 700) and semantic errors (Reply 750) in the SQL query.  The
  1086.    SNQP server will attempt to continue with the next query if possible.
  1087.    The block of queries will be terminated with Reply 250 or 251 (from
  1088.    the stop command) to indicate that another query will be accepted.
  1089.    Indicating the t-bound of a query response is optional for SNQP
  1090.    servers.
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.                                                                [Page 20]
  1116.  
  1117.  
  1118. INTERNET-DRAFT                                                 July 1997
  1119.  
  1120.  
  1121.    ---------------------------------------------------------------------
  1122.  
  1123.       354-The query will contact <n> data repositories, ended with .
  1124.       <location> <location-description>
  1125.  
  1126.       355-There are <n> attributes that may constrain the query, ended with .
  1127.       <attribute-name>
  1128.  
  1129.       356-There are <n> possible values for "<attribute>", ended with .
  1130.       <attribute-value>
  1131.  
  1132.       357-There are <n> constraining values for "<attribute>", ended with .
  1133.       357-<attribute-value>
  1134.       357 <attribute-value>
  1135.  
  1136.       352 Beginning next query.  Previous query current through <TIME>.
  1137.       250 All queries processed.  Current through <TIME>.
  1138.  
  1139.       700 <SQL query parsing error>
  1140.       750 <SQL query semantic error>
  1141.  
  1142.    ---------------------------------------------------------------------
  1143.  
  1144.    Different kinds of advice are returned in different blocks.  Basic
  1145.    advice about the number, n, of data repositories that will be
  1146.    searched is returned with Reply 354.  Subsequent lines list location
  1147.    and location description for the data repositories that will be
  1148.    searched.  The data repository locations can be supplied to the SNQP
  1149.    server using the "source" attribute.  Each location is followed by a
  1150.    blank and a descriptive phrase for the data repository.
  1151.  
  1152.    Basic advice about the attributes that may constrain the query is
  1153.    returned with reply code 355.  The first line of the reply includes
  1154.    the number, n, of attributes.  Subsequent lines list the names of the
  1155.    attributes.  The specific values of the attribute will determine
  1156.    whether the query is constrained further.
  1157.  
  1158.    Advice for a particular attribute has two forms.  First, the advice
  1159.    may list the n possible values for the attribute in reply 356.  The
  1160.    list is complete; no other values for the attribute exist within the
  1161.    context of the query.  Second, the advice may list the n values for
  1162.    the attribute that are known to constrain the query.  The list is
  1163.    incomplete; other values of the attribute may exist within the
  1164.    context of the query.
  1165.  
  1166.    When advice for an SQL query in a block is successfully completed,
  1167.    the SNQP server sends reply 352 to indicate that the next query is
  1168.    being started.  Reply 352 reports the t-bound of the advice for the
  1169.  
  1170.  
  1171.                                                                [Page 21]
  1172.  
  1173.  
  1174. INTERNET-DRAFT                                                 July 1997
  1175.  
  1176.  
  1177.    previous query if it is available. Reply 352 is sent even if the
  1178.    previous query terminated due to permanent errors.   The one
  1179.    exception is that permanent errors generated by the next or stop
  1180.    command supersede Reply 352.
  1181.  
  1182.    When all SQL queries are complete, the SNQP server sends Reply 250 to
  1183.    indicate that all queries have been processed.  Reply 250 reports the
  1184.    t-bound of the last SQL query in the block if it is available.  Reply
  1185.    250 is sent even if the last query in the block terminated due to
  1186.    permanent errors.   The one exception is that permanent errors
  1187.    generated by the stop command supersede Reply 352.
  1188.  
  1189.    Final query completion error codes abort the processing of the SQL
  1190.    query.  Examples of these errors include parsing errors and semantic
  1191.    errors in the SQL query.  The SNQP server will attempt to continue
  1192.    with the next query if possible. The block of queries will be
  1193.    terminated with Reply 250 or 251 (from the stop command) to indicate
  1194.    that another query will be accepted.  Indicating the t-bound of
  1195.    advice is optional for SNQP servers.
  1196.  
  1197.  
  1198. 3.10 Relations
  1199.  
  1200.    ---------------------------------------------------------------------
  1201.  
  1202.       RELATIONS <TIME>
  1203.       211-There are <n> relations defined:
  1204.       211-<Relation-name>
  1205.       211-<Relation-name>
  1206.       211 Current through <TIME>.
  1207.  
  1208.       556 T-bounds not supported
  1209.  
  1210.    ---------------------------------------------------------------------
  1211.  
  1212.    The relations command lists the currently available relation names.
  1213.    Since characteristics of relations can be cached, the user may ask
  1214.    for an answer that is more recent than <TIME>.  The SNQP server will
  1215.    endeavor to provide this information.  The first line of the reply
  1216.    notes the number of relations <n>.  Subsequent lines list the
  1217.    relation names. The information in the response is current through
  1218.    the time returned, but may have changed after that time.  Accepting
  1219.    requests to improve a t-bound and indicating the t-bound of the
  1220.    result are optional for SNQP servers.
  1221.  
  1222.    If <TIME> is submitted when t-bounds are not supported, an error is
  1223.    returned.
  1224.  
  1225.  
  1226.  
  1227.                                                                [Page 22]
  1228.  
  1229.  
  1230. INTERNET-DRAFT                                                 July 1997
  1231.  
  1232.  
  1233. 3.11 Stop
  1234.  
  1235.    ---------------------------------------------------------------------
  1236.  
  1237.       STOP
  1238.       251 All pending queries and responses discarded
  1239.  
  1240.       450 No query in progress
  1241.  
  1242.    ---------------------------------------------------------------------
  1243.  
  1244.    The stop command ends processing of the current SQL query, and
  1245.    cancels any that may have followed it in the last query command.  An
  1246.    error is returned if no queries are in progress.
  1247.  
  1248. 3.12 Quit
  1249.  
  1250.    ---------------------------------------------------------------------
  1251.  
  1252.       QUIT
  1253.       221 <domain-name> closing transmission channel
  1254.  
  1255.    ---------------------------------------------------------------------
  1256.  
  1257.    The quit command ends the session.  It closes the TCP connection
  1258.    after signing off with the domain name of the SNQP server.
  1259.  
  1260.  
  1261. 4. Replies
  1262.  
  1263.  
  1264.    Most SNQP replies are short.  They have a rely code followed by a
  1265.    continuation character and reply text.  If the continuation character
  1266.    is blank, the reply is complete.  If the continuation character is a
  1267.    dash ("-"), the reply continues on the next line.  Text within the
  1268.    reply can vary, but the reply code remains the same.  A two line
  1269.    reply example is given below:
  1270.  
  1271.    ---------------------------------------------------------------------
  1272.  
  1273.       nnn-Message1
  1274.       nnn Message2
  1275.  
  1276.    ---------------------------------------------------------------------
  1277.  
  1278.    In some cases commands or replies may be long, so these
  1279.    commands/replies use the '.'-terminated block structure that is used
  1280.    for message bodies in SMTP. Blocks are comprised of lines of text
  1281.  
  1282.  
  1283.                                                                [Page 23]
  1284.  
  1285.  
  1286. INTERNET-DRAFT                                                 July 1997
  1287.  
  1288.  
  1289.    that constitute the command/reply.  Blocks are terminated with a
  1290.    period on a line by itself.
  1291.  
  1292.    The theory of reply codes explained for SMTP in RFC-821 is used here.
  1293.    Table 2 defines the reply code structure.  Reply codes are three
  1294.    digits, xyz.  The x digit indicates the command status.  The y digit
  1295.    indicates the component of the system that generated the reply.  The
  1296.    z digit allows for further distinctions within replies from the same
  1297.    component.
  1298.  
  1299.    ---------------------------------------------------------------------
  1300.       Code  Interpretation
  1301.    ---------------------------------------------------------------------
  1302.  
  1303.       1yz   Positive preliminary reply (not used in SNQP)
  1304.       2yz   Positive completion reply
  1305.       3yz   Positive intermediate reply
  1306.       4yz   Transient negative completion reply
  1307.       5yz   Permanent negative completion reply
  1308.       6yx   Transient negative intermediate reply
  1309.       7yx   Permanent negative intermediate reply
  1310.  
  1311.       x0z   Syntax or semantic problem
  1312.       x1z   Informational reply
  1313.       x2z   Related to transmission channel
  1314.       x3z   Formatted (location coded) report for GUI
  1315.       x4z   Status message to be displayed by GUI
  1316.       x5z   Related to query resolver
  1317.       x6z   Related to data repository
  1318.       x9z   Component generating the error is unknown or suspect
  1319.  
  1320.                      Table 2: Reply Code Structure
  1321.  
  1322.    ---------------------------------------------------------------------
  1323.  
  1324.    The GUI-related reply codes are only used if the server has been
  1325.    informed that it is communicating with a graphical user interface,
  1326.    via the imagui command.   For such codes in the x3z space, digit "z"
  1327.    takes on the role of digit "y" in other codes. I.e. 735 are permanent
  1328.    negative intermediate replies about the query resolver.
  1329.  
  1330.    Table 3a and Table 3b list the defined regular (non-GUI) reply codes.
  1331.    Text messages for the reply codes may vary.  The codes are sorted
  1332.    numerically.
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.                                                                [Page 24]
  1340.  
  1341.  
  1342. INTERNET-DRAFT                                                 July 1997
  1343.  
  1344.  
  1345.    ---------------------------------------------------------------------
  1346.  
  1347.       210-The following commands are available:
  1348.       211-There are <n> relations defined:
  1349.       212-There are <n> attributes in relation "<relation>":
  1350.       213 Performing <comparison-type> type equality comparisons
  1351.       214 Basic advice enabled.  Query responses disabled.
  1352.       214 Advice enabled for "<attribute>" in "<relation>"
  1353.       215 GUI responses enabled
  1354.       215 GUI responses disabled
  1355.       216 Query responses enabled.  Advice disabled.
  1356.  
  1357.       220 <domain-name> <snqp-service-name> Query Service ready
  1358.       221 <domain-name> closing transmission channel
  1359.  
  1360.       250 All queries processed
  1361.       250 All queries processed.  Current through <time>.
  1362.       251 All pending queries and responses discarded
  1363.  
  1364.       340 Searching <n> data repositories
  1365.       350 Send the query text, end with .
  1366.       351 Partial response follows, ended with .
  1367.       352 Beginning next query in batch
  1368.       352 Beginning next query in batch.  Previous current through <time>.
  1369.       353 Starting next query. Any pending responses discarded.
  1370.       354 The query will contact <n> data repositories, ended with .
  1371.       355 There are <n> attributes that may constrain the query, ended with .
  1372.       356 There are <n> possible values for attribute "<attribute>":
  1373.       357 There are <n> constraining values for attribute "<attribute>":
  1374.  
  1375.       420 Too many connections in progress. Try later.
  1376.       421 Error in communicating with <snqp-service-name>
  1377.       450 No query in progress
  1378.       451 Cancel ignored
  1379.       450 Query already in progress
  1380.       490 Internal error: Invalid query reference number
  1381.       491 System error: <error number or message>
  1382.       492 Internal error: Out of client table space
  1383.       499 <snqp-service-name> shutting down
  1384.  
  1385.  
  1386.                         Table 3a: Reply Codes
  1387.  
  1388.    ---------------------------------------------------------------------
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.                                                                [Page 25]
  1396.  
  1397.  
  1398. INTERNET-DRAFT                                                 July 1997
  1399.  
  1400.  
  1401.    ---------------------------------------------------------------------
  1402.  
  1403.       500 Sorry, no help is available for "<command>"
  1404.       501 Unknown command
  1405.       502 Too many arguments for this command
  1406.       502 Not enough arguments for this command
  1407.  
  1408.       514 Advice not available
  1409.       514 Advice not available on <attribute>
  1410.  
  1411.       552 Query blocks are limited to one SQL query
  1412.       553 Unknown relation
  1413.       553 Unknown relation.  Current through <TIME>.
  1414.       554 Unknown attribute
  1415.       555 Unknown comparison type
  1416.       556 T-bounds not supported
  1417.       557 Will not list more than <n> data repositories
  1418.       557 Will not list more than <n> attribute values
  1419.       557 Will not list more than <n> responses
  1420.       557 Too many data repositories to list
  1421.       557 Too many attribute values to list
  1422.       557 Too many responses to list
  1423.       557 Too many data repositories to search
  1424.  
  1425.       651 <Error message from query resolver>
  1426.       653 <Communications error> with <location> <location description>
  1427.       660 <Error> from <location> <location description>
  1428.  
  1429.       700 <SQL parse error message>
  1430.       750 <SQL semantic error message>
  1431.       751 <Error message from query resolver>
  1432.       761 <Requirements error> for <location> <location description>
  1433.  
  1434.       790 Internal error: <fatal error from SNQP server>
  1435.  
  1436.  
  1437.                         Table 3b: Reply Codes
  1438.                                   (Continued)
  1439.  
  1440.    ---------------------------------------------------------------------
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.                                                                [Page 26]
  1452.  
  1453.  
  1454. INTERNET-DRAFT                                                 July 1997
  1455.  
  1456.  
  1457.    Table 4 lists the defined GUI reply codes.  Text messages for the
  1458.    reply codes may vary.  The codes are sorted numerically.  An
  1459.    explanation of the codes follows the table.
  1460.  
  1461.    ---------------------------------------------------------------------
  1462.  
  1463.       331 nnnnnnn! <message>
  1464.       331 nnnnnnn.mmmmmm <message>
  1465.       331 nnnnnnn-mmmmmm <message>
  1466.       730 nnnnnnnammmmmm e <parse error message>
  1467.       735 nnnnnnnammmmmm e <semantic error message>
  1468.       340 <status>
  1469.  
  1470.                         Table 4: GUI Reply Codes
  1471.  
  1472.    ---------------------------------------------------------------------
  1473.  
  1474.    In Table 4, nnnnnnn is the line number in a query block, and mmmmmm
  1475.    is the column in the line.  Both numbers begin counting with 1.  The
  1476.    exclamation point response directs the program to list information
  1477.    after line n.  The period response directs the program to break line
  1478.    n at column m.  The hyphen response directs the program to flag line
  1479.    n at column m.  Replies 730 and 735 direct the GUI to indicate the
  1480.    parsing or semantic error at line n, column m.  Response 340 provides
  1481.    status information that can be displayed immediately in the GUI's
  1482.    status line.  A sample status message is one that indicates which
  1483.    data repository is being contacted.
  1484.  
  1485.  
  1486. 5. Protocol Requirements
  1487.  
  1488.  
  1489.    SQL queries may often have more functionality then a server supports
  1490.    or an application demands.  Moreover, query blocks larger than one
  1491.    SQL query, advice on query costs, some types of comparison operations
  1492.    or t-bounds need not be supported by a particular server.  SNQP
  1493.    defines a minimal subset of functionality for a working SNQP
  1494.    protocol.  Functionality beyond this subset is optional.  Servers
  1495.    that do not support optional functionality must return replies that
  1496.    indicate this to the user.
  1497.  
  1498.    Table 5 lists the minimum functionality for an SNQP server.
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.                                                                [Page 27]
  1508.  
  1509.  
  1510. INTERNET-DRAFT                                                 July 1997
  1511.  
  1512.  
  1513.    ---------------------------------------------------------------------
  1514.       Command       Limitations
  1515.    ---------------------------------------------------------------------
  1516.       advice        Not supported.
  1517.       attributes    List the attributes for a relation.
  1518.       compare       List type of comparison operation.  At least
  1519.                     one of CCSO and default comparison types must
  1520.                     be supported.  Wildcards in SQL query strings
  1521.                     can be rejected by the query command with an
  1522.                     appropriate semantic error message.
  1523.       help          Explain the available SNQP commands.
  1524.       imagui        Not supported.
  1525.       next          Not supported.
  1526.       noadvice      Supported, but has no effect since advice
  1527.                     is not supported.
  1528.       noimagui      Supported, but has no effect since imagui
  1529.                     is not supported.
  1530.       query         Submit a block containing one SQL query statement.
  1531.                     The minimum supported SQL query statement is
  1532.                     a selection query that performs equality
  1533.                     comparisons between attribute values and
  1534.                     constant strings.  Conjunctions of such comparisons
  1535.                     are supported.  The minimum SQL query does not allow
  1536.                     projections, but returns all the attributes
  1537.                     for matching tuples.
  1538.       relations     List the relations available through the SNQP
  1539.                     server.
  1540.       stop          End processing of current query.
  1541.       quit          Terminate the query session.
  1542.  
  1543.  
  1544.                  Table 5: Minimum  SNQP Server Requirements
  1545.                           (Commands do not support t-bounds)
  1546.  
  1547.    ---------------------------------------------------------------------
  1548.  
  1549.  
  1550. 6. Security Considerations
  1551.  
  1552.    SNQP clients and servers depend on the Domain Name Service.  They are
  1553.    subject to all the security issues that arise in that context.  This
  1554.    version of the SNQP protocol does not define procedures for
  1555.    protecting the information communicated to and from an SNQP server.
  1556.  
  1557. 7. Acknowledgements
  1558.  
  1559.    Thanks to <<your name here!!>> for their comments on earlier drafts
  1560.    of this document.
  1561.  
  1562.  
  1563.                                                                [Page 28]
  1564.  
  1565.  
  1566. INTERNET-DRAFT                                                 July 1997
  1567.  
  1568.  
  1569. 8. References
  1570.  
  1571.  
  1572. [1]         American National Standards Institute. "SQL," ANSI Standard
  1573.             X3.135-1989.  1989.
  1574.  
  1575.  
  1576. [2]         H. Garcia-Molina, G. Wiederhold. "Read-Only Transactions in
  1577.             a Distributed Database,"  ACM Transactions on Database Sys-
  1578.             tems 7(2), pp. 209-234.  June 1982.
  1579.  
  1580. [3]         R. Hedberg, S. Dorner, P. Pomes.  "The CCSO Nameserver (Ph)
  1581.             Architecture," Internet Draft.  May 1997.
  1582.             <URL:ftp://ftp.internic.net/internet-drafts/draft-ietf-ids-
  1583.             ph-03.txt>
  1584.  
  1585.  
  1586. [4]         J. Levine, T. Mason, D. Brown. "Parsing SQL," lex  yacc, 2nd
  1587.             ed.  O'Reilly and Associates, Inc. 1992.
  1588.  
  1589.  
  1590. [5]         J. Ordille. "The Internet Nomenclator Project," Internet
  1591.             Draft. July 1997.  <URL:ftp://ftp.internic.net/internet-
  1592.             drafts/draft-ietf-ids-inp-02.txt>
  1593.  
  1594.  
  1595. [6]         J. Ordille. "Descriptive Name Services for Large Internets,"
  1596.             Ph. D. Dissertation. University of Wisconsin. 1993.
  1597.             <URL:http://cm.bell-labs.com/cm/cs/doc/93/12-01.ps.gz>
  1598.  
  1599.  
  1600. [7]         J. Ordille, B. Miller. "Distributed Active Catalogs and
  1601.             Meta-Data Caching in Descriptive Name Services," Thirteenth
  1602.             International IEEE Conference on Distributed Computing Sys-
  1603.             tems, pp. 120-129.  May 1993.  <URL:http://cm.bell-
  1604.             labs.com/cm/cs/doc/93/5-01.ps.gz>
  1605.  
  1606.  
  1607. [8]         J. Ordille. "Nomenclator Home Page." 1996.
  1608.             <URL:http://cm.bell-labs.com/cm/cs/what/nomenclator/>
  1609.  
  1610.  
  1611. [9]         J. Postel. "Simple Mail Transfer Protocol," RFC 821.  August
  1612.             1982.  <URL:ftp://ftp.internic.net/rfc/rfc821.text>
  1613.  
  1614.  
  1615. [10]        M. Wahl, T. Howes, S. Kille.  "Lightweight Directory Access
  1616.             Protocol (v3), Internet Draft. July 1997.
  1617.  
  1618.  
  1619.                                                                [Page 29]
  1620.  
  1621.  
  1622. INTERNET-DRAFT                                                 July 1997
  1623.  
  1624.  
  1625.             <URL:ftp://ftp.internic.net/internet-drafts/draft-ietf-
  1626.  
  1627.             asid-ldapv3-protocol-06.txt>
  1628. 9. Authors' addresses:
  1629.  
  1630.    Jim Elliott
  1631.    Epic Systems Corporation
  1632.    5301 Tokay Boulevard
  1633.    Madison, WI 53711  USA
  1634.  
  1635.    Email: jim@apocalypse.org
  1636.  
  1637.  
  1638.    Joann J. Ordille
  1639.    Bell Labs, Lucent Technologies
  1640.    Computing Sciences Research Center
  1641.    700 Mountain Avenue, Rm 2C-301
  1642.    Murray Hill, NJ 07974  USA
  1643.  
  1644.    Email: joann@bell-labs.com
  1645.  
  1646.  
  1647.  
  1648.                This Internet Draft expires January 30, 1997.
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.                                                                [Page 30]
  1676.