Maintenance of Information in the database

The IsisNBP console permits the addition, updating and correction of its database contents.
Note that IsisNBP should have write permission of the database files. By default, the sample collection is a read only database, so it is necessary to change the write permission before executing the following example.

For example, let's modify field 24 from record 1 in database cds:

In  [1]: db = sample.cds 
In  [2]: rec1 = db[1]

In  [3]: print rec1[24].data
Out [3]: u'Techniques for the measurement of transpiration of'

In  [4]: rec1[24].data = 'New text'
In  [5]: print rec1[24].data
Out [5]: u'New text'

In  [6]: rec1.save(db)

It is necessary to point out that, for each record modified, the save method should be called.

Now let's delete a field and a record from database cds.

In  [1]: db = sample.cds 
In  [2]: rec1 = db[1]

In  [3]: print rec1[24].data
Out [3]: u'Techniques for the measurement of transpiration of'

In  [4]: print rec1.keys()
Out [4]: [69, 70, 44, 50, 24, 26, 30]

In  [5]: del rec1[44]

In  [6]: print rec1.keys()
Out [6]: [69, 70, 50, 24, 26, 30]

In  [7]: rec1.save(db)