[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: Software that will populate a database from csv data?



On Fri, Jul 22, 2011 at 04:44:53PM +0300, George wrote:
> I'm looking for software that will accept as input a csv file and a database
> schema and will populate the database with the data in the csv. I'm not talking
> about something simple that will fill a single table, but rather something that
> can work foreign key constraints and can respect one-to-many, many-to-one and
> many-to-many relations.

You haven't told us which database software you're using (CSV is a kind
of database, but I'll ignore the trivial cp), so I'll assume mysql.

$ mysqlimport --fields-terminated-by=\, --fields-enclosed-by=\" MyDatabase
MyBackup.csv

> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] CAO=sJoVt_U_TJUHuyE7fWFpb+6s+m1dXOQDpw1VZGh-75FbAvg@mail.gmail.com">http://lists.debian.org/[🔎] CAO=sJoVt_U_TJUHuyE7fWFpb+6s+m1dXOQDpw1VZGh-75FbAvg@mail.gmail.com
> 

-- 
-- 
Paul Saunders

Attachment: signature.asc
Description: Digital signature


Reply to: