It is not possible to use TREX for searching directly in a database like Oracle.
You must have an application which uses TREX as a search and indexing engine like ERP, CRM, Portal, Enterprise Search and so on. So in this case you have to write your own connector. But out-of-the-box it is not possible.
let me add to Frank:
The question CANNOT even really be asked on TREX level. TREX does not care for connectivity and has no APIs that are released for project development.
The question CAN be asked on the level of any frameworks that mediate between TREX and frontend applications such as the SAP Portal's Repository Framework or SAP NetWeaver Enterprise Search's Data Provider Service (DPS). Both these could be connected to an Oracle or other DB and would then feed a TREX accordingly.