home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 400-499 / ff473.lzh / CNewsSrc / cnews_src.lzh / man / dbz.man < prev    next >
Text File  |  1991-01-05  |  6KB  |  133 lines

  1.  
  2.  
  3.  
  4. DBZ(1)                   USER COMMANDS                     DBZ(1)
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      dbz - operate on dbz databases of text
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ddddbbbbzzzz [ ----{aaaaxxxxcccc} ] [ ----tttt c ] [ ----llll length ] [ ----{qqqqiiiiuuuueeee} ] [ ----ffff old ]
  13.      [ ----pppp parms ] database file ...
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _D_b_z is a shell-level interface to the _d_b_z(3z) database  rou-
  17.      tines for indexed access to a text file.
  18.  
  19.      The _d_a_t_a_b_a_s_e file must be a text file, one line per database
  20.      record,  with  the  key the first field on the line.  The ----tttt
  21.      option sets the field-separator character;  the  default  is
  22.      tab.   Setting  the  separator character to NUL (with ----tttt '''''''')
  23.      makes the whole line the key.  Lines must  not  exceed  1023
  24.      bytes  in  length  including  the newline; this limit can be
  25.      increased with the ----llll option.  The limitations and  restric-
  26.      tions of _d_b_z(3z) must also be observed.
  27.  
  28.      In the absence of options, _d_b_z creates a _d_b_z(3z)  index  for
  29.      the  database;  the  index  comprises files _d_a_t_a_b_a_s_e....ppppaaaagggg and
  30.      _d_a_t_a_b_a_s_e....ddddiiiirrrr in the same directory.  Any previous  index  is
  31.      silently  overwritten.   The  ----aaaa, ----xxxx, and ----cccc options specify
  32.      other operations.
  33.  
  34.      With ----aaaa, _d_b_z appends lines from the _f_i_l_e(s) (standard  input
  35.      if  none)  to  the database, updating both the text file and
  36.      the indexes.
  37.  
  38.      With ----xxxx, _d_b_z reads keys from the _f_i_l_e(s) (standard input  if
  39.      none)  and  prints  (on  standard  output) the corresponding
  40.      lines, if any, from the database.  The input is in the  form
  41.      of database lines, although only the keys are significant.
  42.  
  43.      With ----cccc, _d_b_z checks the database for  internal  consistency.
  44.      The  ----qqqq option causes this check to be done more quickly but
  45.      less thoroughly (each key is looked up in the index, but  no
  46.      check  is made to be sure that the index entry points to the
  47.      right place).
  48.  
  49.      The ----iiii option suppresses the use of _d_b_z(3z)'s _i_n_c_o_r_e  facil-
  50.      ity.   This  makes  accesses  slower,  but  keeps  the files
  51.      current during updating and reduces  startup/shutdown  over-
  52.      head.
  53.  
  54.      Normally, _d_b_z checks whether a key is already in  the  data-
  55.      base before adding it.  The ----uuuu option suppresses this check,
  56.      speeding things up at the expense of safety.
  57.  
  58.      A new index is normally created with default size, case map-
  59.      ping, and tagging.  The default size is right for 90-100,000
  60.  
  61.  
  62.  
  63. Sun Microsystems   Last change: 12 April 1990                   1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DBZ(1)                   USER COMMANDS                     DBZ(1)
  71.  
  72.  
  73.  
  74.      records.  The default  case  mapping  is  right  for  RFC822
  75.      message-ids.  See _d_b_z(3z) for what tagging is about.  (Note,
  76.      these defaults can be changed when _d_b_z(3z) is installed.)
  77.  
  78.      If the ----ffff option is given, size, case mapping,  and  tagging
  79.      are  instead initialized based on the database _o_l_d.  This is
  80.      mostly useful when creating a new generation of an  existing
  81.      database.   (See  the description of _d_b_z_a_g_a_i_n in _d_b_z(3z) for
  82.      details.)
  83.  
  84.      If the ----pppp option is given, the _p_a_r_m_s  string  specifies  the
  85.      size,  case  mapping,  and  tagging.   If  _p_a_r_m_s is a single
  86.      decimal number, that is taken  as  the  expected  number  of
  87.      records   in  the  index,  with  case  mapping  and  tagging
  88.      defaulted.   Alternatively,  _p_a_r_m_s  can  be  three  fields-a
  89.      decimal number, a case-mapping code character, and a hexade-
  90.      cimal tag mask-separated by white space.  The decimal number
  91.      is, again, the expected number of records; 0 means ``use the
  92.      default''.  See _d_b_z(3z) for possible choices of case-mapping
  93.      code,  but  in particular, 0000 means ``no case mapping''.  See
  94.      _d_b_z(3z)  for  details  on  tag  masks;  0  means  ``use  the
  95.      default''.
  96.  
  97.      If the ----eeee option is given, the decimal number in ----pppp is taken
  98.      to  be  the  exact  table  size,  not the expected number of
  99.      records, and invocation of _d_b_z_s_i_z_e (see _d_b_z(3z)) to  predict
  100.      a good size for that number of records is suppressed.
  101.  
  102.      The ....ppppaaaagggg file is normally 5-6 bytes per record (based on the
  103.      estimate given to ----pppp or the previous history of the ----ffff data-
  104.      base).  The ....ddddiiiirrrr file is tiny.
  105.  
  106. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  107.      dbz(3z)
  108.  
  109. HHHHIIIISSSSTTTTOOOORRRRYYYY
  110.      Written at U of Toronto by Henry Spencer,  for  the  C  News
  111.      project.   See  _d_b_z(3z)  for  the  history of the underlying
  112.      database routines.
  113.  
  114. BBBBUUUUGGGGSSSS
  115.      There are a number  of  undocumented  options  with  obscure
  116.      effects,  meant  for  debugging  and  regression  testing of
  117.      _d_b_z(3z).
  118.  
  119.      Permissions for the index files probably ought to  be  taken
  120.      from those of the base file.
  121.  
  122.      The line-length limit is a blemish, alleviated only slightly
  123.      by ----llll.
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sun Microsystems   Last change: 12 April 1990                   2
  130.  
  131.  
  132.  
  133.