{"id":168595,"date":"2024-11-06T14:01:04","date_gmt":"2024-11-06T06:01:04","guid":{"rendered":"https:\/\/server.hk\/cnblog\/168595\/"},"modified":"2024-11-06T14:01:05","modified_gmt":"2024-11-06T06:01:05","slug":"star-schema-%e7%9a%84%e8%a8%ad%e8%a8%88%e6%80%9d%e8%b7%af%e8%88%87%e7%b8%bd%e7%b5%90","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/168595\/","title":{"rendered":"Star Schema \u7684\u8a2d\u8a08\u601d\u8def\u8207\u7e3d\u7d50"},"content":{"rendered":"<h1 id=\"star-schema-%e7%9a%84%e8%a8%ad%e8%a8%88%e6%80%9d%e8%b7%af%e8%88%87%e7%b8%bd%e7%b5%90-MlWttAlDQR\">Star Schema \u7684\u8a2d\u8a08\u601d\u8def\u8207\u7e3d\u7d50<\/h1>\n<p>\u5728\u6578\u64da\u5009\u5132\u548c\u5546\u696d\u667a\u80fd\u7684\u9818\u57df\u4e2d\uff0cStar Schema\uff08\u661f\u578b\u67b6\u69cb\uff09\u662f\u4e00\u7a2e\u5e38\u898b\u7684\u6578\u64da\u6a21\u578b\u8a2d\u8a08\u65b9\u6cd5\u3002\u5b83\u7684\u4e3b\u8981\u76ee\u7684\u662f\u70ba\u4e86\u63d0\u9ad8\u67e5\u8a62\u6027\u80fd\u548c\u6578\u64da\u5206\u6790\u7684\u6548\u7387\u3002\u672c\u6587\u5c07\u63a2\u8a0eStar Schema\u7684\u8a2d\u8a08\u601d\u8def\u3001\u7d50\u69cb\u7279\u9ede\u4ee5\u53ca\u5176\u5728\u5be6\u969b\u61c9\u7528\u4e2d\u7684\u512a\u7f3a\u9ede\u3002<\/p>\n<h2 id=\"star-schema%e7%9a%84%e5%9f%ba%e6%9c%ac%e6%a6%82%e5%bf%b5-MlWttAlDQR\">Star Schema\u7684\u57fa\u672c\u6982\u5ff5<\/h2>\n<p>Star Schema\u662f\u4e00\u7a2e\u4ee5\u4e8b\u52d9\u6578\u64da\u70ba\u4e2d\u5fc3\u7684\u6578\u64da\u6a21\u578b\uff0c\u901a\u5e38\u7531\u4e00\u500b\u4e8b\u52d9\u8868\uff08Fact Table\uff09\u548c\u591a\u500b\u7dad\u5ea6\u8868\uff08Dimension Tables\uff09\u7d44\u6210\u3002\u4e8b\u52d9\u8868\u5305\u542b\u4e86\u696d\u52d9\u904e\u7a0b\u4e2d\u7522\u751f\u7684\u6578\u64da\uff0c\u800c\u7dad\u5ea6\u8868\u5247\u63d0\u4f9b\u4e86\u5c0d\u9019\u4e9b\u6578\u64da\u7684\u4e0a\u4e0b\u6587\u4fe1\u606f\u3002<\/p>\n<h3 id=\"%e4%ba%8b%e5%8b%99%e8%a1%a8%ef%bc%88fact-table%ef%bc%89-MlWttAlDQR\">\u4e8b\u52d9\u8868\uff08Fact Table\uff09<\/h3>\n<p>\u4e8b\u52d9\u8868\u662fStar Schema\u7684\u6838\u5fc3\uff0c\u901a\u5e38\u5305\u542b\u4ee5\u4e0b\u5e7e\u500b\u7279\u5fb5\uff1a<\/p>\n<ul>\n<li><strong>\u5ea6\u91cf\u503c\uff08Measures\uff09<\/strong>\uff1a\u9019\u4e9b\u662f\u53ef\u4ee5\u91cf\u5316\u7684\u6578\u64da\uff0c\u4f8b\u5982\u92b7\u552e\u984d\u3001\u6578\u91cf\u7b49\u3002<\/li>\n<li><strong>\u5916\u9375\uff08Foreign Keys\uff09<\/strong>\uff1a\u9019\u4e9b\u662f\u6307\u5411\u7dad\u5ea6\u8868\u7684\u9375\uff0c\u7528\u65bc\u9023\u63a5\u4e8b\u52d9\u8868\u548c\u7dad\u5ea6\u8868\u3002<\/li>\n<\/ul>\n<h3 id=\"%e7%b6%ad%e5%ba%a6%e8%a1%a8%ef%bc%88dimension-tables%ef%bc%89-MlWttAlDQR\">\u7dad\u5ea6\u8868\uff08Dimension Tables\uff09<\/h3>\n<p>\u7dad\u5ea6\u8868\u63d0\u4f9b\u4e86\u5c0d\u4e8b\u52d9\u6578\u64da\u7684\u63cf\u8ff0\uff0c\u901a\u5e38\u5305\u542b\u4ee5\u4e0b\u5e7e\u500b\u7279\u5fb5\uff1a<\/p>\n<ul>\n<li><strong>\u5c6c\u6027\uff08Attributes\uff09<\/strong>\uff1a\u9019\u4e9b\u662f\u7528\u4f86\u63cf\u8ff0\u7dad\u5ea6\u7684\u5b57\u6bb5\uff0c\u4f8b\u5982\u7522\u54c1\u540d\u7a31\u3001\u5ba2\u6236\u5730\u5340\u7b49\u3002<\/li>\n<li><strong>\u4e3b\u9375\uff08Primary Key\uff09<\/strong>\uff1a\u6bcf\u500b\u7dad\u5ea6\u8868\u90fd\u6709\u4e00\u500b\u552f\u4e00\u7684\u4e3b\u9375\uff0c\u7528\u65bc\u6a19\u8b58\u6bcf\u4e00\u884c\u6578\u64da\u3002<\/li>\n<\/ul>\n<h2 id=\"star-schema%e7%9a%84%e8%a8%ad%e8%a8%88%e6%80%9d%e8%b7%af-MlWttAlDQR\">Star Schema\u7684\u8a2d\u8a08\u601d\u8def<\/h2>\n<p>\u5728\u8a2d\u8a08Star Schema\u6642\uff0c\u9700\u8003\u616e\u4ee5\u4e0b\u5e7e\u500b\u65b9\u9762\uff1a<\/p>\n<h3 id=\"1-%e7%a2%ba%e5%ae%9a%e6%a5%ad%e5%8b%99%e9%9c%80%e6%b1%82-MlWttAlDQR\">1. \u78ba\u5b9a\u696d\u52d9\u9700\u6c42<\/h3>\n<p>\u9996\u5148\uff0c\u9700\u8981\u660e\u78ba\u696d\u52d9\u9700\u6c42\uff0c\u4e86\u89e3\u7528\u6236\u5e0c\u671b\u5f9e\u6578\u64da\u4e2d\u7372\u53d6\u54ea\u4e9b\u4fe1\u606f\u3002\u9019\u5c07\u5e6b\u52a9\u78ba\u5b9a\u9700\u8981\u54ea\u4e9b\u5ea6\u91cf\u503c\u548c\u7dad\u5ea6\u3002<\/p>\n<h3 id=\"2-%e5%ae%9a%e7%be%a9%e4%ba%8b%e5%8b%99%e8%a1%a8%e5%92%8c%e7%b6%ad%e5%ba%a6%e8%a1%a8-MlWttAlDQR\">2. \u5b9a\u7fa9\u4e8b\u52d9\u8868\u548c\u7dad\u5ea6\u8868<\/h3>\n<p>\u6839\u64da\u696d\u52d9\u9700\u6c42\uff0c\u5b9a\u7fa9\u4e8b\u52d9\u8868\u548c\u7dad\u5ea6\u8868\u3002\u4e8b\u52d9\u8868\u61c9\u8a72\u5305\u542b\u6240\u6709\u9700\u8981\u7684\u5ea6\u91cf\u503c\uff0c\u800c\u7dad\u5ea6\u8868\u5247\u61c9\u8a72\u5305\u542b\u8db3\u5920\u7684\u5c6c\u6027\u4f86\u652f\u6301\u67e5\u8a62\u3002<\/p>\n<h3 id=\"3-%e8%a8%ad%e8%a8%88%e6%95%b8%e6%93%9a%e9%97%9c%e4%bf%82-MlWttAlDQR\">3. \u8a2d\u8a08\u6578\u64da\u95dc\u4fc2<\/h3>\n<p>\u8a2d\u8a08\u4e8b\u52d9\u8868\u548c\u7dad\u5ea6\u8868\u4e4b\u9593\u7684\u95dc\u4fc2\uff0c\u78ba\u4fdd\u5916\u9375\u6b63\u78ba\u9023\u63a5\uff0c\u9019\u6a23\u53ef\u4ee5\u63d0\u9ad8\u67e5\u8a62\u7684\u6548\u7387\u3002<\/p>\n<h3 id=\"4-%e8%80%83%e6%85%ae%e6%80%a7%e8%83%bd%e5%84%aa%e5%8c%96-MlWttAlDQR\">4. \u8003\u616e\u6027\u80fd\u512a\u5316<\/h3>\n<p>\u5728\u8a2d\u8a08\u904e\u7a0b\u4e2d\uff0c\u8003\u616e\u5982\u4f55\u512a\u5316\u67e5\u8a62\u6027\u80fd\uff0c\u4f8b\u5982\u4f7f\u7528\u7d22\u5f15\u3001\u5206\u5340\u7b49\u6280\u8853\u4f86\u52a0\u901f\u6578\u64da\u6aa2\u7d22\u3002<\/p>\n<h2 id=\"star-schema%e7%9a%84%e5%84%aa%e7%bc%ba%e9%bb%9e-MlWttAlDQR\">Star Schema\u7684\u512a\u7f3a\u9ede<\/h2>\n<h3 id=\"%e5%84%aa%e9%bb%9e-MlWttAlDQR\">\u512a\u9ede<\/h3>\n<ul>\n<li><strong>\u7c21\u55ae\u6613\u61c2<\/strong>\uff1aStar Schema\u7684\u7d50\u69cb\u7c21\u55ae\uff0c\u6613\u65bc\u7406\u89e3\uff0c\u4fbf\u65bc\u7528\u6236\u9032\u884c\u6578\u64da\u5206\u6790\u3002<\/li>\n<li><strong>\u67e5\u8a62\u6027\u80fd\u9ad8<\/strong>\uff1a\u7531\u65bc\u7dad\u5ea6\u8868\u8207\u4e8b\u52d9\u8868\u4e4b\u9593\u7684\u95dc\u4fc2\u7c21\u55ae\uff0c\u67e5\u8a62\u6027\u80fd\u901a\u5e38\u8f03\u9ad8\u3002<\/li>\n<\/ul>\n<h3 id=\"%e7%bc%ba%e9%bb%9e-MlWttAlDQR\">\u7f3a\u9ede<\/h3>\n<ul>\n<li><strong>\u6578\u64da\u5197\u9918<\/strong>\uff1a\u7dad\u5ea6\u8868\u53ef\u80fd\u6703\u51fa\u73fe\u6578\u64da\u5197\u9918\uff0c\u9019\u53ef\u80fd\u6703\u5c0e\u81f4\u6578\u64da\u4e00\u81f4\u6027\u554f\u984c\u3002<\/li>\n<li><strong>\u4e0d\u9069\u5408\u8907\u96dc\u67e5\u8a62<\/strong>\uff1a\u5c0d\u65bc\u9700\u8981\u591a\u5c64\u6b21\u7dad\u5ea6\u7684\u8907\u96dc\u67e5\u8a62\uff0cStar Schema\u53ef\u80fd\u4e0d\u5920\u9748\u6d3b\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-MlWttAlDQR\">\u7e3d\u7d50<\/h2>\n<p>Star Schema\u4f5c\u70ba\u4e00\u7a2e\u6709\u6548\u7684\u6578\u64da\u6a21\u578b\u8a2d\u8a08\u65b9\u6cd5\uff0c\u80fd\u5920\u5e6b\u52a9\u4f01\u696d\u63d0\u9ad8\u6578\u64da\u5206\u6790\u7684\u6548\u7387\u3002\u901a\u904e\u5408\u7406\u7684\u8a2d\u8a08\u601d\u8def\uff0c\u4f01\u696d\u53ef\u4ee5\u6839\u64da\u81ea\u8eab\u7684\u696d\u52d9\u9700\u6c42\uff0c\u69cb\u5efa\u51fa\u9069\u5408\u7684\u6578\u64da\u67b6\u69cb\u3002\u7121\u8ad6\u662f\u5c0d\u65bc\u6578\u64da\u5009\u5132\u9084\u662f\u5546\u696d\u667a\u80fd\uff0cStar Schema\u90fd\u63d0\u4f9b\u4e86\u4e00\u500b\u6e05\u6670\u7684\u6846\u67b6\u4f86\u652f\u6301\u6578\u64da\u7684\u7d44\u7e54\u548c\u67e5\u8a62\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5c0d\u65bc\u6578\u64da\u5b58\u5132\u548c\u8655\u7406\u6709\u9032\u4e00\u6b65\u7684\u9700\u6c42\uff0c\u8003\u616e\u4f7f\u7528<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u6216<a href=\"https:\/\/server.hk\">\u4e91\u670d\u52a1\u5668<\/a>\u4f86\u642d\u5efa\u60a8\u7684\u6578\u64da\u74b0\u5883\uff0c\u9019\u5c07\u6709\u52a9\u65bc\u63d0\u5347\u60a8\u7684\u696d\u52d9\u904b\u71df\u6548\u7387\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22Star Schema\u7684\u8a2d\u8a08\u601d\u8def\uff0c\u4e86\u89e3\u5176\u7d50\u69cb\u7279\u9ede\u53ca\u512a\u52e2\uff0c\u52a9\u529b\u6578\u64da\u5009\u5eab\u7684\u9ad8\u6548\u67e5\u8a62\u8207\u5206\u6790\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-168595","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/168595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=168595"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/168595\/revisions"}],"predecessor-version":[{"id":168596,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/168595\/revisions\/168596"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=168595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=168595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=168595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}