Accesing OMERO database using query language

I am exploring how to access data in OMERO directly from the underlying database using a query language (e.g. SQL).
Is there a best practice for this?
Also, is the OMERO database schema documented somewhere, and how could I find this?
Thanks
Is there a best practice for this?
Also, is the OMERO database schema documented somewhere, and how could I find this?
Thanks