By forsini on Oct 22, 2008
A table function is like a virtual table that allows you to access data externally as if it was a local table, via the full, expressive power of SQL.
Data returned by these special functions can come from anywhere:
- files - files and web resources
- collections - in-memory collections
- foreign data - other databases, including non-relational sources
- streams - transient information streams, including data feeds and device outputs
Table functions are easy to implement and Rick's white-paper has several examples of practical table function use cases.
Derby has itself several implementations of virtual tables that can be accessed directly. One that you might already know is LOCK_TABLE that shows all locks currently held in the database.
TRANSACTION_TABLE, STATEMENT_CACHE and SPACE_TABLE amongst others are additional ones that can be quite useful.
Documentation about Java DB / Derby table functions can also be found here.