{"id":477274,"date":"2023-08-09T09:10:23","date_gmt":"2023-08-09T09:10:23","guid":{"rendered":""},"modified":"2023-09-05T11:14:24","modified_gmt":"2023-09-05T11:14:24","slug":"foreign-key","status":"publish","type":"wiki","link":"https:\/\/oneproxy.pro\/kr\/wiki\/foreign-key\/","title":{"rendered":"\uc678\ub798 \ud0a4"},"content":{"rendered":"<p>\uc678\ub798 \ud0a4\ub294 \uad00\uacc4\ud615 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \ub450 \ud14c\uc774\ube14 \uac04\uc758 \uad00\uacc4\ub97c \uc124\uc815\ud558\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uad00\ub9ac \uc2dc\uc2a4\ud15c\uc758 \uae30\ubcf8 \uac1c\ub150\uc785\ub2c8\ub2e4. \ud55c \ud14c\uc774\ube14\uc758 \uae30\ubcf8 \ud0a4\uc640 \ub2e4\ub978 \ud14c\uc774\ube14\uc758 \ud574\ub2f9 \ud544\ub4dc \uac04\uc758 \uc5f0\uacb0\uc744 \uc801\uc6a9\ud558\uc5ec \ub370\uc774\ud130 \ubb34\uacb0\uc131\uc744 \ubcf4\uc7a5\ud558\uace0 \ucc38\uc870 \ubb34\uacb0\uc131\uc744 \uc720\uc9c0\ud569\ub2c8\ub2e4. \uc774 \uac15\ub825\ud55c \ub3c4\uad6c\ub97c \uc0ac\uc6a9\ud558\uba74 \uac1c\ubc1c\uc790\ub294 \ub370\uc774\ud130 \uac04\uc758 \uc758\ubbf8 \uc788\ub294 \uc5f0\uacb0\uc744 \uc0dd\uc131\ud558\uc5ec \ubcf5\uc7a1\ud55c \ub370\uc774\ud130 \uac80\uc0c9 \ubc0f \ubd84\uc11d\uc744 \uc6a9\uc774\ud558\uac8c \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>\uc678\ub798 \ud0a4\uc758 \uc720\ub798\uc640 \ucd5c\ucd08 \uc5b8\uae09\uc758 \uc5ed\uc0ac<\/h2>\n<p>\uc678\ub798 \ud0a4\uc758 \uac1c\ub150\uc740 1970\ub144\uc5d0 \ucd9c\ud310\ub41c &quot;\ub300\uaddc\ubaa8 \uacf5\uc720 \ub370\uc774\ud130 \uc740\ud589\uc744 \uc704\ud55c \ub370\uc774\ud130\uc758 \uad00\uacc4\ud615 \ubaa8\ub378&quot;\uc774\ub77c\ub294 \uc81c\ubaa9\uc758 EF Codd\uc758 \ub17c\ubb38\uc5d0\uc11c \ucc98\uc74c \uc18c\uac1c\ub418\uc5c8\uc2b5\ub2c8\ub2e4. Codd\ub294 \uad00\uacc4\ud615 \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubaa8\ub378\uc758 \ud1a0\ub300\ub97c \ub9c8\ub828\ud588\uc73c\uba70 \uc678\ub798 \ud0a4\ub294 \uadf8 \uc911 \ud558\ub098\ub85c \ub4f1\uc7a5\ud588\uc2b5\ub2c8\ub2e4. \uc911\uc694\ud55c \uad6c\uc131 \uc694\uc18c.<\/p>\n<h2>\uc678\ub798 \ud0a4\uc5d0 \ub300\ud55c \uc790\uc138\ud55c \uc815\ubcf4\uc785\ub2c8\ub2e4. \uc8fc\uc81c \ud655\uc7a5 \uc678\ub798 \ud0a4<\/h2>\n<p>\uc678\ub798 \ud0a4\ub294 \uad00\uacc4\ud615 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0\uc11c \ub370\uc774\ud130 \ubb34\uacb0\uc131\uc744 \uc720\uc9c0\ud558\ub294 \ub370 \uc911\uc694\ud55c \uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4. \ub450 \ud14c\uc774\ube14 \uc0ac\uc774\uc5d0 \uc678\ub798 \ud0a4\uac00 \uc124\uc815\ub418\uba74 \ud55c \ud14c\uc774\ube14\uc758 \uc678\ub798 \ud0a4 \uc5f4 \uac12\uc774 \ub2e4\ub978 \ud14c\uc774\ube14\uc758 \uae30\ubcf8 \ud0a4 \uc5f4 \uac12\uacfc \uc77c\uce58\ud558\ub294\uc9c0 \ud655\uc778\ub429\ub2c8\ub2e4. \uc774\ub7f0 \ubc29\uc2dd\uc73c\ub85c \ud14c\uc774\ube14 \uac04\uc5d0 \ubd80\ubaa8-\uc790\uc2dd \uad00\uacc4\uac00 \uc0dd\uc131\ub429\ub2c8\ub2e4.<\/p>\n<p>\uc678\ub798 \ud0a4\uc758 \uc8fc\uc694 \ubaa9\uc801\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\n<p><strong>\ucc38\uc870 \ubb34\uacb0\uc131:<\/strong> \uc678\ub798 \ud0a4\ub294 \uc885\uc18d \ud14c\uc774\ube14(\ud558\uc704)\uc758 \ub370\uc774\ud130\uac00 \ucc38\uc870 \ud14c\uc774\ube14(\uc0c1\uc704)\uc758 \ub370\uc774\ud130\uc640 \uc815\ud655\ud558\uac8c \uc77c\uce58\ud568\uc744 \ubcf4\uc7a5\ud569\ub2c8\ub2e4. \uace0\uc544 \ub808\ucf54\ub4dc \uc0dd\uc131\uc744 \ubc29\uc9c0\ud558\uace0 \uc77c\uad00\uc131\uc744 \ubcf4\uc7a5\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\ub370\uc774\ud130 \ubb34\uacb0\uc131:<\/strong> \ucc38\uc870 \ubb34\uacb0\uc131\uc744 \uc801\uc6a9\ud568\uc73c\ub85c\uc368 \uc678\ub798 \ud0a4\ub294 \uc720\ud6a8\ud558\uc9c0 \uc54a\uac70\ub098 \uc77c\uad00\uc131\uc774 \uc5c6\ub294 \ub370\uc774\ud130\uac00 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \uc0bd\uc785\ub418\ub294 \uac83\uc744 \ubc29\uc9c0\ud558\uc5ec \ub370\uc774\ud130 \uc774\uc0c1 \ud604\uc0c1\uc744 \uc904\uc785\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\ub370\uc774\ud130 \uac80\uc0c9:<\/strong> \uc678\ub798 \ud0a4\ub97c \uc0ac\uc6a9\ud558\uba74 \uac1c\ubc1c\uc790\ub294 \uad00\ub828 \ud14c\uc774\ube14 \uac04\uc758 \uad00\uacc4\ub97c \uc124\uc815\ud558\uc5ec \ub370\uc774\ud130\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \uac80\uc0c9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\uacc4\ub2e8\uc2dd \uc791\uc5c5:<\/strong> CASCADE DELETE \ub610\ub294 CASCADE UPDATE\uc640 \uac19\uc740 \uacc4\ub2e8\uc2dd \uc791\uc5c5\uc73c\ub85c \uc678\ub798 \ud0a4\ub97c \uad6c\uc131\ud558\uc5ec \uc5f0\uacb0\ub41c \ud14c\uc774\ube14 \uc804\uccb4\uc5d0 \ubcc0\uacbd \uc0ac\ud56d\uc744 \uc790\ub3d9\uc73c\ub85c \uc804\ud30c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<h2>\uc678\ub798 \ud0a4\uc758 \ub0b4\ubd80 \uad6c\uc870\uc785\ub2c8\ub2e4. \uc678\ub798 \ud0a4 \uc791\ub3d9 \ubc29\uc2dd<\/h2>\n<p>\ub0b4\ubd80\uc801\uc73c\ub85c \uc678\ub798 \ud0a4\ub294 \uc0c1\uc704 \ud14c\uc774\ube14\uc758 \uae30\ubcf8 \ud0a4\ub97c \ucc38\uc870\ud558\ub294 \ud558\uc704 \ud14c\uc774\ube14\uc758 \uc5f4 \ub610\ub294 \uc5f4 \uc9d1\ud569\uc73c\ub85c \uad6c\ud604\ub429\ub2c8\ub2e4. \uc0c8 \ub808\ucf54\ub4dc\uac00 \ud558\uc704 \ud14c\uc774\ube14\uc5d0 \uc0bd\uc785\ub418\uba74 \uc678\ub798 \ud0a4 \uc5f4\uc740 \uc0c1\uc704 \ud14c\uc774\ube14\uc5d0 \uc788\ub294 \uad00\ub828 \ub808\ucf54\ub4dc\uc758 \uae30\ubcf8 \ud0a4\uc5d0 \ud574\ub2f9\ud558\ub294 \uac12\uc73c\ub85c \ucc44\uc6cc\uc9d1\ub2c8\ub2e4. \uc0c1\uc704 \ud14c\uc774\ube14\uc758 \ucc38\uc870 \ub808\ucf54\ub4dc\uac00 \uc218\uc815\ub418\uac70\ub098 \uc0ad\uc81c\ub418\uba74 \uc678\ub798 \ud0a4\ub294 \ucc38\uc870 \ubb34\uacb0\uc131\uc744 \uc720\uc9c0\ud558\uae30 \uc704\ud574 \uc801\uc808\ud55c \uc870\uce58\uac00 \ucde8\ud574\uc9c0\ub3c4\ub85d \ubcf4\uc7a5\ud569\ub2c8\ub2e4.<\/p>\n<p>\uc678\ub798 \ud0a4\ub97c \uc0dd\uc131\ud558\ub294 \uad6c\ubb38\uc5d0\ub294 \uc77c\ubc18\uc801\uc73c\ub85c SQL \uba85\ub839\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud14c\uc774\ube14 \uac04\uc758 \uad00\uacc4\ub97c \uc815\uc758\ud558\ub294 \uc791\uc5c5\uc774 \ud3ec\ud568\ub429\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4:<\/p>\n<pre><div class=\"bg-black rounded-md mb-4\"><div class=\"flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans justify-between rounded-t-md\"><span>SQL<\/span><button class=\"flex ml-auto gap-2\"><svg stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" viewbox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4\" height=\"1em\" width=\"1em\" ><path d=\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\"><\/path><rect x=\"8\" y=\"2\" width=\"8\" height=\"4\" rx=\"1\" ry=\"1\"><\/rect><\/svg>\ucf54\ub4dc \ubcf5\uc0ac<\/button><\/div><div class=\"p-4 overflow-y-auto\"><code class=\"!whitespace-pre hljs language-sql\" data-no-translation=\"\"><span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">TABLE<\/span> Employees (\n    employee_id <span class=\"hljs-type\">INT<\/span> <span class=\"hljs-keyword\">PRIMARY<\/span> KEY,\n    employee_name <span class=\"hljs-type\">VARCHAR<\/span>(<span class=\"hljs-number\">50<\/span>),\n    department_id <span class=\"hljs-type\">INT<\/span>,\n    <span class=\"hljs-keyword\">FOREIGN<\/span> KEY (department_id) <span class=\"hljs-keyword\">REFERENCES<\/span> Departments(department_id)\n);\n<\/code><\/div><\/div><\/pre>\n<p>\uc774 \uc608\uc5d0\uc11c\ub294 <code data-no-translation=\"\">department_id<\/code> \uc5f4\uc758 <code data-no-translation=\"\">Employees<\/code> \ud14c\uc774\ube14\uc740 \ub2e4\uc74c\uc744 \ucc38\uc870\ud558\ub294 \uc678\ub798 \ud0a4\uc785\ub2c8\ub2e4. <code data-no-translation=\"\">department_id<\/code> \uc5f4\uc758 <code data-no-translation=\"\">Departments<\/code> \ud14c\uc774\ube14.<\/p>\n<h2>\uc678\ub798\ud0a4\uc758 \uc8fc\uc694 \ud2b9\uc9d5 \ubd84\uc11d<\/h2>\n<p>\uc678\ub798 \ud0a4\uc758 \uc8fc\uc694 \uae30\ub2a5\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\n<p><strong>\uad00\uacc4 \uc218\ub9bd:<\/strong> \uc678\ub798 \ud0a4\ub97c \uc0ac\uc6a9\ud558\uba74 \ud14c\uc774\ube14 \uac04\uc758 \uad00\uacc4\ub97c \uc0dd\uc131\ud558\uc5ec \ubcf5\uc7a1\ud55c \ub370\uc774\ud130 \uc5f0\uacb0\uc744 \ud45c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\ub370\uc774\ud130 \uc77c\uad00\uc131:<\/strong> \ucc38\uc870 \ubb34\uacb0\uc131\uc744 \uc801\uc6a9\ud568\uc73c\ub85c\uc368 \uc678\ub798 \ud0a4\ub294 \uc5f0\uacb0\ub41c \ud14c\uc774\ube14 \uc804\uccb4\uc5d0\uc11c \ub370\uc774\ud130 \uc77c\uad00\uc131\uc744 \uc720\uc9c0\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\ucffc\ub9ac \ucd5c\uc801\ud654:<\/strong> \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ucffc\ub9ac\uc5d0 \uc678\ub798 \ud0a4\ub97c \ud65c\uc6a9\ud558\uba74 \ub370\uc774\ud130 \uac80\uc0c9 \uc791\uc5c5\uc744 \ucd5c\uc801\ud654\ud558\uc5ec \ub354 \ube60\ub974\uace0 \ud6a8\uc728\uc801\uc778 \ucffc\ub9ac\ub97c \uc218\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\uace0\uc544 \uae30\ub85d \ubc29\uc9c0:<\/strong> \uc678\ub798 \ud0a4\ub294 \ud558\uc704 \ud14c\uc774\ube14\uc758 \ub808\ucf54\ub4dc\uac00 \ud56d\uc0c1 \uc0c1\uc704 \ud14c\uc774\ube14\uc758 \ud574\ub2f9 \ub808\ucf54\ub4dc\ub97c \uac16\ub3c4\ub85d \ubcf4\uc7a5\ud558\uc5ec \uace0\uc544 \ub808\ucf54\ub4dc\ub97c \ubc29\uc9c0\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\uacc4\ub2e8\uc2dd \uc791\uc5c5:<\/strong> \uacc4\ub2e8\uc2dd \uc791\uc5c5\uc744 \uad6c\uc131\ud558\ub294 \uae30\ub2a5\uc740 \uc5f0\uacb0\ub41c \ub370\uc774\ud130\uc758 \ubcc0\uacbd \uc0ac\ud56d\uc744 \ucc98\ub9ac\ud558\ub294 \ud504\ub85c\uc138\uc2a4\ub97c \ub2e8\uc21c\ud654\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<h2>\uc678\ub798 \ud0a4 \uc720\ud615<\/h2>\n<p>\uc678\ub798 \ud0a4\ub294 \ub3d9\uc791\uacfc \uc81c\uc57d \uc870\uac74\uc5d0 \ub530\ub77c \ubd84\ub958\ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc77c\ubc18\uc801\uc778 \uc720\ud615\uc758 \uc678\ub798 \ud0a4\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\n<p><strong>\ub2e8\uc21c \uc678\ub798 \ud0a4:<\/strong> \ub2e8\uc77c \uc5f4\uc740 \uc0c1\uc704 \ud14c\uc774\ube14\uc758 \uae30\ubcf8 \ud0a4\ub97c \ucc38\uc870\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\ubcf5\ud569 \uc678\ub798 \ud0a4:<\/strong> \uc5ec\ub7ec \uc5f4\uc774 \ud568\uaed8 \uc0c1\uc704 \ud14c\uc774\ube14\uc758 \uae30\ubcf8 \ud0a4\ub97c \ucc38\uc870\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\uc790\uccb4 \ucc38\uc870 \uc678\ub798 \ud0a4:<\/strong> \ud14c\uc774\ube14\uc758 \uc5f4\uc740 \ub3d9\uc77c\ud55c \ud14c\uc774\ube14\uc758 \uae30\ubcf8 \ud0a4\ub97c \ucc38\uc870\ud558\uc5ec \ud14c\uc774\ube14 \uc790\uccb4 \ub0b4\uc5d0 \uacc4\uce35\uc801 \uad00\uacc4\ub97c \ub9cc\ub4ed\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<h2>Foreign Key \uc0ac\uc6a9\ubc29\ubc95\uacfc \uc0ac\uc6a9\uc5d0 \ub530\ub978 \ubb38\uc81c\uc810 \ubc0f \ud574\uacb0\ubc29\ubc95<\/h2>\n<h3>\uc678\ub798 \ud0a4 \uc0ac\uc6a9:<\/h3>\n<ul>\n<li>\uad00\uacc4 \uc815\uc758: \uc678\ub798 \ud0a4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uad00\ub828 \ub370\uc774\ud130\ub97c \ub098\ud0c0\ub0b4\ub294 \ud14c\uc774\ube14 \uac04\uc758 \uad00\uacc4\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n<li>\ub370\uc774\ud130 \ubb34\uacb0\uc131 \ubcf4\uc7a5: \uc678\ub798 \ud0a4\ub294 \ucc38\uc870 \ubb34\uacb0\uc131\uc744 \uac15\ud654\ud558\uc5ec \ub370\uc774\ud130 \uc77c\uad00\uc131\uc744 \ubcf4\uc7a5\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h3>\ubb38\uc81c \ubc0f \ud574\uacb0 \ubc29\ubc95:<\/h3>\n<ol>\n<li>\n<p><strong>\uc0bd\uc785\/\uc0ad\uc81c \uc774\uc0c1:<\/strong> \uc678\ub798 \ud0a4\ub97c \ubd80\uc801\uc808\ud558\uac8c \uc0ac\uc6a9\ud558\uba74 \ube44\uc815\uc0c1\uc801\uc778 \uc0bd\uc785 \ubc0f \uc0ad\uc81c\uac00 \ubc1c\uc0dd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub97c \ubc29\uc9c0\ud558\ub824\uba74 \uc21c\ud658 \ucc38\uc870\ub97c \ud53c\ud558\uace0 \uacc4\ub2e8\uc2dd \uc791\uc5c5\uc744 \ud604\uba85\ud558\uac8c \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624.<\/p>\n<\/li>\n<li>\n<p><strong>\uc131\ub2a5\uc5d0 \ubbf8\uce58\ub294 \uc601\ud5a5:<\/strong> \uc678\ub798 \ud0a4\ub97c \uacfc\ub3c4\ud558\uac8c \uc0ac\uc6a9\ud558\uac70\ub098 \uc790\uc8fc \uc5c5\ub370\uc774\ud2b8\ub418\ub294 \uc5f4\uc5d0 \uc678\ub798 \ud0a4\ub97c \uc815\uc758\ud558\uba74 \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc131\ub2a5\uc5d0 \uc601\ud5a5\uc744 \ubbf8\uce60 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc678\ub798 \ud0a4\ub97c \uc2e0\uc911\ud558\uac8c \uc0ac\uc6a9\ud558\uace0 \uc778\ub371\uc2f1\uc744 \uace0\ub824\ud558\uc138\uc694.<\/p>\n<\/li>\n<li>\n<p><strong>NULL \uac12 \ucc98\ub9ac:<\/strong> Null \ud5c8\uc6a9 \uc678\ub798 \ud0a4\ub97c \ucc98\ub9ac\ud560 \ub54c\ub294 NULL \uac12\uc744 \uc801\uc808\ud558\uac8c \ucc98\ub9ac\ud558\ub3c4\ub85d \ud2b9\ubcc4\ud55c \uc8fc\uc758\ub97c \uae30\uc6b8\uc5ec\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<h2>\uc8fc\uc694 \ud2b9\uc9d5 \ubc0f \uae30\ud0c0 \uc720\uc0ac\ud55c \uc6a9\uc5b4\uc640\uc758 \ube44\uad50\ub97c \ud45c\uc640 \ubaa9\ub85d \ud615\ud0dc\ub85c \uc81c\uacf5<\/h2>\n<table>\n<thead>\n<tr>\n<th><strong>\ud2b9\uc131<\/strong><\/th>\n<th><strong>\uc678\ub798 \ud0a4<\/strong><\/th>\n<th><strong>\uae30\ubcf8 \ud0a4<\/strong><\/th>\n<th><strong>\uace0\uc720 \ud0a4<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\ubaa9\uc801<\/td>\n<td>\ub2e4\ub978 \ud14c\uc774\ube14\uc758 \uae30\ubcf8 \ud0a4\ub97c \ucc38\uc870\ud558\uc5ec \ud14c\uc774\ube14 \uac04\uc758 \uad00\uacc4\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.<\/td>\n<td>\ud14c\uc774\ube14\uc758 \uac01 \ub808\ucf54\ub4dc\ub97c \uace0\uc720\ud558\uac8c \uc2dd\ubcc4\ud569\ub2c8\ub2e4.<\/td>\n<td>\uc5f4\uc5d0 \uc788\ub294 \uac12\uc758 \uace0\uc720\uc131\uc744 \ubcf4\uc7a5\ud569\ub2c8\ub2e4.<\/td>\n<\/tr>\n<tr>\n<td>\ub3c5\ucc3d\uc131<\/td>\n<td>\ubc18\ub4dc\uc2dc \uace0\uc720\ud560 \ud544\uc694\ub294 \uc5c6\uc2b5\ub2c8\ub2e4. \uc5ec\ub7ec \ud589\uc5d0 \ub3d9\uc77c\ud55c \uc678\ub798 \ud0a4 \uac12\uc774 \uc788\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/td>\n<td>\uace0\uc720\ud55c; \uac01 \ud589\uc5d0\ub294 \uace0\uc720\ud55c \uae30\ubcf8 \ud0a4 \uac12\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/td>\n<td>\uace0\uc720\ud55c; \uac01 \ud589\uc5d0\ub294 \uace0\uc720\ud55c \ud0a4 \uac12\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/td>\n<\/tr>\n<tr>\n<td>Null \uac12<\/td>\n<td>null \uac12\uc774 \ub204\ub77d\ub41c \uad00\uacc4\ub97c \ub098\ud0c0\ub0b4\ub294 \uac83\uc744 \ud5c8\uc6a9\ud569\ub2c8\ub2e4.<\/td>\n<td>null \uac12\uc744 \ud5c8\uc6a9\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \uac01 \ud589\ub9c8\ub2e4 \uc874\uc7ac\ud574\uc57c \ud569\ub2c8\ub2e4.<\/td>\n<td>Null \uac12\uc744 \ud5c8\uc6a9\ud558\uc9c0\ub9cc \ud558\ub098\uc758 \ud589\ub9cc Null \ud0a4 \uac12\uc744 \uac00\uc9c8 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/td>\n<\/tr>\n<tr>\n<td>\ubc1c\uc0dd \ud69f\uc218<\/td>\n<td>\ud558\ub098\uc758 \ud14c\uc774\ube14\uc5d0 \uc5ec\ub7ec \uac1c\uc758 \uc678\ub798 \ud0a4\uac00 \uc874\uc7ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/td>\n<td>\ud14c\uc774\ube14\uc5d0\ub294 \uae30\ubcf8 \ud0a4\uac00 \ud558\ub098\ub9cc \uc874\uc7ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/td>\n<td>\ud14c\uc774\ube14\uc5d0\ub294 \ud558\ub098\uc758 \uace0\uc720 \ud0a4\ub9cc \uc874\uc7ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/td>\n<\/tr>\n<tr>\n<td>\ub370\uc774\ud130\uc640\uc758 \uad00\uacc4<\/td>\n<td>\ub2e4\ub978 \ud14c\uc774\ube14\uc758 \uae30\ubcf8 \ud0a4\uc5d0 \uc5f0\uacb0\ub418\uc5c8\uc2b5\ub2c8\ub2e4.<\/td>\n<td>\ub3d9\uc77c\ud55c \ud14c\uc774\ube14\uc758 \ub370\uc774\ud130\uc5d0 \uc5f0\uacb0\ub429\ub2c8\ub2e4.<\/td>\n<td>\ub3d9\uc77c\ud55c \ud14c\uc774\ube14 \ub610\ub294 \ub2e4\ub978 \ud14c\uc774\ube14\uc758 \ub370\uc774\ud130\uc5d0 \uc5f0\uacb0\ub429\ub2c8\ub2e4.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\uc678\ub798\ud0a4 \uad00\ub828 \ubbf8\ub798 \uc804\ub9dd\uacfc \uae30\uc220<\/h2>\n<p>\uc678\ub798 \ud0a4\uc758 \ubbf8\ub798\ub294 \uad00\uacc4\ud615 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0\uc11c \ub370\uc774\ud130 \ubb34\uacb0\uc131\uc758 \ucd08\uc11d\uc73c\ub85c\uc11c\uc758 \uc9c0\uc18d\uc801\uc778 \uc5ed\ud560\uc5d0 \ub2ec\ub824 \uc788\uc2b5\ub2c8\ub2e4. \uae30\uc220\uc774 \ubc1c\uc804\ud568\uc5d0 \ub530\ub77c \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uad00\ub9ac \uc2dc\uc2a4\ud15c\uc740 \uc678\ub798 \ud0a4\uc758 \uc131\ub2a5\uacfc \uae30\ub2a5\uc744 \ud5a5\uc0c1\uc2dc\ud0a4\uae30 \uc704\ud574 \uac1c\uc120 \ubc0f \ucd5c\uc801\ud654\ub97c \ub3c4\uc785\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc7a0\uc7ac\uc801\uc778 \ubbf8\ub798 \uac1c\ubc1c\uc5d0\ub294 \ub2e4\uc74c\uc774 \ud3ec\ud568\ub429\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\n<p><strong>\uc790\ub3d9 \uc778\ub371\uc2f1:<\/strong> \uace0\uae09 \uc54c\uace0\ub9ac\uc998\uc740 \uc678\ub798 \ud0a4 \uc5f4\uc758 \uc778\ub371\uc2a4 \uc2dd\ubcc4 \ubc0f \uc0dd\uc131\uc744 \uc790\ub3d9\ud654\ud558\uc5ec \ucffc\ub9ac \uc131\ub2a5\uc744 \ucd5c\uc801\ud654\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\ud6a8\uc728\uc801\uc778 \ubcf5\uc81c \ubc0f \uc0e4\ub529:<\/strong> \ud601\uc2e0\uc744 \ud1b5\ud574 \uc678\ub798 \ud0a4 \uad00\uacc4\uac00 \uc788\ub294 \ud14c\uc774\ube14\uacfc \uad00\ub828\ub41c \ubcf4\ub2e4 \ud6a8\uc728\uc801\uc778 \ub370\uc774\ud130 \ubcf5\uc81c \ubc0f \uc0e4\ub529 \uc804\ub7b5\uc774 \uac00\ub2a5\ud574\uc9c8 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\uadf8\ub798\ud504 \ub370\uc774\ud130\ubca0\uc774\uc2a4:<\/strong> \uadf8\ub798\ud504 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \ub4f1\uc7a5\uc73c\ub85c \ub370\uc774\ud130 \uac04\uc758 \uad00\uacc4\ub97c \ucc98\ub9ac\ud558\ub294 \uc0c8\ub85c\uc6b4 \ubc29\ubc95\uc774 \ub3c4\uc785\ub420 \uc218 \uc788\uc73c\uba70, \uc7a0\uc7ac\uc801\uc73c\ub85c \ube44\uad00\uacc4\ud615 \ucee8\ud14d\uc2a4\ud2b8\uc5d0\uc11c \uc678\ub798 \ud0a4 \uac1c\ub150\uc744 \uc7ac\uc815\uc758\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<h2>\ud504\ub85d\uc2dc \uc11c\ubc84\ub97c \uc0ac\uc6a9\ud558\uac70\ub098 \uc678\ub798 \ud0a4\uc640 \uc5f0\uacb0\ud558\ub294 \ubc29\ubc95<\/h2>\n<p>OneProxy(oneproxy.pro)\uc640 \uac19\uc740 \ud504\ub85d\uc2dc \uc11c\ubc84 \uacf5\uae09\uc790\uc758 \ub9e5\ub77d\uc5d0\uc11c \uc678\ub798 \ud0a4\ub294 \uc0ac\uc6a9\uc790 \uacc4\uc815, \uad6c\ub3c5 \uacc4\ud68d, \uccad\uad6c \uc138\ubd80 \uc815\ubcf4 \ubc0f \uc11c\ubc84 \uc704\uce58\uc5d0 \ub300\ud55c \uc815\ubcf4\uac00 \ud3ec\ud568\ub41c \ub2e4\uc591\ud55c \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ud14c\uc774\ube14 \uac04\uc758 \uad00\uacc4\ub97c \uad00\ub9ac\ud558\uae30 \uc704\ud574 \ub0b4\ubd80\uc801\uc73c\ub85c \uc0ac\uc6a9\ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4:<\/p>\n<ul>\n<li>\uc678\ub798 \ud0a4\ub294 \uc0ac\uc6a9\uc790\uc758 \uacc4\uc815 \uc815\ubcf4\ub97c \ud574\ub2f9 \uad6c\ub3c5 \uacc4\ud68d\uc5d0 \uc5f0\uacb0\ud558\ub294 \ub370 \uc0ac\uc6a9\ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<li>\ub610 \ub2e4\ub978 \uc678\ub798 \ud0a4\ub294 \uc0ac\uc6a9\uc790 \ub370\uc774\ud130\uc640 \uc120\ud0dd\ud55c \uc11c\ubc84 \uc704\uce58 \uac04\uc758 \uad00\uacc4\ub97c \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<p>OneProxy\ub294 \uc678\ub798 \ud0a4\ub97c \ud65c\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ub0b4\uc5d0\uc11c \ub370\uc774\ud130 \uc77c\uad00\uc131, \ucc38\uc870 \ubb34\uacb0\uc131 \ubc0f \ud6a8\uc728\uc801\uc778 \ub370\uc774\ud130 \uac80\uc0c9\uc744 \ubcf4\uc7a5\ud558\uc5ec \ud504\ub85d\uc2dc \uc11c\ube44\uc2a4\uc758 \uc6d0\ud65c\ud55c \uc6b4\uc601\uc5d0 \uae30\uc5ec\ud560 \uc218 \uc788\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>\uad00\ub828\ub41c \ub9c1\ud06c\ub4e4<\/h2>\n<p>\uc678\ub798 \ud0a4\uc5d0 \ub300\ud55c \uc790\uc138\ud55c \ub0b4\uc6a9\uc744 \ubcf4\ub824\uba74 \ub2e4\uc74c \ub9ac\uc18c\uc2a4\ub97c \ud0d0\uc0c9\ud558\uc138\uc694.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.w3schools.com\/sql\/sql_foreignkey.asp\" target=\"_new\" rel=\"noopener nofollow\">SQL\uc758 \uc678\ub798 \ud0a4 \uc18c\uac1c<\/a><\/li>\n<li><a href=\"https:\/\/www.sqlshack.com\/understanding-the-sql-server-foreign-key\/\" target=\"_new\" rel=\"noopener nofollow\">\ub370\uc774\ud130\ubca0\uc774\uc2a4 \uad00\ub9ac\uc758 \uc678\ub798 \ud0a4 \uc774\ud574<\/a><\/li>\n<li><a href=\"https:\/\/www.ibm.com\/docs\/en\/informix-servers\/12.10?topic=keys-using-foreign-keys-data-integrity\" target=\"_new\" rel=\"noopener nofollow\">\ub370\uc774\ud130 \ubb34\uacb0\uc131\uc744 \uc704\ud574 \uc678\ub798 \ud0a4 \uc0ac\uc6a9<\/a><\/li>\n<\/ul>\n<p>\uacb0\ub860\uc801\uc73c\ub85c, \uc678\ub798 \ud0a4\ub294 \uad00\uacc4\ud615 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \uc911\uc694\ud55c \uad6c\uc131 \uc694\uc18c\ub85c\uc11c \ub370\uc774\ud130 \uac04\uc758 \uad00\uacc4 \uc124\uc815\uc744 \uac00\ub2a5\ud558\uac8c \ud558\uace0 \ub370\uc774\ud130 \ubb34\uacb0\uc131\uc744 \ubcf4\uc7a5\ud569\ub2c8\ub2e4. \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc640 \uae30\uc220\uc774 \uacc4\uc18d \ubc1c\uc804\ud568\uc5d0 \ub530\ub77c \uc678\ub798 \ud0a4\ub294 OneProxy\uc640 \uac19\uc740 \ud504\ub85d\uc2dc \uc11c\ubc84 \uacf5\uae09\uc790\ub97c \ud3ec\ud568\ud558\uc5ec \ub2e4\uc591\ud55c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \ubcf5\uc7a1\ud55c \ub370\uc774\ud130 \uad6c\uc870\ub97c \uad00\ub9ac\ud558\uace0 \uad6c\uc131\ud558\ub294 \ub370 \ud544\uc218\uc801\uc778 \ub3c4\uad6c\ub85c \ub0a8\uc744 \uac83\uc785\ub2c8\ub2e4.<\/p>","protected":false},"featured_media":468433,"menu_order":0,"template":"","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"class_list":["post-477274","wiki","type-wiki","status-publish","has-post-thumbnail","hentry"],"acf":{"faq_title":"Frequently Asked Questions about <mark>Foreign Key: A Comprehensive Guide<\/mark>","faq_items":[{"question":"What is a Foreign key and why is it important in databases?","answer":"<p>A Foreign key is a crucial concept in database management systems that establishes a relationship between two tables. It ensures data integrity by linking the primary key of one table to a corresponding field in another table. This linkage enables meaningful associations between data, facilitates data retrieval, and prevents inconsistent or invalid data from being inserted.<\/p>"},{"question":"Who introduced the concept of Foreign keys?","answer":"<p>The concept of Foreign keys was first introduced by E.F. Codd in his seminal paper titled \"A Relational Model of Data for Large Shared Data Banks\" published in 1970. Codd's work laid the foundation for the relational database model, and Foreign keys emerged as a key component.<\/p>"},{"question":"How does a Foreign key work internally?","answer":"<p>Internally, a Foreign key is implemented as a column or set of columns in the child table that references the primary key of the parent table. When new data is inserted into the child table, the Foreign key column is populated with a value corresponding to the primary key of the related record in the parent table. If the referenced record in the parent table is modified or deleted, the Foreign key ensures that appropriate actions are taken to maintain referential integrity.<\/p>"},{"question":"What are the main features of Foreign keys?","answer":"<p>The key features of Foreign keys include establishing data relationships, ensuring data consistency, optimizing query performance, and facilitating cascading actions for data changes across linked tables.<\/p>"},{"question":"What are the different types of Foreign keys?","answer":"<p>Foreign keys can be classified into three main types: Simple Foreign keys (with a single column), Composite Foreign keys (with multiple columns), and Self-referencing Foreign keys (where a column in a table references the primary key of the same table).<\/p>"},{"question":"How can Foreign keys be used, and what are the potential issues?","answer":"<p>Foreign keys are used to establish meaningful relationships between tables and ensure data integrity. However, improper use can lead to insertion and deletion anomalies and impact database performance. Care should be taken when handling NULL values in Foreign keys, and circular references should be avoided.<\/p>"},{"question":"How do Foreign keys compare to Primary keys and Unique keys?","answer":"<p>Foreign keys establish relationships between tables, Primary keys uniquely identify records in a table, and Unique keys ensure the uniqueness of values in a column. Each has its own distinct purpose and characteristics.<\/p>"},{"question":"What are the future perspectives of Foreign keys in databases?","answer":"<p>In the future, advancements in database technology may introduce automated indexing, more efficient replication, and the use of Foreign keys in non-relational contexts like graph databases.<\/p>"},{"question":"How are proxy servers associated with Foreign keys?","answer":"<p>Proxy server providers like OneProxy may use Foreign keys internally to manage relationships between various database tables containing user accounts, subscription plans, billing details, and server locations. This ensures seamless operation and data integrity in their proxy services.<\/p>"}]},"_links":{"self":[{"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/wiki\/477274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/wiki"}],"about":[{"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/types\/wiki"}],"version-history":[{"count":0,"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/wiki\/477274\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/media\/468433"}],"wp:attachment":[{"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/media?parent=477274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}