CSV , MySQL or SQL Server

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)

Is there any way for managing directly from rails my application on
delphi?
I need some ideas for reading automatically the info. held it in the
*.csv files and later save it to a DB (SQL server or MySQL). Then I
wanna build an Rails´s app for managing the data stored/held into the
DB.
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.

Thanks.

On Tue, Nov 8, 2011 at 08:23, Rolando S. [email protected]
wrote:

  • 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. Ive 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.

-Dave


LOOKING FOR WORK! What: Ruby (on/off Rails), Python, other modern
languages.
Where: Northern Virginia, Washington DC (near Orange Line), and remote
work.
See: davearonson.com (main) * codosaur.us (code) * dare2xl.com
(excellence).
Specialization is for insects. (Heinlein) - Have Pun, Will Babble!
(Aronson)

On Nov 8, 2011, at 7:24 AM, Dave A. wrote:

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.

If the number of tables is fixed, and the only variation is the
structure of those tables, it can be much easier.


Scott R.
[email protected]
http://www.elevated-dev.com/
(303) 722-0567 voice

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs