compiler: sql: fix foreign keys
lib/java: JDBC-related protocols