As an experiment, I wrote a quick ruby script called csv2sqlite which parses one more CSV files (and their headers), and automatically populates an SQLite database based on the CSV.
If you have a CSV and want to easily know how many records it has, or to filter or join these records, it can be just a matter of running something like following:
ruby ~/csv2sqlite/csv2sqlite.rb baby-names-10.csv --output babynames.db
sqlite3 babynames.db "SELECT * FROM baby_names_10 WHERE percent > .05;"
Hope it helps you!