extract BAMRecords from DB