{"id":476178,"date":"2023-08-09T07:26:52","date_gmt":"2023-08-09T07:26:52","guid":{"rendered":""},"modified":"2023-09-05T11:12:10","modified_gmt":"2023-09-05T11:12:10","slug":"cardinality-sql","status":"publish","type":"wiki","link":"https:\/\/oneproxy.pro\/jp\/wiki\/cardinality-sql\/","title":{"rendered":"\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3 (SQL)"},"content":{"rendered":"<p>SQL \u306b\u304a\u3051\u308b\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3068\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30c6\u30fc\u30d6\u30eb\u306e\u5217\u307e\u305f\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5185\u306e\u5024\u306e\u500b\u5225\u306e\u6570\u3092\u6307\u3057\u307e\u3059\u3002\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306f\u3001\u30c7\u30fc\u30bf\u5206\u5e03\u306b\u95a2\u3059\u308b\u6d1e\u5bdf\u3092\u63d0\u4f9b\u3057\u3001\u5b9f\u884c\u30d7\u30e9\u30f3\u3092\u751f\u6210\u3059\u308b\u969b\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30a8\u30f3\u30b8\u30f3\u304c\u60c5\u5831\u306b\u57fa\u3065\u3044\u305f\u6c7a\u5b9a\u3092\u4e0b\u3059\u306e\u306b\u5f79\u7acb\u3064\u305f\u3081\u3001\u30af\u30a8\u30ea\u306e\u6700\u9069\u5316\u3068\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9 \u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u306b\u304a\u3044\u3066\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5206\u91ce\u306b\u304a\u3051\u308b\u57fa\u672c\u7684\u306a\u6982\u5ff5\u3067\u3042\u308a\u3001\u3055\u307e\u3056\u307e\u306a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0 (DBMS) \u3067\u5e83\u304f\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\uff08SQL\uff09\u306e\u8d77\u6e90\u3068\u305d\u306e\u6700\u521d\u306e\u8a00\u53ca\u306e\u6b74\u53f2<\/h2>\n<p>SQL \u306b\u304a\u3051\u308b\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u6982\u5ff5\u306f\u3001\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u521d\u671f\u306e\u9803\u306b\u307e\u3067\u9061\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb \u30e2\u30c7\u30eb\u306f\u3001EF Codd \u535a\u58eb\u304c 1970 \u5e74\u306b\u767a\u8868\u3057\u305f\u753b\u671f\u7684\u306a\u8ad6\u6587\u300c\u5927\u898f\u6a21\u5171\u6709\u30c7\u30fc\u30bf \u30d0\u30f3\u30af\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb \u30c7\u30fc\u30bf \u30e2\u30c7\u30eb\u300d\u3067\u7d39\u4ecb\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u306e\u8ad6\u6587\u3067\u3001Codd \u535a\u58eb\u306f\u3001\u30c7\u30fc\u30bf\u3092\u884c\u3068\u5217\u3067\u8868\u3059\u3068\u3044\u3046\u30a2\u30a4\u30c7\u30a2\u3068\u3001\u30c7\u30fc\u30bf\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u4e00\u9023\u306e\u6570\u5b66\u7684\u6f14\u7b97\u3092\u63d0\u793a\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u300c\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u300d\u3068\u3044\u3046\u7528\u8a9e\u306f\u3001\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u304c\u9032\u5316\u3057\u6210\u719f\u3059\u308b\u306b\u3064\u308c\u3066\u666e\u53ca\u3057\u307e\u3057\u305f\u3002\u30af\u30a8\u30ea\u306e\u6700\u9069\u5316\u306b\u304a\u3044\u3066\u91cd\u8981\u306a\u305f\u3081\u3001\u6700\u3082\u52b9\u7387\u7684\u306a\u5b9f\u884c\u30d7\u30e9\u30f3\u3092\u9078\u629e\u3059\u308b\u305f\u3081\u306b\u30af\u30a8\u30ea\u304b\u3089\u8fd4\u3055\u308c\u308b\u884c\u6570\u3092\u898b\u7a4d\u3082\u308b\u3053\u3068\u304c\u4e0d\u53ef\u6b20\u306b\u306a\u3063\u305f\u305f\u3081\u3001\u3053\u306e\u7528\u8a9e\u304c\u6ce8\u76ee\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h2>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3 (SQL) \u306b\u95a2\u3059\u308b\u8a73\u7d30\u60c5\u5831<\/h2>\n<p>SQL \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3067\u306f\u3001\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306f\u5217\u307e\u305f\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5185\u306b\u5b58\u5728\u3059\u308b\u500b\u5225\u306e\u5024\u306e\u6570\u3092\u6307\u3057\u307e\u3059\u3002\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u30c7\u30fc\u30bf\u306e\u5206\u5e03\u306b\u95a2\u3059\u308b\u7d71\u8a08\u60c5\u5831\u3092\u63d0\u4f9b\u3057\u3001\u30af\u30a8\u30ea \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc\u304c\u30af\u30a8\u30ea\u3092\u51e6\u7406\u3059\u308b\u6700\u3082\u52b9\u7387\u7684\u306a\u65b9\u6cd5\u3092\u6c7a\u5b9a\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<h2>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\uff08SQL\uff09\u306e\u5185\u90e8\u69cb\u9020\u3068\u305d\u306e\u4ed5\u7d44\u307f<\/h2>\n<p>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u5185\u90e8\u69cb\u9020\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7d71\u8a08\u5185\u3067\u7dad\u6301\u3055\u308c\u307e\u3059\u3002DBMS \u306f\u3001\u884c\u6570\u3001\u56fa\u6709\u5024\u3001\u30c7\u30fc\u30bf\u5206\u5e03\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u542b\u3080\u30c6\u30fc\u30d6\u30eb\u3068\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u95a2\u3059\u308b\u7d71\u8a08\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u30af\u30a8\u30ea\u304c\u5b9f\u884c\u3055\u308c\u308b\u3068\u3001\u30af\u30a8\u30ea \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc\u306f\u3053\u308c\u3089\u306e\u7d71\u8a08\u3092\u4f7f\u7528\u3057\u3066\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3092\u63a8\u5b9a\u3057\u3001\u6700\u9069\u306a\u30af\u30a8\u30ea\u5b9f\u884c\u30d7\u30e9\u30f3\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3092\u52b9\u7387\u7684\u306b\u8ffd\u8de1\u3059\u308b\u305f\u3081\u306b\u3001\u3055\u307e\u3056\u307e\u306a\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3068\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u69cb\u9020\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u30c7\u30fc\u30bf\u306e\u5909\u66f4\u304c\u767a\u751f\u3057\u305f\u3068\u304d\u306b\u5b9a\u671f\u7684\u306b\u3001\u307e\u305f\u306f\u30aa\u30f3\u30c7\u30de\u30f3\u30c9\u3067\u66f4\u65b0\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\uff08SQL\uff09\u306e\u4e3b\u8981\u6a5f\u80fd\u306e\u5206\u6790<\/h2>\n<p>SQL \u306e\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u4e3b\u306a\u6a5f\u80fd\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u30af\u30a8\u30ea\u306e\u6700\u9069\u5316:<\/strong> \u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306f\u3001\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u30d7\u30e9\u30f3\u3092\u6c7a\u5b9a\u3059\u308b\u4e0a\u3067\u91cd\u8981\u306a\u8981\u7d20\u3067\u3059\u3002\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u304c\u9ad8\u3044\u307b\u3069\u3001\u9078\u629e\u7684\u306a\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u591a\u304f\u306a\u308a\u3001\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u304c\u901f\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30c7\u30fc\u30bf\u5206\u5e03\u5206\u6790:<\/strong> \u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306f\u3001\u5217\u5185\u306e\u30c7\u30fc\u30bf\u5024\u306e\u5206\u5e03\u306b\u95a2\u3059\u308b\u6d1e\u5bdf\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u504f\u3063\u305f\u30c7\u30fc\u30bf\u3084\u91cd\u8907\u30a8\u30f3\u30c8\u30ea\u306a\u3069\u3001\u6f5c\u5728\u7684\u306a\u30c7\u30fc\u30bf\u54c1\u8cea\u306e\u554f\u984c\u3092\u7279\u5b9a\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u7d50\u5408\u6700\u9069\u5316:<\/strong> \u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306f\u7d50\u5408\u64cd\u4f5c\u306e\u6700\u9069\u5316\u306b\u304a\u3044\u3066\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc\u306f\u7d50\u5408\u3055\u308c\u305f\u5217\u306e\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3092\u4f7f\u7528\u3057\u3066\u3001\u30cd\u30b9\u30c8\u3055\u308c\u305f\u30eb\u30fc\u30d7\u7d50\u5408\u3001\u30cf\u30c3\u30b7\u30e5\u7d50\u5408\u3001\u30de\u30fc\u30b8\u7d50\u5408\u306a\u3069\u306e\u6700\u3082\u52b9\u7387\u7684\u306a\u7d50\u5408\u6226\u7565\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u30c7\u30b6\u30a4\u30f3:<\/strong> \u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u6709\u52b9\u6027\u306b\u5f71\u97ff\u3057\u307e\u3059\u3002\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u304c\u4f4e\u3044\u5217\u306f\u9078\u629e\u6027\u304c\u3042\u307e\u308a\u306a\u3044\u305f\u3081\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210\u306b\u306f\u9069\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u4e00\u65b9\u3001\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u304c\u9ad8\u3044\u5217\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u7a2e\u985e (SQL)<\/h2>\n<p>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306b\u306f\u4e3b\u306b 3 \u3064\u306e\u30bf\u30a4\u30d7\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u4f4e\u3044\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3:<\/strong> \u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u304c\u4f4e\u3044\u5217\u306b\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u884c\u306e\u7dcf\u6570\u306b\u6bd4\u3079\u3066\u3001\u56fa\u6709\u306e\u5024\u306e\u6570\u304c\u5c11\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u4e00\u822c\u7684\u306a\u4f8b\u3068\u3057\u3066\u306f\u3001\u6027\u5225\u3084\u56fd\u306e\u5217\u304c\u6319\u3052\u3089\u308c\u307e\u3059\u304c\u3001\u3053\u308c\u3089\u306e\u5217\u306b\u306f\u901a\u5e38\u3001\u591a\u6570\u306e\u884c\u306b\u308f\u305f\u3063\u3066\u7e70\u308a\u8fd4\u3055\u308c\u308b\u56fa\u6709\u306e\u5024\u304c\u5c11\u6570\u3057\u304b\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u9ad8\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3:<\/strong> \u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u9ad8\u3044\u5217\u306b\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u884c\u306e\u7dcf\u6570\u306b\u6bd4\u3079\u3066\u591a\u6570\u306e\u7570\u306a\u308b\u5024\u304c\u3042\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u4e3b\u30ad\u30fc\u307e\u305f\u306f\u4e00\u610f\u306e\u8b58\u5225\u5b50\u306e\u5217\u306f\u3001\u5404\u884c\u306b\u4e00\u610f\u306e\u5024\u304c\u3042\u308b\u305f\u3081\u3001\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u304c\u9ad8\u304f\u306a\u308b\u50be\u5411\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u4e2d\u7a0b\u5ea6\u306e\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3:<\/strong> \u4e2d\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306f\u3001\u4f4e\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3068\u9ad8\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u4e2d\u9593\u306b\u4f4d\u7f6e\u3057\u307e\u3059\u3002\u4e2d\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u5217\u306b\u306f\u9069\u5ea6\u306a\u6570\u306e\u500b\u5225\u5024\u304c\u3042\u308a\u3001\u4f4e\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u5217\u3088\u308a\u3082\u9078\u629e\u6027\u304c\u9ad8\u304f\u306a\u308a\u307e\u3059\u304c\u3001\u9ad8\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u5217\u3088\u308a\u3082\u9078\u629e\u6027\u306f\u4f4e\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u4ee5\u4e0b\u306b\u30013 \u7a2e\u985e\u306e\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u6bd4\u8f03\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u30bf\u30a4\u30d7<\/th>\n<th>\u7570\u306a\u308b\u5024\u306e\u6570<\/th>\n<th>\u9078\u629e\u6027<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u4f4e\u3044<\/td>\n<td>\u5c11\u3057<\/td>\n<td>\u4f4e\u3044<\/td>\n<\/tr>\n<tr>\n<td>\u4e2d\u304f\u3089\u3044<\/td>\n<td>\u9069\u5ea6<\/td>\n<td>\u4e2d\u304f\u3089\u3044<\/td>\n<\/tr>\n<tr>\n<td>\u9ad8\u3044<\/td>\n<td>\u591a\u304f\u306e<\/td>\n<td>\u9ad8\u3044<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\uff08SQL\uff09\u306e\u4f7f\u7528\u65b9\u6cd5\u3001\u4f7f\u7528\u306b\u95a2\u9023\u3059\u308b\u554f\u984c\u3068\u305d\u306e\u89e3\u6c7a\u7b56<\/h2>\n<h3>SQL \u3067\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5<\/h3>\n<ol>\n<li>\n<p><strong>\u30af\u30a8\u30ea\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6700\u9069\u5316:<\/strong> \u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306f\u3001\u30af\u30a8\u30ea \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc\u304c\u6700\u3082\u52b9\u7387\u7684\u306a\u5b9f\u884c\u30d7\u30e9\u30f3\u3092\u9078\u629e\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u3001\u30af\u30a8\u30ea\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u9078\u629e:<\/strong> \u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3092\u5206\u6790\u3059\u308b\u3053\u3068\u3067\u3001\u30af\u30a8\u30ea \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u5411\u4e0a\u3055\u305b\u308b\u305f\u3081\u306b\u3069\u306e\u5217\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4ed8\u3051\u308b\u304b\u306b\u3064\u3044\u3066\u3001\u60c5\u5831\u306b\u57fa\u3065\u3044\u305f\u6c7a\u5b9a\u3092\u4e0b\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30c7\u30fc\u30bf\u54c1\u8cea\u5206\u6790:<\/strong> \u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306f\u3001\u91cd\u8907\u30c7\u30fc\u30bf\u3084\u6b20\u843d\u30c7\u30fc\u30bf\u306e\u8b58\u5225\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u30c7\u30fc\u30bf\u306e\u30af\u30ec\u30f3\u30b8\u30f3\u30b0\u3068\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u306b\u3068\u3063\u3066\u91cd\u8981\u3067\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<h3>SQL \u306e\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306b\u95a2\u9023\u3059\u308b\u554f\u984c\u3068\u89e3\u6c7a\u7b56<\/h3>\n<ol>\n<li>\n<p><strong>\u53e4\u3044\u7d71\u8a08:<\/strong> \u7d71\u8a08\u304c\u53e4\u304b\u3063\u305f\u308a\u4e0d\u6b63\u78ba\u3060\u3063\u305f\u308a\u3059\u308b\u3068\u3001\u30af\u30a8\u30ea \u30d7\u30e9\u30f3\u304c\u6700\u9069\u3067\u306f\u306a\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u63a8\u5b9a\u304c\u6b63\u78ba\u306b\u306a\u308b\u3088\u3046\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7d71\u8a08\u3092\u5b9a\u671f\u7684\u306b\u66f4\u65b0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u504f\u3063\u305f\u30c7\u30fc\u30bf\u5206\u5e03:<\/strong> 1 \u3064\u306e\u5024\u304c\u5217\u3092\u72ec\u5360\u3059\u308b\u3088\u3046\u306a\u504f\u3063\u305f\u30c7\u30fc\u30bf\u5206\u6563\u306f\u3001\u975e\u52b9\u7387\u7684\u306a\u30af\u30a8\u30ea \u30d7\u30e9\u30f3\u306b\u3064\u306a\u304c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u30b7\u30ca\u30ea\u30aa\u306b\u5bfe\u51e6\u3059\u308b\u306b\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5206\u5272\u307e\u305f\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306e\u30d3\u30f3\u30b5\u30a4\u30ba:<\/strong> \u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u63a8\u5b9a\u306b\u4f7f\u7528\u3055\u308c\u308b\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u3001\u30d3\u30f3 \u30b5\u30a4\u30ba\u304c\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u3001\u305d\u306e\u7d50\u679c\u3001\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u63a8\u5b9a\u304c\u4e0d\u6b63\u78ba\u306b\u306a\u308a\u307e\u3059\u3002\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306e\u30d3\u30f3 \u30b5\u30a4\u30ba\u3092\u8abf\u6574\u3059\u308b\u3068\u3001\u7cbe\u5ea6\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>\u4e3b\u306a\u7279\u5fb4\u3068\u985e\u4f3c\u7528\u8a9e\u3068\u306e\u6bd4\u8f03<\/h2>\n<h3>\u6fc3\u5ea6\u3068\u5bc6\u5ea6<\/h3>\n<p>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3068\u5bc6\u5ea6\u306f\u3001\u30af\u30a8\u30ea\u306e\u6700\u9069\u5316\u3067\u4f7f\u7528\u3055\u308c\u308b 2 \u3064\u306e\u91cd\u8981\u306a\u6982\u5ff5\u3067\u3059\u304c\u3001\u76ee\u7684\u306f\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\n<p><strong>\u57fa\u6570<\/strong> \u5217\u307e\u305f\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5185\u306e\u500b\u5225\u306e\u5024\u306e\u6570\u3092\u6307\u3057\u3001\u30af\u30a8\u30ea\u306b\u3088\u3063\u3066\u8fd4\u3055\u308c\u308b\u884c\u6570\u3092\u30af\u30a8\u30ea \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc\u304c\u898b\u7a4d\u3082\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u5bc6\u5ea6<\/strong> \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5185\u306e\u30c7\u30fc\u30bf\u5024\u306e\u4e00\u610f\u6027\u3092\u8868\u3057\u307e\u3059\u3002\u3053\u308c\u306f Cardinality \u306e\u9006\u6570\u3067\u3042\u308a\u3001\u30e9\u30f3\u30c0\u30e0\u306b\u9078\u629e\u3055\u308c\u305f 2 \u3064\u306e\u884c\u304c\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5217\u306b\u5bfe\u3057\u3066\u540c\u3058\u5024\u3092\u6301\u3064\u53ef\u80fd\u6027\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3068\u5bc6\u5ea6\u306f\u3069\u3061\u3089\u3082\u30af\u30a8\u30ea\u306e\u6700\u9069\u5316\u306b\u5f71\u97ff\u3057\u307e\u3059\u304c\u3001\u52b9\u7387\u7684\u306a\u30af\u30a8\u30ea \u30d7\u30e9\u30f3\u306e\u9078\u629e\u306e\u305f\u3081\u306b\u30af\u30a8\u30ea \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc\u306b\u7570\u306a\u308b\u60c5\u5831\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\uff08SQL\uff09\u306b\u95a2\u3059\u308b\u5c06\u6765\u306e\u5c55\u671b\u3068\u6280\u8853<\/h2>\n<p>\u6280\u8853\u304c\u9032\u6b69\u3057\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u3088\u308a\u6d17\u7df4\u3055\u308c\u308b\u306b\u3064\u308c\u3066\u3001SQL \u306b\u304a\u3051\u308b\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u91cd\u8981\u6027\u306f\u9ad8\u307e\u308a\u7d9a\u3051\u307e\u3059\u3002\u30af\u30a8\u30ea\u6700\u9069\u5316\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3068\u9ad8\u5ea6\u306a\u7d71\u8a08\u624b\u6cd5\u306e\u4eca\u5f8c\u306e\u958b\u767a\u306b\u3088\u308a\u3001\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u63a8\u5b9a\u306e\u7cbe\u5ea6\u304c\u3055\u3089\u306b\u5411\u4e0a\u3059\u308b\u3053\u3068\u304c\u671f\u5f85\u3055\u308c\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u9032\u6b69\u306b\u3088\u308a\u3001\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u8a08\u7b97\u304c\u3055\u3089\u306b\u52b9\u7387\u7684\u306b\u306a\u308a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30b7\u30b9\u30c6\u30e0\u306e\u5168\u4f53\u7684\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306e\u4f7f\u7528\u65b9\u6cd5\u3084\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3068\u306e\u95a2\u9023\u4ed8\u3051\u65b9\u6cd5 (SQL)<\/h2>\n<p>OneProxy \u304c\u63d0\u4f9b\u3059\u308b\u3088\u3046\u306a\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u3001Web \u30ea\u30bd\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u969b\u306e\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u306b\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002SQL \u306e\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3068\u306f\u76f4\u63a5\u95a2\u4fc2\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3059\u308b\u3068\u3001\u30c7\u30fc\u30bf \u30a2\u30af\u30bb\u30b9\u3068\u53ef\u7528\u6027\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u3001\u983b\u7e41\u306b\u30a2\u30af\u30bb\u30b9\u3055\u308c\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30ea\u30bd\u30fc\u30b9\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u304d\u308b\u305f\u3081\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30b5\u30fc\u30d0\u30fc\u306b\u5230\u9054\u3059\u308b\u8981\u6c42\u306e\u6570\u3092\u6e1b\u3089\u3057\u3001\u5fdc\u7b54\u6642\u9593\u3092\u6539\u5584\u3067\u304d\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u9593\u306e\u4ef2\u4ecb\u5f79\u3068\u3057\u3066\u6a5f\u80fd\u3057\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3068\u8ca0\u8377\u5206\u6563\u306e\u5c64\u3092\u8ffd\u52a0\u3067\u304d\u308b\u305f\u3081\u3001\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u91cf\u306e\u591a\u3044\u30b7\u30ca\u30ea\u30aa\u3067\u7279\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u30ea\u30f3\u30af<\/h2>\n<p>SQL \u306e\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u6b21\u306e\u30ea\u30bd\u30fc\u30b9\u304c\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/previous-versions\/sql\/sql-server-2008\/dd535534(v=sql.100)\" target=\"_new\" rel=\"noopener nofollow\">SQL Server \u306e\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u63a8\u5b9a\u306b\u3064\u3044\u3066<\/a><\/li>\n<li><a href=\"https:\/\/www.postgresql.org\/docs\/current\/planner-stats.html\" target=\"_new\" rel=\"noopener nofollow\">PostgreSQL \u306b\u304a\u3051\u308b\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u63a8\u5b9a<\/a><\/li>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/mysql\/en\/query-optimization.html\" target=\"_new\" rel=\"noopener nofollow\">MySQL \u30af\u30a8\u30ea\u306e\u6700\u9069\u5316\u3068\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3<\/a><\/li>\n<\/ul>\n<p>\u899a\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3001\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u6700\u9069\u5316\u3057\u3001\u52b9\u7387\u7684\u306a\u30af\u30a8\u30ea\u5b9f\u884c\u3092\u4fdd\u8a3c\u3059\u308b\u305f\u3081\u306b\u91cd\u8981\u3067\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u306e\u6700\u65b0\u306e\u52d5\u5411\u3092\u628a\u63e1\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u60c5\u5831\u306b\u57fa\u3065\u3044\u305f\u610f\u601d\u6c7a\u5b9a\u3092\u3055\u3089\u306b\u884c\u3044\u3001\u30c7\u30fc\u30bf\u99c6\u52d5\u578b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u6f5c\u5728\u80fd\u529b\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>","protected":false},"featured_media":467828,"menu_order":0,"template":"","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"class_list":["post-476178","wiki","type-wiki","status-publish","has-post-thumbnail","hentry"],"acf":{"faq_title":"Frequently Asked Questions about <mark>Cardinality (SQL)<\/mark>","faq_items":[{"question":"What is Cardinality in SQL?","answer":"<p>Cardinality in SQL refers to the number of distinct values present in a column or index of a database table. It helps the database engine optimize queries and make efficient execution plans.<\/p>"},{"question":"How does Cardinality work in SQL?","answer":"<p>Cardinality is maintained within the database statistics, which store information about the number of rows, distinct values, and data distribution. The query optimizer uses this information to estimate the number of rows returned by a query and choose the best execution plan.<\/p>"},{"question":"What are the types of Cardinality in SQL?","answer":"<p>There are three primary types of Cardinality:<\/p><ol><li>Low Cardinality: Few distinct values, often seen in columns like gender or country.<\/li><li>Medium Cardinality: Moderate distinct values, falling between low and high Cardinality.<\/li><li>High Cardinality: Many distinct values, common in primary key or unique identifier columns.<\/li><\/ol>"},{"question":"How can I use Cardinality in SQL?","answer":"<p>Cardinality is essential for:<\/p><ul><li>Optimizing query performance<\/li><li>Selecting appropriate indexes for better performance<\/li><li>Identifying data quality issues like duplicates or missing data<\/li><\/ul>"},{"question":"What are the challenges related to Cardinality in SQL?","answer":"<p>Problems related to Cardinality include outdated statistics, skewed data distribution, and inaccurate histogram bin sizes. Regularly updating statistics and considering partitioning or indexing can address these challenges.<\/p>"},{"question":"How is Cardinality different from Density in SQL?","answer":"<p>Cardinality represents the number of distinct values, while Density indicates the uniqueness of data values in an index. Both impact query optimization but serve different purposes.<\/p>"},{"question":"What is the future perspective of Cardinality in SQL?","answer":"<p>As technology advances, Cardinality's importance will continue to grow, leading to more accurate estimations and efficient query plans. Advancements in hardware and database architecture will further improve Cardinality computations and overall database performance.<\/p>"},{"question":"How can proxy servers be associated with Cardinality in SQL?","answer":"<p>While not directly related, proxy servers can work with database applications to improve data access and availability. They can cache frequently accessed resources, add security layers, and perform load balancing for high-traffic scenarios.<\/p>"}]},"_links":{"self":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki\/476178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki"}],"about":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/types\/wiki"}],"version-history":[{"count":0,"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki\/476178\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/media\/467828"}],"wp:attachment":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/media?parent=476178"}],"curies":[{"name":"\u3046\u30fc\u3093","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}