Rdb: Ruby-Nachbau der MWC /rdb-Werkzeuge
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
.TH schema "" "" "/rdb Command"
|
||||
.PC "Print a table's schema"
|
||||
\fBschema \fItableorlist ...\fR
|
||||
.PP
|
||||
.II "table^print schema"
|
||||
.II "data base^print schema"
|
||||
The command
|
||||
.B schema
|
||||
prints the schema, or a data-base dictionary, for each
|
||||
.IR tableorlist .
|
||||
.PP
|
||||
Other data-base systems require that you define a schema
|
||||
prior to creating a table.
|
||||
In
|
||||
.BR /rdb ,
|
||||
you can derive a schema from an existing table or tables.
|
||||
.SH Example
|
||||
The following command combines the schemas for tables
|
||||
.B inventory
|
||||
and
|
||||
.BR maillist .
|
||||
The example pipes the concatenated schema through the command
|
||||
.B justify
|
||||
to ``pretty up'' the output:
|
||||
.DM
|
||||
schema inventory maillist | justify
|
||||
.DE
|
||||
.PP
|
||||
This produces the following:
|
||||
.DM
|
||||
Table Field Name
|
||||
--------- ----- -----------
|
||||
inventory 1 Item
|
||||
inventory 2 Amount
|
||||
inventory 3 Cost
|
||||
inventory 4 Value
|
||||
inventory 5 Description
|
||||
maillist 1 Number
|
||||
maillist 2 Name
|
||||
maillist 3 Company
|
||||
maillist 4 Street
|
||||
maillist 5 City
|
||||
maillist 6 State
|
||||
maillist 7 ZIP
|
||||
maillist 8 Phone
|
||||
.DE
|
||||
.PP
|
||||
Because
|
||||
.B schema
|
||||
is a shell script, you can modify it to give widths of columns,
|
||||
data types, and so on.
|
||||
.SH "See Also"
|
||||
.B
|
||||
datatype,
|
||||
precision,
|
||||
width
|
||||
.R
|
||||
.SO schema
|
||||
Reference in New Issue
Block a user