17.11.2014 Views

ChemOffice.Com - CambridgeSoft

ChemOffice.Com - CambridgeSoft

ChemOffice.Com - CambridgeSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Administrator<br />

open a large table and use Move Last to see the last<br />

record, and the entire table is sent down from the<br />

server.<br />

To get around this problem, an alternative<br />

mechanism is available in ChemFinder/Oracle. In<br />

this scheme, instead of requesting complete formsfull<br />

of data over a list or query, ChemFinder/Oracle<br />

retrieves only the ID or primary key field, and<br />

stores (“caches”) the results in an array in memory.<br />

It then need not rely on the normal recordset<br />

cursor. When a request is made to move to record<br />

N, the key for that record is looked up in the array,<br />

and a new select statement is issued to retrieve only<br />

the corresponding record. Thus, Move Last takes no<br />

more time than Move Next.<br />

There are tradeoffs between the two schemes:<br />

• The new scheme takes time to retrieve the set<br />

of ID's during a database open, or after a<br />

search or sort. Normally, this is quite fast even<br />

for a large table, and steps are taken to avoid<br />

repeating the operation unless necessary. A<br />

message on the status bar indicates when this<br />

caching process is taking place.<br />

• In the new scheme, moving from one record to<br />

the next is somewhat slower, since each move<br />

involves a (fast, one-hit) search. This is not very<br />

noticeable during list browsing, but slows<br />

down multi-retrieve operations such as filling<br />

table view.<br />

Because of these drawbacks, the new caching<br />

scheme is OFF, by default. To turn it ON for an<br />

Oracle-connected form:<br />

1. Choose File Database or otherwise bring up<br />

the Properties dialog.<br />

2. Go to the Oracle tab of the dialog.<br />

3. Check the Cache ID's for faster moves box.<br />

4. Click OK.<br />

You will get an alert instructing you to:<br />

5. Save the form, close it, and reopen it. This is<br />

currently necessary in order to reinitialize the<br />

database connection with the caching scheme.<br />

Configuration Via<br />

CF_SETTINGS Table<br />

When you select a table in an Oracle database,<br />

ChemFinder determines and displays the types of<br />

columns in the table. Here’s how it decides whether<br />

a particular column contains structures:<br />

• The column must be of type CLOB or BLOB.<br />

• If the column has been indexed by the CS<br />

Oracle Cartridge, then it is a structure column.<br />

• If there is no index, then ChemFinder/Oracle<br />

looks for a table of configuration info called<br />

CF_SETTINGS. If the column is listed in that<br />

table as being of type STRUCTURE, then it is a<br />

structure column.<br />

The CF_SETTINGS table is also used to determine<br />

whether a particular column of type BLOB contains<br />

ChemFinder pictures (Windows metafiles).<br />

To designate an unindexed column as a structure<br />

column:<br />

1. In the Field tab of the Properties dialog, select<br />

a column of type BLOB or CLOB.<br />

2. Click Set As Structure.<br />

If the CF_SETTINGS table has not yet been<br />

created, an alert indicates that it is about to be<br />

created.<br />

3. Click OK to proceed and create the table, or<br />

Cancel to abort without creating.<br />

If the table already exists and there is already an<br />

entry for the selected column, you are given an<br />

alert and a chance to cancel.<br />

4. Click OK to proceed.<br />

A new entry is created in the table, marking the<br />

selected column as a structure column.<br />

704• CS Oracle Cartridge <strong>CambridgeSoft</strong><br />

Configuration Via CF_SETTINGS Table

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!