Hello every body
I´m new in rails and I need to know the following:
- I have 4 *.csvfiles which are generated automatically by an
application made it in delphi.
- I need to take those files (.csv) and migrate them o save them (its
info not them as a entire file) into a DB modeled on MySQl or SQL Server
(automatically and preferably to MySQL)
- I want to do an application who let me do this(that generate for me
the tables and their implicit relations, and also save its contents)
- I need to take those files (.csv) and migrate them o save them (its
info not them as a entire file) into a DB modeled on MySQl or SQL Server
(automatically and preferably to MySQL)
- I want to do an application who let me do this(that generate for me
the tables and their implicit relations, and also save its contents)
I'm not sure what you mean.
Are the tables schemas already *known*, just the tables themselves
have not necessarily been created yet? In that case it's just a
simple matter of creating the tables if needed, slurping up the data,
and sticking it into the database. (Trivial, and I should know,
that's mostly what I did at the job before last, which I quit partly
because it was so BORING!) Since you say:
Some of those *.csv files could generate more than a table. I´ve four of
them and I think I will have 11 tables at least.
it sounds like you may need to hold them in some intermediate objects,
so not quite so trivial.
Or do you mean that the content of these data files will dictate what
the tables' schemas should be? That's a little more challenging. Off
the top of my head you could read them in, create a database
migration, migrate, then dump the data into the tables. Apart from
ActiveRecord being handy, you wouldn't even need Rails.