Database stuff!

J

Justin To

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!
 
T

Todd Benson

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/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
 
R

Robert Klemme

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
 
J

Justin To

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!
 
G

Glen Holcomb

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

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!
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
 
J

Justin To

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

Thanks
 
B

ben baka

[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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top