On Fri, Jul 22, 2011 at 6:42 PM, Darac Marjal <mailingl...@darac.org.uk> wrote: > 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
But that only works for a single table, please re-read my original post. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAO=sJoU9vu6CRmi8mBOOo0cXwFt8Jn6zd=RAt=7g5jbm7dt...@mail.gmail.com