{"action":"created","comment":{"url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/comments/235205145","pull_request_review_id":177018818,"id":235205145,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTIwNTE0NQ==","diff_hunk":"@@ -61,6 +61,37 @@ Figure 4 - Example of Pet table with owner field linked.\n \n A one-to-many relationship is one record linked to many other records, the example being the user Jerry having two pets. It could also be a many-to-many relationship where the tables could be books and authors, as authors could co-write many books. Finally the most common relationship type is one-to-one, a record that can only be linked to one, and only one, other record.\n \n+### Foreign key\n+\n+To describe the Relationships above, Foreign keys(FK) should be be used to link table to tables.","path":"guide/english/computer-science/databases/relational-databases/index.md","position":6,"original_position":6,"commit_id":"936910ffee01974b5e801cd3bc72b7c94f28c456","original_commit_id":"936910ffee01974b5e801cd3bc72b7c94f28c456","user":{"login":"nikrb","id":16709534,"node_id":"MDQ6VXNlcjE2NzA5NTM0","avatar_url":"https://avatars3.githubusercontent.com/u/16709534?v=4","gravatar_id":"","url":"https://api.github.com/users/nikrb","html_url":"https://github.com/nikrb","followers_url":"https://api.github.com/users/nikrb/followers","following_url":"https://api.github.com/users/nikrb/following{/other_user}","gists_url":"https://api.github.com/users/nikrb/gists{/gist_id}","starred_url":"https://api.github.com/users/nikrb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikrb/subscriptions","organizations_url":"https://api.github.com/users/nikrb/orgs","repos_url":"https://api.github.com/users/nikrb/repos","events_url":"https://api.github.com/users/nikrb/events{/privacy}","received_events_url":"https://api.github.com/users/nikrb/received_events","type":"User","site_admin":false},"body":"typo: ... should be **be** used ...\r\nI think the end would be better as: `... used to link tables.`","created_at":"2018-11-20T23:19:14Z","updated_at":"2018-11-20T23:20:09Z","html_url":"https://github.com/freeCodeCamp/freeCodeCamp/pull/22388#discussion_r235205145","pull_request_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/22388","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/comments/235205145"},"html":{"href":"https://github.com/freeCodeCamp/freeCodeCamp/pull/22388#discussion_r235205145"},"pull_request":{"href":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/22388"}}},"pull_request":{"url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/22388","id":224237724,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MjM3NzI0","html_url":"https://github.com/freeCodeCamp/freeCodeCamp/pull/22388","diff_url":"https://github.com/freeCodeCamp/freeCodeCamp/pull/22388.diff","patch_url":"https://github.com/freeCodeCamp/freeCodeCamp/pull/22388.patch","issue_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/22388","number":22388,"state":"open","locked":false,"title":"Add foreign key definition and example","user":{"login":"sirhung1993","id":8535911,"node_id":"MDQ6VXNlcjg1MzU5MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/8535911?v=4","gravatar_id":"","url":"https://api.github.com/users/sirhung1993","html_url":"https://github.com/sirhung1993","followers_url":"https://api.github.com/users/sirhung1993/followers","following_url":"https://api.github.com/users/sirhung1993/following{/other_user}","gists_url":"https://api.github.com/users/sirhung1993/gists{/gist_id}","starred_url":"https://api.github.com/users/sirhung1993/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirhung1993/subscriptions","organizations_url":"https://api.github.com/users/sirhung1993/orgs","repos_url":"https://api.github.com/users/sirhung1993/repos","events_url":"https://api.github.com/users/sirhung1993/events{/privacy}","received_events_url":"https://api.github.com/users/sirhung1993/received_events","type":"User","site_admin":false},"body":"A very basic foreign key definition and example\r\n\r\n<!-- Please follow this checklist and put an x in each of the boxes, like this: [x]. It will ensure that our team takes your pull request seriously. -->\r\n\r\n- [x] I have read [freeCodeCamp's contribution guidelines](https://github.com/freeCodeCamp/freeCodeCamp/blob/master/CONTRIBUTING.md).\r\n- [x] My pull request has a descriptive title (not a vague title like `Update index.md`)\r\n- [ ] My pull request targets the `master` branch of freeCodeCamp.\r\n- [x] None of my changes are plagiarized from another source without proper attribution.\r\n- [x] My article does not contain shortened URLs or affiliate links.\r\n\r\nIf your pull request closes a GitHub issue, replace the XXXXX below with the issue number.\r\n\r\nCloses #XXXXX\r\n","created_at":"2018-10-19T10:17:25Z","updated_at":"2018-11-20T23:20:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d734507c6695bdcb1dcfa68c21eb0add0987f5ff","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1088400742,"node_id":"MDU6TGFiZWwxMDg4NDAwNzQy","url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/labels/scope:%20guide","name":"scope: guide","color":"9631e2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/22388/commits","review_comments_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/22388/comments","review_comment_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/22388/comments","statuses_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/statuses/936910ffee01974b5e801cd3bc72b7c94f28c456","head":{"label":"sirhung1993:patch-1","ref":"patch-1","sha":"936910ffee01974b5e801cd3bc72b7c94f28c456","user":{"login":"sirhung1993","id":8535911,"node_id":"MDQ6VXNlcjg1MzU5MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/8535911?v=4","gravatar_id":"","url":"https://api.github.com/users/sirhung1993","html_url":"https://github.com/sirhung1993","followers_url":"https://api.github.com/users/sirhung1993/followers","following_url":"https://api.github.com/users/sirhung1993/following{/other_user}","gists_url":"https://api.github.com/users/sirhung1993/gists{/gist_id}","starred_url":"https://api.github.com/users/sirhung1993/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirhung1993/subscriptions","organizations_url":"https://api.github.com/users/sirhung1993/orgs","repos_url":"https://api.github.com/users/sirhung1993/repos","events_url":"https://api.github.com/users/sirhung1993/events{/privacy}","received_events_url":"https://api.github.com/users/sirhung1993/received_events","type":"User","site_admin":false},"repo":{"id":153713703,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM3MTM3MDM=","name":"freeCodeCamp","full_name":"sirhung1993/freeCodeCamp","private":false,"owner":{"login":"sirhung1993","id":8535911,"node_id":"MDQ6VXNlcjg1MzU5MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/8535911?v=4","gravatar_id":"","url":"https://api.github.com/users/sirhung1993","html_url":"https://github.com/sirhung1993","followers_url":"https://api.github.com/users/sirhung1993/followers","following_url":"https://api.github.com/users/sirhung1993/following{/other_user}","gists_url":"https://api.github.com/users/sirhung1993/gists{/gist_id}","starred_url":"https://api.github.com/users/sirhung1993/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirhung1993/subscriptions","organizations_url":"https://api.github.com/users/sirhung1993/orgs","repos_url":"https://api.github.com/users/sirhung1993/repos","events_url":"https://api.github.com/users/sirhung1993/events{/privacy}","received_events_url":"https://api.github.com/users/sirhung1993/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sirhung1993/freeCodeCamp","description":"The https://freeCodeCamp.org open source codebase and curriculum. Learn to code for free together with millions of people.","fork":true,"url":"https://api.github.com/repos/sirhung1993/freeCodeCamp","forks_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/forks","keys_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/teams","hooks_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/hooks","issue_events_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/issues/events{/number}","events_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/events","assignees_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/assignees{/user}","branches_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/branches{/branch}","tags_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/tags","blobs_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/git/refs{/sha}","trees_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/statuses/{sha}","languages_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/languages","stargazers_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/stargazers","contributors_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/contributors","subscribers_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/subscribers","subscription_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/subscription","commits_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/commits{/sha}","git_commits_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/git/commits{/sha}","comments_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/comments{/number}","issue_comment_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/issues/comments{/number}","contents_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/contents/{+path}","compare_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/merges","archive_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/downloads","issues_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/issues{/number}","pulls_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/pulls{/number}","milestones_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/milestones{/number}","notifications_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/labels{/name}","releases_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/releases{/id}","deployments_url":"https://api.github.com/repos/sirhung1993/freeCodeCamp/deployments","created_at":"2018-10-19T02:12:18Z","updated_at":"2018-10-19T02:13:19Z","pushed_at":"2018-10-27T07:30:55Z","git_url":"git://github.com/sirhung1993/freeCodeCamp.git","ssh_url":"git@github.com:sirhung1993/freeCodeCamp.git","clone_url":"https://github.com/sirhung1993/freeCodeCamp.git","svn_url":"https://github.com/sirhung1993/freeCodeCamp","homepage":"","size":93743,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"freeCodeCamp:master","ref":"master","sha":"8147a9b93e33b19520ab8a3558b75ce690a14594","user":{"login":"freeCodeCamp","id":9892522,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4OTI1MjI=","avatar_url":"https://avatars0.githubusercontent.com/u/9892522?v=4","gravatar_id":"","url":"https://api.github.com/users/freeCodeCamp","html_url":"https://github.com/freeCodeCamp","followers_url":"https://api.github.com/users/freeCodeCamp/followers","following_url":"https://api.github.com/users/freeCodeCamp/following{/other_user}","gists_url":"https://api.github.com/users/freeCodeCamp/gists{/gist_id}","starred_url":"https://api.github.com/users/freeCodeCamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeCodeCamp/subscriptions","organizations_url":"https://api.github.com/users/freeCodeCamp/orgs","repos_url":"https://api.github.com/users/freeCodeCamp/repos","events_url":"https://api.github.com/users/freeCodeCamp/events{/privacy}","received_events_url":"https://api.github.com/users/freeCodeCamp/received_events","type":"Organization","site_admin":false},"repo":{"id":28457823,"node_id":"MDEwOlJlcG9zaXRvcnkyODQ1NzgyMw==","name":"freeCodeCamp","full_name":"freeCodeCamp/freeCodeCamp","private":false,"owner":{"login":"freeCodeCamp","id":9892522,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4OTI1MjI=","avatar_url":"https://avatars0.githubusercontent.com/u/9892522?v=4","gravatar_id":"","url":"https://api.github.com/users/freeCodeCamp","html_url":"https://github.com/freeCodeCamp","followers_url":"https://api.github.com/users/freeCodeCamp/followers","following_url":"https://api.github.com/users/freeCodeCamp/following{/other_user}","gists_url":"https://api.github.com/users/freeCodeCamp/gists{/gist_id}","starred_url":"https://api.github.com/users/freeCodeCamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeCodeCamp/subscriptions","organizations_url":"https://api.github.com/users/freeCodeCamp/orgs","repos_url":"https://api.github.com/users/freeCodeCamp/repos","events_url":"https://api.github.com/users/freeCodeCamp/events{/privacy}","received_events_url":"https://api.github.com/users/freeCodeCamp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/freeCodeCamp/freeCodeCamp","description":"The https://freeCodeCamp.org open source codebase and curriculum. Learn to code for free together with millions of people.","fork":false,"url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp","forks_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/forks","keys_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/teams","hooks_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/hooks","issue_events_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/events{/number}","events_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/events","assignees_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/assignees{/user}","branches_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/branches{/branch}","tags_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/tags","blobs_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/git/refs{/sha}","trees_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/statuses/{sha}","languages_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/languages","stargazers_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/stargazers","contributors_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/contributors","subscribers_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/subscribers","subscription_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/subscription","commits_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/commits{/sha}","git_commits_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/git/commits{/sha}","comments_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/comments{/number}","issue_comment_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/comments{/number}","contents_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/contents/{+path}","compare_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/merges","archive_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/downloads","issues_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues{/number}","pulls_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls{/number}","milestones_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/milestones{/number}","notifications_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/labels{/name}","releases_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/releases{/id}","deployments_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/deployments","created_at":"2014-12-24T17:49:19Z","updated_at":"2018-11-20T22:42:47Z","pushed_at":"2018-11-20T23:07:58Z","git_url":"git://github.com/freeCodeCamp/freeCodeCamp.git","ssh_url":"git@github.com:freeCodeCamp/freeCodeCamp.git","clone_url":"https://github.com/freeCodeCamp/freeCodeCamp.git","svn_url":"https://github.com/freeCodeCamp/freeCodeCamp","homepage":"","size":101613,"stargazers_count":296173,"watchers_count":296173,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":20494,"mirror_url":null,"archived":false,"open_issues_count":9465,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":20494,"open_issues":9465,"watchers":296173,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/22388"},"html":{"href":"https://github.com/freeCodeCamp/freeCodeCamp/pull/22388"},"issue":{"href":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/22388"},"comments":{"href":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/22388/comments"},"review_comments":{"href":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/22388/comments"},"review_comment":{"href":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/22388/commits"},"statuses":{"href":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/statuses/936910ffee01974b5e801cd3bc72b7c94f28c456"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nikrb"}}