public void findDepartmentTutorialCapacity() throws SQLException {
		ResultSet data = sql.query("SELECT d1.name, SUM(t1.capacity) " +
				"FROM department d1,tutorial_room t1 " +
				"WHERE d1.id = t1.dept_id " +
				"GROUP BY d1.id");
		String res1 ="\n";
		while(data.next()) {
			res1 += data.getString(1) + ": " + data.getString(2) + "\n";
		}
		
		//Redis
		String res2 = "\n";
		Set<String> keys = redis.keys("tutorial_room:*");
		Iterator<String> it = keys.iterator();
		Map<String, LinkedList<String>> idMap = new HashMap<String, LinkedList<String>>();
		while(it.hasNext()) {
			String[] ids = it.next().split(":");
			if(!idMap.containsKey(ids[1])) {
				idMap.put(ids[1], new LinkedList<String>());
			}
			idMap.get(ids[1]).add(ids[2]);
		}
		Iterator<String> dept_ids = idMap.keySet().iterator();
		while(dept_ids.hasNext()) {
			String dept_id = dept_ids.next();
			Iterator<String> rids = idMap.get(dept_id).iterator();
			String dept_name = redis.hget("department", dept_id);
			res2 += dept_name;
			int total = 0;
			while(rids.hasNext()) {
				total += Integer.parseInt(redis.hget("tutorial_room:"+dept_id+":"+rids.next(), "capacity"));
			}
			res2 += ": "+Integer.toString(total)+"\n";
		}
		
		printResult(res1, res2);
	}