You can refer to this SQL tutorial or RDBMS tutorial to learn more. There are also numerous related guides that you may find useful: Active Record Basics - Learn about Active Record models, ...