First things first, when starting to learn something like this, read a book.
If its Rails you are interested in, you could probably skip buying a book on databases, but would advise:
For online guides, Rails has its own 'Rails guides' - http://guides.rubyonrails.org/
For a free guide to Ruby you could try the online pickaxe http://whytheluckystiff.net/ruby/pickaxe/
The plus side to Rails is that you have a Ruby API to access your database (in the form of ActiveRecord) where you can skip out (initially) on learning a lot of SQL (not recommended for performance applications, but good for starting with).
My advice is to learn this stuff before you go on to AJAX.
Oh, and skip web development on Windows, go install VMWare Server and install any distribution, though, for ease of use try Ubuntu (unless you are already on a Linux machine / Mac), it will save you lots of development headaches later on, though may be a pain initially. There are guides for getting set up for this all over Google.
As for your question on databases, even though the books may suggest using sqlite, try and avoid it, and go for something like Postgres instead of MySQL, the benefits will become obvious to you once you start looking at more advanced SQL stuff.