next up previous
Next: Finishing irpr Up: Usual operations Previous: Starting up kappa

Manipulations of database

Using irpr, you can add, update, delete and search members.

How to use the commands

Use irpr comannds as follows.

        irpr_client Mode < filename

If you designate an operation by "Mode" argument, and give search condition or member information to standard input, the result will be returned to standard output.

Operations you can designate by "Mode" argument are shown below.

anm
adds a new member
mm
modifies a member information
dm
deletes a member
scd
searches a member in the current data
shd
searches a member in the historical data
sad
searches a member in both current and historical data

The next table shows the relationship between "Mode", input and output.



Abnormal end is also reported to standard output when necessary.

Updated or deleted member information is added to meibo-history table. The version of updated member information becomes a proper value automatically.

Member information

Following is an example of member information.

[id("0000000099"),
name_e("Tommy Hase"),
name_for_search("Tommy Hase"),name_for_search("TommyHase"),
name_for_search("TOMMY HASE"),neme_for_search("T.Hase"),
prefix("Mr."),organization_address("1352 carving ave newtown LA 18954usa"),
organization_e_mail("thase@cupper.com"),info1("ifs"),info2("e"),
source("ifsFF"),version(3),date("Thur Sep 3 17:26:40 JST1998"),user("kato"),
remarks("ff"),valid_flag(valid)].

The format of member information must abide by the following rules.

  1. It is a list of attribute_name(attribute_value), whose order is arbitrary.
  2. Those attributes specified as null_value(allowed) in the schema can be omitted. On the other hand, attributes specified as null_value(not_allowed) must be included in case of updating or deletion.
  3. An attribute of repeating property set can have multiple values of the same attribute name. In the example of member information above, an attribute name_for_search gives the example, i.e. "Tommy Hase","TommyHase","TOMMY HASE" and "T.Hase" are a set of its attribute values.

Search conditions

Examples of search condition are shown below.

ex.1
(or(name_for_search = "*Hase",name_for_search = "Tommy*")).
ex.2
and((info2 = "j"), or((info1 = "irpr"), (info1 = "ifs"))).

Search conditions must abide by the following rules.

<condition> ::= attribute_name <comparison operator> <fixed search value>
         | attribute_name = <fixed search value>
         | attribute_name = <partially matching search value>
         | ( <condition> )
         | <condition> <logical operator> <condition>

<partially matching search value> ::= "*search_value" |
	"search_value*" | "*search_value*"
<fixed search value> ::= integer | string of not partially matching
	search value
<logical operator> ::= and | or | dif
<comparison operator> ::= > | >= | < | =<