Jonathan Denni wrote:> I have no programming experience prior to learning Ruby, and I have
> learned from reading Chris Pine''s Learn to Program and referencing
to
> http://www.ruby-doc.org/docs/ProgrammingRuby/
>
> I am developing two websites http://bluebottleimages.rubidot.com/ and
> http://partysushi.com/ using eruby and rhtml templates.
>
> I have a vague idea of what a database is.
> what is a database for? and what is the advantage over using basic IO to
> read/write .txt files or something? Do I have to learn Rails to use a
> database? and how can I learn to create/use them?
Databases store and retrieve sets of records. Take a look at the menu
page for your partysushi page. Each roll has a title, a picture and a
description. In the language of databases the menu would be a table.
Each roll would be a row. each row has 3 fields: picture, title, and
description. With Rails you can easily do 4 different types of
operations on these rows:
Create: (The cheif invents a new roll and wants it on the menu ASAP)
Read: (No more messy IO.Readlines to deal with)
Update: (Change the picture on the Spedo roll to include the Cheif in
his swimsuit)
Destroy: (Get rid of the Lemon Curry roll no one likes it)
Note: the acronym CRUD is used to refer to all these.
Rails will help you to make you site more dynamic and is IMHO easier to
learn then the Rails IO classes.
Check out one of the Getting Started Guides.
John Miller
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---