Check out termsql. https://gitorious.org/termsql https://gitorious.org/termsql/pages/Home
It converts text to SQL on the command line. (CSV is just text)
Example:
cat textfile | termsql -o sqlite.db
By default the delimiter is whitespace, so to make it work with CSV that is using commata, you'd do it like this:
cat textfile | termsql -d ',' -o sqlite.db
alternatively you can do this:
termsql -i textfile -d ',' -o sqlite.db
By default it will generate column names "COL0", "COL1", if you want it to use the first row for the columns names you do this:
termsql -i textfile -d ',' -1 -o sqlite.db
If you want to set custom column names you do this:
termsql -i textfile -d ',' -c 'id,name,age,color' -o sqlite.db