graph of database structure and sql statement to import images as bytea into database