{"id":467,"date":"2022-08-23T16:46:14","date_gmt":"2022-08-23T15:46:14","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/?page_id=467"},"modified":"2022-10-26T13:00:54","modified_gmt":"2022-10-26T12:00:54","slug":"keys","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/keys\/","title":{"rendered":"Keys"},"content":{"rendered":"<h2 style=\"color: red\"><b><span data-contrast=\"none\">PRIMARY KEY<\/span><\/b><\/h2>\n<p><span data-contrast=\"none\">A primary key is a field which<\/span><span data-contrast=\"none\">\u00a0<\/span><span data-contrast=\"none\">uniquely<\/span><span data-contrast=\"none\">\u00a0identifies<\/span><span data-contrast=\"none\">\u00a0a record in a table e.g. Mountain Name or Customer ID or email address<\/span><span data-contrast=\"none\">\u00a0<\/span><\/p>\n<h2 style=\"color: red\"><b>FOREIGN KEY<\/b><\/h2>\n<ul style=\"font-weight: 400\">\n<li>A foreign key is used to link both tables\u00a0 together.<\/li>\n<li>The foreign keys is in the many table and is link to the primary key in the other table.&gt;<\/li>\n<\/ul>\n<p><a href=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23164409\/keys.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-468\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23164409\/keys.png\" alt=\"\" width=\"1008\" height=\"460\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23164409\/keys.png 1008w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23164409\/keys-300x137.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23164409\/keys-768x350.png 768w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/08\/23164409\/keys-624x285.png 624w\" sizes=\"auto, (max-width: 1008px) 100vw, 1008px\" \/><\/a><\/p>\n<p>The Attribute <strong>countryCode<\/strong> is the <strong>Primary key<\/strong> in the <strong>Country<\/strong> entity, but is also the <strong>Foreign Key<\/strong> in the <strong>City<\/strong> entity.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PRIMARY KEY A primary key is a field which\u00a0uniquely\u00a0identifies\u00a0a record in a table e.g. Mountain Name or Customer ID or email address\u00a0 FOREIGN KEY A foreign key is used to link both tables\u00a0 together. The foreign keys is in the many table and is link to the primary key in the other table.&gt; The Attribute [&hellip;]<\/p>\n","protected":false},"author":79984,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-467","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages\/467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/users\/79984"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/comments?post=467"}],"version-history":[{"count":5,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages\/467\/revisions"}],"predecessor-version":[{"id":581,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages\/467\/revisions\/581"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/media?parent=467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}