Cherry Picking The Diamonds From The Stock Market

Where can I find electronic information about stock market transactions that is free or very cheap?

I would like to write a computer program that analyzes stock market transactions. The problem is I am having trouble finding this information. Where can I find information about the transactions that take place on the market? I don’t have a huge budget (free and slightly out of date information might work) and am looking for data I can manipulate with a computer.
For example, does the SEC or some other government entity make this info available?

Go to www.finance.yahoo.com. They’ve got info on any stock. The info can then be download into a CSV Excel spreadsheet. If you know how to program using Macros, you can add that to your program.