implements comparator on database
version 0.3.0