Here is another database I stumbled on for Yorkshire England. It is the website for York Castle which housed a debtor's prison. There is a brief history of the prison, the environment of the prison, a few prisoner biographies, and a few turnkey (guard) biographies.
By going to York Castle Family History Section you can search for an ancestor who was in the prison, either for debt or for criminal actions. Not all prisoners are listed as the database currently has prisoners from the 18th Century. I'm looking for William Elgie who I know was there in 1818 so am out of luck this time but it's a fascinating database with over 5000 names!
There is a very nice factsheet for tips on how to track down any missing prisoners and I am planning to use it find more on William if possible. I was able to find that York Castle Museum holds miscellaneous records from York Castle prison, including "Notebook with notes on various prisoners in York Castle, extracted from 1803-1868". Next step is to write to them and ask how/if I can access these records.