{"action":"created","comment":{"url":"https://api.github.com/repos/ga-dc/curriculum/pulls/comments/43660869","id":43660869,"diff_hunk":"@@ -20,55 +20,62 @@\n \n \n ## Opening Framing (15m)\n-We now have a way to persist data in a database. We've also learned about OOP in Ruby how we can represent things in real life programmatically as objects. Which is AWESOME! But really databases just seems like data in this kind of cryptic place on our local computer.  We have to make super long SQL statements to do CRUD. It'd be really nice if we had some kind of way to interface between the database and our servers/applications in order to streamline this process. Enter ORM's.\n+Think about what we have learned so far in this unit. We now have a way to persist data in a database. We've also learned about how OOP allows us to programmatically represent real things as objects in ruby. Which is AWESOME! But really databases just seems like data in this kind of cryptic place on our local computer.  We have to make super long SQL statements to do CRUD. It'd be really nice if we had some kind of way to interface between the database and our servers/applications in order to streamline this process. Enter ORM's.\n \n-Information Dive(5m)\n+### Information Dive(5m)\n For the next 5 minutes, research what ORM's are.\n \n [ORM - wikipedia](https://en.wikipedia.org/wiki/Object-relational_mapping)\n \n [AR Read 1.1 - 1.3](http://guides.rubyonrails.org/active_record_basics.html)\n \n-T&T (5m)\n+### T&T (5m)\n Now, turn & talk to your neighbor and discuss:\n-- at a high level, what ORM's are and how they might be useful\n-- what's the importance of interfacing the server with the database\n+1. At a high level, what are ORM's and how might they be useful?\n+2. What is the importance of interfacing the server with the database?\n \n ## ORM's & Active Record (15m)\n - *Official* wikipedia definition. A programming technique for converting data between incompatible type systems in object-oriented programming languages.\n+\n > Thats sounds like a lot of 5 dollar words, but what does it really mean?\n \n-We need a way to encapsulate our databases into objects that we can talk to on our server. ORM's serve that purpose. That table we created in SQL? Well, its an object on our server now. That's what ORM's do.\n+We need a way to encapsulate our databases into objects that we can talk to on our server. ORM's serve that purpose. Remember those tables we created in SQL? Well, its an object represented on our server now. That's what ORM's do.\n \n-More concretely they:\n-- They 'map' (translate) objects to rows in our DB (and vice versa)\n-- 1 table per Model/Class/Entity\n+More concretely ORM's:\n+- 'Map' (translate) objects to rows in our DB (and vice versa)\n+- **Conventions**:\n+  - 1 table per Model/Class/Entity\n   - table name is model name pluralized\n   - each column is an attribute for that model\n-- Handles associations using foreign keys\n+- Table associations are handled using foreign keys\n \n-It just so happens you guys will be learning one of the best ORM's on the market. It has some of the best documentation and best syntax(because ruby is awesome) the industry has to offer. This ORM is Active Record.","path":"04-ruby-mvc-sinatra/active-record-intro/readme.md","position":43,"original_position":43,"commit_id":"8dbcbb6023eea475b709429f48c2da1a6879cae5","original_commit_id":"8dbcbb6023eea475b709429f48c2da1a6879cae5","user":{"login":"jshawl","id":3824954,"avatar_url":"https://avatars.githubusercontent.com/u/3824954?v=3","gravatar_id":"","url":"https://api.github.com/users/jshawl","html_url":"https://github.com/jshawl","followers_url":"https://api.github.com/users/jshawl/followers","following_url":"https://api.github.com/users/jshawl/following{/other_user}","gists_url":"https://api.github.com/users/jshawl/gists{/gist_id}","starred_url":"https://api.github.com/users/jshawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshawl/subscriptions","organizations_url":"https://api.github.com/users/jshawl/orgs","repos_url":"https://api.github.com/users/jshawl/repos","events_url":"https://api.github.com/users/jshawl/events{/privacy}","received_events_url":"https://api.github.com/users/jshawl/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2015-11-02T18:18:15Z","updated_at":"2015-11-02T18:18:15Z","html_url":"https://github.com/ga-dc/curriculum/pull/408#discussion_r43660869","pull_request_url":"https://api.github.com/repos/ga-dc/curriculum/pulls/408","_links":{"self":{"href":"https://api.github.com/repos/ga-dc/curriculum/pulls/comments/43660869"},"html":{"href":"https://github.com/ga-dc/curriculum/pull/408#discussion_r43660869"},"pull_request":{"href":"https://api.github.com/repos/ga-dc/curriculum/pulls/408"}}},"pull_request":{"url":"https://api.github.com/repos/ga-dc/curriculum/pulls/408","id":49392010,"html_url":"https://github.com/ga-dc/curriculum/pull/408","diff_url":"https://github.com/ga-dc/curriculum/pull/408.diff","patch_url":"https://github.com/ga-dc/curriculum/pull/408.patch","issue_url":"https://api.github.com/repos/ga-dc/curriculum/issues/408","number":408,"state":"open","locked":false,"title":"active record: made minor changes to lesson plan, update markdown formatting","user":{"login":"nolds9","id":10698044,"avatar_url":"https://avatars.githubusercontent.com/u/10698044?v=3","gravatar_id":"","url":"https://api.github.com/users/nolds9","html_url":"https://github.com/nolds9","followers_url":"https://api.github.com/users/nolds9/followers","following_url":"https://api.github.com/users/nolds9/following{/other_user}","gists_url":"https://api.github.com/users/nolds9/gists{/gist_id}","starred_url":"https://api.github.com/users/nolds9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolds9/subscriptions","organizations_url":"https://api.github.com/users/nolds9/orgs","repos_url":"https://api.github.com/users/nolds9/repos","events_url":"https://api.github.com/users/nolds9/events{/privacy}","received_events_url":"https://api.github.com/users/nolds9/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-02T03:32:18Z","updated_at":"2015-11-02T18:18:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83539125946a93388f8e2761541c06834386fbfd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ga-dc/curriculum/pulls/408/commits","review_comments_url":"https://api.github.com/repos/ga-dc/curriculum/pulls/408/comments","review_comment_url":"https://api.github.com/repos/ga-dc/curriculum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-dc/curriculum/issues/408/comments","statuses_url":"https://api.github.com/repos/ga-dc/curriculum/statuses/8dbcbb6023eea475b709429f48c2da1a6879cae5","head":{"label":"ga-dc:active-record","ref":"active-record","sha":"8dbcbb6023eea475b709429f48c2da1a6879cae5","user":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"repo":{"id":36871385,"name":"curriculum","full_name":"ga-dc/curriculum","owner":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-dc/curriculum","description":"","fork":false,"url":"https://api.github.com/repos/ga-dc/curriculum","forks_url":"https://api.github.com/repos/ga-dc/curriculum/forks","keys_url":"https://api.github.com/repos/ga-dc/curriculum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-dc/curriculum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-dc/curriculum/teams","hooks_url":"https://api.github.com/repos/ga-dc/curriculum/hooks","issue_events_url":"https://api.github.com/repos/ga-dc/curriculum/issues/events{/number}","events_url":"https://api.github.com/repos/ga-dc/curriculum/events","assignees_url":"https://api.github.com/repos/ga-dc/curriculum/assignees{/user}","branches_url":"https://api.github.com/repos/ga-dc/curriculum/branches{/branch}","tags_url":"https://api.github.com/repos/ga-dc/curriculum/tags","blobs_url":"https://api.github.com/repos/ga-dc/curriculum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-dc/curriculum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-dc/curriculum/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-dc/curriculum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-dc/curriculum/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-dc/curriculum/languages","stargazers_url":"https://api.github.com/repos/ga-dc/curriculum/stargazers","contributors_url":"https://api.github.com/repos/ga-dc/curriculum/contributors","subscribers_url":"https://api.github.com/repos/ga-dc/curriculum/subscribers","subscription_url":"https://api.github.com/repos/ga-dc/curriculum/subscription","commits_url":"https://api.github.com/repos/ga-dc/curriculum/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-dc/curriculum/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-dc/curriculum/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-dc/curriculum/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-dc/curriculum/contents/{+path}","compare_url":"https://api.github.com/repos/ga-dc/curriculum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-dc/curriculum/merges","archive_url":"https://api.github.com/repos/ga-dc/curriculum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-dc/curriculum/downloads","issues_url":"https://api.github.com/repos/ga-dc/curriculum/issues{/number}","pulls_url":"https://api.github.com/repos/ga-dc/curriculum/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-dc/curriculum/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-dc/curriculum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-dc/curriculum/labels{/name}","releases_url":"https://api.github.com/repos/ga-dc/curriculum/releases{/id}","created_at":"2015-06-04T13:18:59Z","updated_at":"2015-10-25T12:57:31Z","pushed_at":"2015-11-02T14:59:31Z","git_url":"git://github.com/ga-dc/curriculum.git","ssh_url":"git@github.com:ga-dc/curriculum.git","clone_url":"https://github.com/ga-dc/curriculum.git","svn_url":"https://github.com/ga-dc/curriculum","homepage":"https://ga-dc.github.io/curriculum/","size":123322,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":118,"mirror_url":null,"open_issues_count":56,"forks":118,"open_issues":56,"watchers":15,"default_branch":"master"}},"base":{"label":"ga-dc:master","ref":"master","sha":"3e8753dfde157e842603c6b38a4b60f36012bbf8","user":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"repo":{"id":36871385,"name":"curriculum","full_name":"ga-dc/curriculum","owner":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-dc/curriculum","description":"","fork":false,"url":"https://api.github.com/repos/ga-dc/curriculum","forks_url":"https://api.github.com/repos/ga-dc/curriculum/forks","keys_url":"https://api.github.com/repos/ga-dc/curriculum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-dc/curriculum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-dc/curriculum/teams","hooks_url":"https://api.github.com/repos/ga-dc/curriculum/hooks","issue_events_url":"https://api.github.com/repos/ga-dc/curriculum/issues/events{/number}","events_url":"https://api.github.com/repos/ga-dc/curriculum/events","assignees_url":"https://api.github.com/repos/ga-dc/curriculum/assignees{/user}","branches_url":"https://api.github.com/repos/ga-dc/curriculum/branches{/branch}","tags_url":"https://api.github.com/repos/ga-dc/curriculum/tags","blobs_url":"https://api.github.com/repos/ga-dc/curriculum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-dc/curriculum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-dc/curriculum/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-dc/curriculum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-dc/curriculum/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-dc/curriculum/languages","stargazers_url":"https://api.github.com/repos/ga-dc/curriculum/stargazers","contributors_url":"https://api.github.com/repos/ga-dc/curriculum/contributors","subscribers_url":"https://api.github.com/repos/ga-dc/curriculum/subscribers","subscription_url":"https://api.github.com/repos/ga-dc/curriculum/subscription","commits_url":"https://api.github.com/repos/ga-dc/curriculum/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-dc/curriculum/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-dc/curriculum/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-dc/curriculum/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-dc/curriculum/contents/{+path}","compare_url":"https://api.github.com/repos/ga-dc/curriculum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-dc/curriculum/merges","archive_url":"https://api.github.com/repos/ga-dc/curriculum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-dc/curriculum/downloads","issues_url":"https://api.github.com/repos/ga-dc/curriculum/issues{/number}","pulls_url":"https://api.github.com/repos/ga-dc/curriculum/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-dc/curriculum/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-dc/curriculum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-dc/curriculum/labels{/name}","releases_url":"https://api.github.com/repos/ga-dc/curriculum/releases{/id}","created_at":"2015-06-04T13:18:59Z","updated_at":"2015-10-25T12:57:31Z","pushed_at":"2015-11-02T14:59:31Z","git_url":"git://github.com/ga-dc/curriculum.git","ssh_url":"git@github.com:ga-dc/curriculum.git","clone_url":"https://github.com/ga-dc/curriculum.git","svn_url":"https://github.com/ga-dc/curriculum","homepage":"https://ga-dc.github.io/curriculum/","size":123322,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":118,"mirror_url":null,"open_issues_count":56,"forks":118,"open_issues":56,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-dc/curriculum/pulls/408"},"html":{"href":"https://github.com/ga-dc/curriculum/pull/408"},"issue":{"href":"https://api.github.com/repos/ga-dc/curriculum/issues/408"},"comments":{"href":"https://api.github.com/repos/ga-dc/curriculum/issues/408/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-dc/curriculum/pulls/408/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-dc/curriculum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-dc/curriculum/pulls/408/commits"},"statuses":{"href":"https://api.github.com/repos/ga-dc/curriculum/statuses/8dbcbb6023eea475b709429f48c2da1a6879cae5"}}}}