public boolean canUpdate(long isbn, Book b, Statement st, ResultSet rs) throws SQLException {
		//Check if any authors will be left without a book.
		ArrayList<Author> leftAuth = getAuthors(isbn, st, rs);
		if(b.getAuthor() != null)
			leftAuth.removeAll(b.getAuthor());
		//Test if any authors that are left out are only related to this book
		for(Author a: leftAuth) {
			rs = st.executeQuery("SELECT * FROM HasAuthor WHERE name = '" + a.getName() + "'");
			rs.next();
			if(!rs.next())
				return false;
		}

		//Check if any publishers will be left without a book.
		ArrayList<Publisher> leftPub = getPublishers(isbn, st, rs);
		if(b.getPublisher() != null)
			leftPub.removeAll(b.getPublisher());
		//Test if any publishers that are left out are only related to this book
		for(Publisher p: leftPub) {
			rs = st.executeQuery("SELECT * FROM HasPublisher WHERE name = '" + p.getName() + "'");
			rs.next();
			if(!rs.next())
				return false;
		}

		return true;
	}