When an NIS+ table is created, one or more columns are designated searchable with either the S or the I flags as described in Specifying NIS+ Table Columns. You can use the niscat -o tablename command to display a list of a table's columns and their characteristics.
A table is keyed on its searchable columns. This means that each row in the table must have a unique combination of values in the searchable columns. For example, if a table has one searchable column, each table row must have a unique value in that column, no two rows can contain the same value.
For example, suppose you had a table containing one searchable column named city and a non-searchable column named country. The following rows would all be permitted:
City |
Country |
---|---|
San Francisco |
United States |
Santa Fe |
United States |
Santiago |
Chile |
But you could not have two rows like:
City |
Country |
---|---|
London |
Canada |
London |
England |
If a table has multiple searchable columns, it is the combination of values that must be unique. For example, suppose you had a table containing two searchable columns, Lastname, Firstname and a non-searchable column named city. The following rows would all be permitted:
Lastname |
Firstname |
City |
---|---|---|
Kuznetsov |
Sergei |
Odessa |
Kuznetsov |
Rima |
Odessa |
Sergei |
Alex |
Odessa |
But you could not have two rows like this:
Lastname |
Firstname |
City |
---|---|---|
Kuznetsov |
Rima |
Odessa |
Kuznetsov |
Rima |
Chelm |
NIS+ commands use the values in the searchable columns to identify specific table rows.