@Override
	public int getIndexOfChild(Object parent, Object child) {
		int count = 0;
		Class<?> type = parent.getClass();
		if (type == Schema.class) {
			TreeMap<String, Table> tables = ((Schema)parent).getTables();
			for (Map.Entry<String, Table> t : tables.entrySet()) {
				if (t.getKey().compareTo(child.toString()) == 0) { return count; }
				else { count++; } 
			}
			return -1;
		}
		else if (type == Table.class) {
			TreeMap<String, Attribute> attrs = ((Table)parent).getAttrs();
			for (Map.Entry<String, Attribute> a : attrs.entrySet()) {
				if (a.getKey().compareTo(child.toString()) == 0) { return count; }
				else { count++; } 
			}
		}
		else if (type == Attribute.class) {
			return -1;
		}

		return -1;
	}