NoSQL: a non-SQL RDBMS
|
|
Creating new tablesAny editor may be used to construct or modify a table, since it is a regular UNIX file. This 'direct editing' method is occasionally used, especially for small amounts of data. Avoid, however, using an editor that destroys TAB or SOH characters. To generate a new table the best plan (and usually the safest one) is first to generate a cross reference (xref) file, then convert it to table format and add the rows of data. Any convenient editor may be used to generate an xref file. Next convert the xref to an empty table wth the command 'maketable'. Finally, use the 'edittable' utility to manually enter rows of data. A typical xref file is shown below: # These are lines of table documentation. They can be of any length, # and any number of such lines may exist. # Each line must start correctly, e.g. with "#" surrounded by any # number of spaces and/or TABs. Name Name of item Type Type: 1,2,3,7,9,A,B,X Count Number of items K Constant modifier SS7 Special status for type 7 Size In KilobytesThe above xref file contains the necessary elements to describe a table of six columns: table documentation (the comment lines that each start with a sharp sign '#'), column names ("Name", "Type", "Count", ...), and column documentation for each column (the text at the end of each column line). To build the final table header, use the command: maketable < table.xref
where Name Type Count K SS7 Size The uneven spacing between output column names depends on the tabular settings of your terminal. Trackbacks (1) | New trackback | Comments (0) | Print |