public synchronized void createTables() throws BoardInitException, SQLException {
        ResultSet res;
        String commonSql = null;

        // Check if common stuff has already been created
        tableChkStmt.setString(1, "index_counters");
        res = tableChkStmt.executeQuery();
        try {
            if(!res.isBeforeFirst()) {
                // Query to create tables common to all boards
                try {
                    commonSql = Resources.toString(Resources.getResource(commonSqlRes), Charsets.UTF_8);
                } catch(IOException e) {
                    throw new BoardInitException(e);
                } catch(IllegalArgumentException e) {
                    throw new BoardInitException(e);
                }
            }
        } finally {
            res.close();
        }
        conn.commit();

        // Check if the tables for this board have already been created too
        // Bail out if yes
        tableChkStmt.setString(1, this.table);
        res = tableChkStmt.executeQuery();
        try {
            if(res.isBeforeFirst()) {
                conn.commit();
                return;
            }
        } finally {
            res.close();
        }
        conn.commit();

        // Query to create all tables for this board
        String boardSql;
        try {
            boardSql = Resources.toString(Resources.getResource(boardSqlRes), Charsets.UTF_8);
            boardSql = boardSql.replaceAll("%%BOARD%%", table);
            boardSql = boardSql.replaceAll("%%CHARSET%%", charset);
        } catch(IOException e) {
            throw new BoardInitException(e);
        } catch(IllegalArgumentException e) {
            throw new BoardInitException(e);
        }

        // Query to create or replace triggers and procedures for this board
        String triggersSql;
        try {
            triggersSql = Resources.toString(Resources.getResource(triggersSqlRes), Charsets.UTF_8);
            triggersSql = triggersSql.replaceAll("%%BOARD%%", table);
            triggersSql = triggersSql.replaceAll("%%CHARSET%%", charset);
        } catch(IOException e) {
            throw new BoardInitException(e);
        } catch(IllegalArgumentException e) {
            throw new BoardInitException(e);
        }

        Statement st = conn.createStatement();
        try {
            if(commonSql != null)
                st.executeUpdate(commonSql);
            st.executeUpdate(boardSql);
            st.executeUpdate(triggersSql);
            conn.commit();
        } finally {
            st.close();
        }
    }