private void createConnection() {

        try {
            ConnectionProperties properties = new ConnectionProperties();

            Class.forName(SQL_DRIVER_NAME);

            // Create a connection to the database
            String url = SQL_DRIVER_URL.replace("{HOST}", properties.getHost())
                .replace("{PORT}", properties.getPort())
                .replace("{DB}", properties.getDatabase());


            connection = DriverManager.getConnection(url, properties.getUsername(),
                properties.getPassword());
        } catch (ClassNotFoundException e) {
            throw new DBException("could not connect to database", e);
        }catch (IOException e) {
            throw new DBException("could not connect to database", e);
        } catch (SQLException e) {
            throw new DBException("could not connect to database", e);
        }
    }