Adding database backend to handle ancestors view