NoSQL: a non-SQL RDBMS
|
|
Reading DataThe following shows some examples of how the system is usually used, which involves a combinations of operators. Using the table named 'sample.table' (see Table structure) the command: column NAME AMT TYP < sample.table | sorttable TYP | justify gives the output: NAME AMT TYP ------ ---- --- Bush 133 A Hansen 23 A Perry 244 B Hart 1111 D Holmes 1111 D Jones 77 X Note that the column COUNT was excluded by the 'column' operator, and that the order of the selected columns was changed from that in the input table. To save the output in a file (redirection of STDOUT into a file), use something like the following: column ... < sample.table | sorttable TYP | justify > file.out An example using the operator 'row' on the table 'sample.table' is: row 'AMT < 900' < sample.table | column NAME AMT TYP | sorttable NAME | justify Note how the row selection expression is surrounded by single quotes to prevent its interpretation by the shell. Here we select some rows using 'row,' select some columns using 'column,' sort what we have with 'sorttable,' and print with 'justify.' The output is: NAME AMT TYP ------ --- --- Bush 133 A Hansen 23 A Jones 77 X Perry 244 B Trackbacks (1) | New trackback | Comments (0) | Print |