Database stuff!

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!

On Mon, Jun 30, 2008 at 11:27 AM, Justin To [email protected] wrote:

it up? Also, from what I’ve read, SQL is a programming language used to
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/index.html

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

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://codeforpeople.com/

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.

  1. 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. :slight_smile:

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

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-start.html]

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!

On Mon, Jun 30, 2008 at 1:11 PM, Justin To [email protected] wrote:

command, operable program or batch file.
myisampack.exe
MySQLInstanceConfig.exe
mysqlshow.exe
perror.exe

Thanks!

Posted via http://www.ruby-forum.com/.

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)

On Mon, Jun 30, 2008 at 2:11 PM, Justin To [email protected] 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-start.html]

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

Todd

I’ve finally figured it out. http://www.w3schools.com/sql/ helped a lot.
I get it now, just type in the SQL commands inside the MySQL Command
Line =)

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

Thanks

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.

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