[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Database stuff!

Justin To

6/30/2008 4:27:00 PM

Hi,

I know this is a Ruby forum, but it has been the most helpful to me in
my attempt at learning to program and what not.

I want to use MySQL and SQL in conjunction with Ruby.

Basically, I'm totally lost with the database stuff. I installed MySQL,
but have no clue where to go from there.
1. Is the database already setup after installing, if not, how do I set
it up? Also, from what I've read, SQL is a programming language used to
manipulate a database. Where's a good beginner's tutorial for this?
2. Where do I write SQL? Is there any SQL-specific editor to do this?

I've been working on parsing some .CSV file to capture some basic
statistics about it. Now, I want to send these statistics into a
database to store so I can compare multiple .CSV files later on.

Any help is appreciated. Like I said, I'm totally new to databases and
just need to kick start.

Thanks!
--
Posted via http://www.ruby-....

9 Answers

Todd Benson

6/30/2008 4:46:00 PM

0

On Mon, Jun 30, 2008 at 11:27 AM, Justin To <tekmc@hotmail.com> wrote:
> Hi,
>
> I know this is a Ruby forum, but it has been the most helpful to me in
> my attempt at learning to program and what not.
>
> I want to use MySQL and SQL in conjunction with Ruby.
>
> Basically, I'm totally lost with the database stuff. I installed MySQL,
> but have no clue where to go from there.
> 1. Is the database already setup after installing, if not, how do I set
> it up? Also, from what I've read, SQL is a programming language used to
> manipulate a database. Where's a good beginner's tutorial for this?
> 2. Where do I write SQL? Is there any SQL-specific editor to do this?
>
> I've been working on parsing some .CSV file to capture some basic
> statistics about it. Now, I want to send these statistics into a
> database to store so I can compare multiple .CSV files later on.
>
> Any help is appreciated. Like I said, I'm totally new to databases and
> just need to kick start.
>
> Thanks!

I'm not really a fan of MySQL, but they certainly have some decent
documentation you can look at. It seems pretty friendly...
http://dev.mysql.com/doc/refman/5.1/en/...

Some other sites are out there, too. I like postgresql.org doc page
on the SQL manual the best, so far. It's not MySQL, but should be
relatively standard SQL.

I'm sure you can find tutorial info on a quick google search.
Ultimately, you might have to buy a book (which I absolutely hate
doing since I'm overstocked already :).

Todd

ara.t.howard

6/30/2008 4:50:00 PM

0


On Jun 30, 2008, at 10:27 AM, Justin To wrote:

> Any help is appreciated. Like I said, I'm totally new to databases and
> just need to kick start.

use sqlite to get started

a @ http://codeforp...
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama




Robert Klemme

6/30/2008 6:05:00 PM

0

On 30.06.2008 18:27, Justin To wrote:
> I want to use MySQL and SQL in conjunction with Ruby.
>
> Basically, I'm totally lost with the database stuff. I installed MySQL,
> but have no clue where to go from there.
> 1. Is the database already setup after installing, if not, how do I set
> it up? Also, from what I've read, SQL is a programming language used to
> manipulate a database.

No, definitively not a programming language. SQL is a declarative
language that describes sets.

> Where's a good beginner's tutorial for this?

I'd suggest to look for this at www.mysql.com.

> 2. Where do I write SQL? Is there any SQL-specific editor to do this?

Many editors support SQL editing / syntax highlighting. Chances are
that your favorite text editor does as well - unless it's notepad. :-)

> I've been working on parsing some .CSV file to capture some basic
> statistics about it. Now, I want to send these statistics into a
> database to store so I can compare multiple .CSV files later on.

Often RDBMS have tools for loading mass data. I am not familiar with
mysql but I'm sure you find in the docs.

Searching for "sql tutorial" or "sql introduction" surely will turn up
useful stuff.

Kind regards

robert

Justin To

6/30/2008 7:12:00 PM

0

Hi, thanks for the help.

I've been reading mysql.com, but I can't even seem to test if the server
is running.

I type this in the Windows command prompt:
C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" --console
[http://dev.mysql.com/doc/refman/5.0/en/windows-server-first-...]

but an error comes up: ...not recognized as an internal or external
command, operable program or batch file.

I made sure that the MySQL folder was in the correct location.

This is what's in the folder .\bin:

libmySQL.dll
my_print_defaults.exe
myisam_ftdump.exe
myisamchk.exe
myisamlog.exe
myisampack.exe
mysql.exe
mysql_upgrade.exe
mysqladmin.exe
mysqlbinlog.exe
mysqlcheck.exe
mysqld-nt.exe
mysqld-nt.map
mysqld-nt.pdb
mysqldump.exe
mysqlimport.exe
MySQLInstanceConfig.exe
mysqlshow.exe
perror.exe

Thanks!
--
Posted via http://www.ruby-....

Glen Holcomb

6/30/2008 7:52:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

On Mon, Jun 30, 2008 at 1:11 PM, Justin To <tekmc@hotmail.com> wrote:

> Hi, thanks for the help.
>
> I've been reading mysql.com, but I can't even seem to test if the server
> is running.
>
> I type this in the Windows command prompt:
> C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" --console
> [http://dev.mysql.com/doc/refman/5.0/en/windows-server-first-...]
>
> but an error comes up: ...not recognized as an internal or external
> command, operable program or batch file.
>
> I made sure that the MySQL folder was in the correct location.
>
> This is what's in the folder .\bin:
>
> libmySQL.dll
> my_print_defaults.exe
> myisam_ftdump.exe
> myisamchk.exe
> myisamlog.exe
> myisampack.exe
> mysql.exe
> mysql_upgrade.exe
> mysqladmin.exe
> mysqlbinlog.exe
> mysqlcheck.exe
> mysqld-nt.exe
> mysqld-nt.map
> mysqld-nt.pdb
> mysqldump.exe
> mysqlimport.exe
> MySQLInstanceConfig.exe
> mysqlshow.exe
> perror.exe
>
> Thanks!
> --
> Posted via http://www.ruby-....
>
>
Justin, as far as Ruby and database interaction goes I would recommend an
ORM like ActiveRecord or Sequel, DataMapper looks cool too but doesn't work
well in Windows.

It might get you up and running faster if you looked into phpMyAdmin. It is
a php based "web tool" for interfacing with MySQL databases.

-Glen

--
"Hey brother Christian with your high and mighty errand, Your actions speak
so loud, I can't hear a word you're saying."

-Greg Graffin (Bad Religion)

Todd Benson

6/30/2008 8:45:00 PM

0

On Mon, Jun 30, 2008 at 2:11 PM, Justin To <tekmc@hotmail.com> wrote:
> Hi, thanks for the help.
>
> I've been reading mysql.com, but I can't even seem to test if the server
> is running.
>
> I type this in the Windows command prompt:
> C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" --console
> [http://dev.mysql.com/doc/refman/5.0/en/windows-server-first-...]

Still don't know much about MySQL, but maybe you need to run mysqld-nt.exe.

Todd

Justin To

6/30/2008 10:13:00 PM

0

I've finally figured it out. http://www.w3school... helped a lot.
I get it now, just type in the SQL commands inside the MySQL Command
Line =)
--
Posted via http://www.ruby-....

Justin To

7/1/2008 3:43:00 PM

0

What is recommended... using the Ruby MySQL module or using the Ruby DBI
module?

Thanks
--
Posted via http://www.ruby-....

ben baka

7/2/2008 11:28:00 AM

0

[Note: parts of this message were removed to make it a legal post.]

Ah,
If it is Mysql or *sql then i think that after you have tried them you
get yourself aquainted with ActiveRecord. Atleast from where i stand it
makes working with databases like Mysql a breeze.Try it.


On 6/30/08, Justin To <tekmc@hotmail.com> wrote:
>
> Hi,
>
> I know this is a Ruby forum, but it has been the most helpful to me in
> my attempt at learning to program and what not.
>
> I want to use MySQL and SQL in conjunction with Ruby.
>
> Basically, I'm totally lost with the database stuff. I installed MySQL,
> but have no clue where to go from there.
> 1. Is the database already setup after installing, if not, how do I set
> it up? Also, from what I've read, SQL is a programming language used to
> manipulate a database. Where's a good beginner's tutorial for this?
> 2. Where do I write SQL? Is there any SQL-specific editor to do this?
>
> I've been working on parsing some .CSV file to capture some basic
> statistics about it. Now, I want to send these statistics into a
> database to store so I can compare multiple .CSV files later on.
>
> Any help is appreciated. Like I said, I'm totally new to databases and
> just need to kick start.
>
> Thanks!
> --
> Posted via http://www.ruby-....
>
>


--
--Ben Baka
Blog : http://benjaminbaka.word...