Daylight Chemistry Database Cartridge

Oracle8i Implementation Overview

Sam DeFazio, Cathy Trezza
Oracle Corporation
New England Development Center
Nashua, NH 03062


Chemistry Database Cartridge Components


Oracle8i Extensible Index Table Structures
Source Table

Index Table


Daylight Index Data Structure

Oracle8i Extensible Index Framework
Smiles Index Implementation Type

create or replace type SmilesIndexIM as object 
  -- Query context/state 
  db_loc RAW(8), lob_loc RAW(8), 
  -- DDL Methods 
  member function ODCIGetInterfaces(...)  return number, 
  member function ODCIIndexCreate(...)  return number, 
  member function ODCIIndexDrop(...)  return number, 
  -- DML Methods 
  member function ODCIIndexInsert (...)  return number, 
  member function ODCIIndexDelete (...)  return number, 
  member function ODCIIndexUpdate (...)  return number, 
  -- Query Operator Methods 
  -- IndexStart method for Contains 
  member function ODCIIndexStart(..., strt number, stop number, 
  cmpval varchar2) return number, 
  -- IndexStart method for SIMILAR 
  member function ODCIIndexStart(..., strt number, stop number, 
  cmpval varchar2, threshold float) return number, 
  member function ODCIIndexFetch(nrows number, rids OUT 
  sys.odciridlist) return number, 
  member function ODCIIndexClose return number 

Smiles IndexType Definition

create or replace indextype SmilesIndex for 
  Contains(varchar2, varchar2), 
  Similar(varchar2, varchar2, float), 

using SmilesIndexIM; 

Sample Usage


-- Create sample table of compounds
create table Compound
( ID number,
  Name   varchar2(256),
  Smiles varchar2(4000) ...

-- Create index on smiles column 
create index on Compound(Smiles) using SmilesIndex ... ; 
-- Perform similarity query and return score 
select Score(1) 
from Compound 
where Similar(Smiles, 'S=PS', .1, 1)=1; 

-- Select compounds similar to given structure 
select Name, Smiles 
from Compound 
where Contains(Smiles, 'CN(C)CCCN')=1; 

Resource Considerations


Session Multiplexing