

            rdsort (1) --- sort a relation                           02/22/82


            _U_s_a_g_e

                 rdsort { <domain> }


            _D_e_s_c_r_i_p_t_i_o_n

                 'Rdsort'  is  part  of  the toy relational data base system,
                 'rdb'.  It sorts the tuples in a  relation  on  the  domains
                 specified  in  the  argument list.  Standard input 1 must be
                 directed to a file containing an 'rdb' relation; the  sorted
                 relation  is written on standard output.  The input relation
                 must be a file containing a relation  that  was  created  by
                 'rdmake'  or  other 'rdb' program; a relation cannot be read
                 from the terminal.  The output relation is  displayed  in  a
                 readable format if standard output is directed to a terminal
                 (display  in  binary  would be quite a mess); otherwise, the
                 output relation is written in binary,  internal  format  for
                 processing by other 'rdb' programs.

                 The  relation  is  sorted  on  the  domains specified in the
          |      argument list.  Integer  and  real  domains  are  sorted  in
          |      numeric  order;  string domains are sorted in the ASCII col-
                 lating sequence.  If no arguments are specified,  the  rela-
                 tion  is  sorted  on all domains in the order they appear in
                 the relation.


            _E_x_a_m_p_l_e_s

                 p.rel> rdsort color >np.rel
                 sp.rel> rdproj sno | rdsort | rduniq | rdprint


            _M_e_s_s_a_g_e_s

                 "Can't access input relation"
                 "Sorry, a relation can't be read from the terminal"
                 "Relation is corrupted!!"
                 "Too many sort keys"
                 "<domain>:  field not defined"


            _B_u_g_s

                 If standard output is directed to "/dev/lps",  the  relation
                 is written in binary.


            _S_e_e _A_l_s_o

                 rdcat  (1), rdextr (1), rdjoin (1), rdmake (1), rdprint (1),
                 rdproj (1), rdsel (1), rdsort (1), rduniq (1)





            rdsort (1)                    - 1 -                    rdsort (1)


