Ophidia comes with an extensive set of primitives to operate on n-dimensional arrays (i.e. on the arrays contained in fragments). To achieve flexibility requirements, primitives are designed as dynamic libraries in order to be plugged in different I/O servers with no effort. All plugins (currently available as sequential implementations) represent extensions of the SQL, so that they can be embedded in SQL statements to perform scientific data analysis tasks. Furthermore, since most plugins take an array as input and provide an array as output, it is possible to implement a very simple composition (nesting) of plugins to perform more semantically complex tasks (query).
The primitives have been designed and implemented as MySQL User-Defined Functions (UDF). See Adding New Functions to MySQL, from MySQL official documentation, to learn more about the UDF.
How to implement a new primitive: