Skip to main content
`Ctrl`+`K`

# Rdb

class astropy.io.ascii.Rdb

  Bases: `Tab`

  Tab-delimited table with a column name row and a type definition row.

  The `rdb` format is a legacy format that was originally created in 1991 as the basis for a suite of Unix command-line relational database utilities.

  The `rdb` format is defined as follows:

  - The table text starts with zero or more comment lines that begin with `#`.

  - Comments are allowed only at the beginning of the table.

  - First row after the (optional) comments specifies the column names.

  - Second row after the comments specifies the data types:

    - Data type can be either `S` for string or `N` for numeric (case-insensitive).

    - Data type specifier can optionally be preceded with an integer to indicate the width when printing the table, but the `astropy` reader ignores it.

  - Subsequent rows contain the data values.

  - All row entries in the header and data are separated by a tab character.

  Example (where the added spaces are for visual clarity):

      # Comment line
      # -----------------
      name <tab> age <tab> eye-color
      6S <tab> 5N <tab> S
      Bob  <tab> 45 <tab> blue
      Mary <tab> 32 <tab> brown
      Jill <tab> 80 <tab> hazel