Adding database building sequence check