moat: ditch dug as a fortification and usually filled with water
trench: a ditch dug as a fortification having a parapet of the excavated earth
record: a compilation of the known facts regarding something or someone