Documents Reveal Inner-Workings of UK's Spying Databases