Managing DAVs

Once you have created a DAV, you can use Domino® Designer to edit the dav definition, or DB2® or Notes® to act on data it contains.

In Designer

To work with an existing DAV, in the Applications Navigator for this database, click Data - DB2 Access View. A list of all DAVs created for this database appears. Select and double-click the one you want to edit. From this work pane, you can do the following:

  • New DB2 view - create a new DAV
  • Create/update in DB2 - create/update the DAV in the DB2 enabled database
  • Populate in DB2 - add data to the DAV
  • Delete in DB2 - delete the DB2 view that was created using the DAV
  • Refresh list - refresh the list of DAVs in the work pane. This is useful for checking the status of DAVs in DB2.

In DB2

If you know the NSF file name (e.g. test.nsf), you can find the schema name by executing the query:

	SELECT SCHEMA FROM DOMINO.SCHEMAS WHERE filepath='test.nsf'

where DOMINO is the master Domino schema (this is defined at installation, so check with your administrator if this name is not found) and the file path is the name of the file relative to the Domino data directory. The file path name must be lower case.

Note: If you are unable to execute this query , you may need to ask your administrator to grant you READ access to the table in DB2.

Any DAVs that you create will also be located in the NSF schema. So, in the preceding example, if you create a DAV named 'mydav', you would access it in SQL like this:

	SELECT * from test.mydav

DB2 are optimized for read access ( SQL SELECTS ). While SELECTS do require the owning Domino server to be available, almost all of the processing, including reader list processing, is done by DB2 (in the DB2 process space).

INSERTS, UPDATES, and DELETES are not done by DB2 directly. They are sent as requests to the Domino server and handled by Domino. This is necessary to ensure the correct synchronization of these events in Domino (for example, conflict document handling). It is important to note that because of this, SQL operations in DB2 are handled in an autocommit fashion. An important implication for inserts, updates, and deletes that you need to consider if you write SQL applications to manage Notes data is that SQL statements that affect multiple rows (for example, updating all members of department 80 to department 99) update each row independently.

This restriction does not apply to SELECT statements.