{"id":171667,"date":"2024-11-07T04:39:18","date_gmt":"2024-11-06T20:39:18","guid":{"rendered":"https:\/\/server.hk\/cnblog\/171667\/"},"modified":"2024-11-07T04:39:18","modified_gmt":"2024-11-06T20:39:18","slug":"%e8%bc%95%e9%ac%86%e5%ad%98%e5%84%b2%ef%bc%8c%e6%95%b8%e6%93%9a%e5%ae%89%e5%85%a8%e6%9c%89%e4%bf%9d%e9%9a%9c%ef%bc%8c%e6%8e%a2%e7%b4%a2%e5%9c%a8%e7%b7%9a%e9%9b%b2mongo%e6%95%b8%e6%93%9a%e5%ba%ab","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/171667\/","title":{"rendered":"\u8f15\u9b06\u5b58\u5132\uff0c\u6578\u64da\u5b89\u5168\u6709\u4fdd\u969c\uff0c\u63a2\u7d22\u5728\u7dda\u96f2Mongo\u6578\u64da\u5eab (\u5728\u7dda\u96f2mongo\u6578\u64da\u5eab)"},"content":{"rendered":"<h1 id=\"%e8%bc%95%e9%ac%86%e5%ad%98%e5%84%b2%ef%bc%8c%e6%95%b8%e6%93%9a%e5%ae%89%e5%85%a8%e6%9c%89%e4%bf%9d%e9%9a%9c%ef%bc%8c%e6%8e%a2%e7%b4%a2%e5%9c%a8%e7%b7%9a%e9%9b%b2mongo%e6%95%b8%e6%93%9a%e5%ba%ab-QNUwpDRYuN\">\u8f15\u9b06\u5b58\u5132\uff0c\u6578\u64da\u5b89\u5168\u6709\u4fdd\u969c\uff0c\u63a2\u7d22\u5728\u7dda\u96f2Mongo\u6578\u64da\u5eab<\/h1>\n<p>\u5728\u7576\u4eca\u6578\u64da\u9a45\u52d5\u7684\u4e16\u754c\u4e2d\uff0c\u6578\u64da\u7684\u5b58\u5132\u548c\u7ba1\u7406\u8b8a\u5f97\u8d8a\u4f86\u8d8a\u91cd\u8981\u3002\u96a8\u8457\u4f01\u696d\u548c\u958b\u767c\u8005\u5c0d\u6578\u64da\u9700\u6c42\u7684\u589e\u52a0\uff0c\u96f2\u6578\u64da\u5eab\u7684\u4f7f\u7528\u9010\u6f38\u6210\u70ba\u4e00\u7a2e\u8da8\u52e2\u3002\u5176\u4e2d\uff0cMongoDB\u4f5c\u70ba\u4e00\u7a2e\u6d41\u884c\u7684NoSQL\u6578\u64da\u5eab\uff0c\u56e0\u5176\u9748\u6d3b\u6027\u548c\u53ef\u64f4\u5c55\u6027\u800c\u53d7\u5230\u5ee3\u6cdb\u95dc\u6ce8\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u5728\u7dda\u96f2Mongo\u6578\u64da\u5eab\u7684\u512a\u52e2\u53ca\u5176\u5728\u6578\u64da\u5b89\u5168\u65b9\u9762\u7684\u4fdd\u969c\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%afmongodb%ef%bc%9f-QNUwpDRYuN\">\u4ec0\u9ebc\u662fMongoDB\uff1f<\/h2>\n<p>MongoDB\u662f\u4e00\u7a2e\u57fa\u65bc\u6587\u6a94\u7684NoSQL\u6578\u64da\u5eab\uff0c\u4f7f\u7528JSON\u6a23\u5f0f\u7684\u6587\u6a94\u4f86\u5b58\u5132\u6578\u64da\u3002\u9019\u7a2e\u7d50\u69cb\u4f7f\u5f97MongoDB\u80fd\u5920\u9748\u6d3b\u5730\u8655\u7406\u5404\u7a2e\u6578\u64da\u985e\u578b\uff0c\u4e26\u4e14\u80fd\u5920\u8f15\u9b06\u5730\u9032\u884c\u64f4\u5c55\u3002\u8207\u50b3\u7d71\u7684\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u76f8\u6bd4\uff0cMongoDB\u4e0d\u9700\u8981\u9810\u5148\u5b9a\u7fa9\u6578\u64da\u7d50\u69cb\uff0c\u9019\u4f7f\u5f97\u958b\u767c\u8005\u80fd\u5920\u66f4\u5feb\u5730\u8fed\u4ee3\u548c\u90e8\u7f72\u61c9\u7528\u7a0b\u5e8f\u3002<\/p>\n<h2 id=\"%e5%9c%a8%e7%b7%9a%e9%9b%b2mongo%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e5%84%aa%e5%8b%a2-QNUwpDRYuN\">\u5728\u7dda\u96f2Mongo\u6578\u64da\u5eab\u7684\u512a\u52e2<\/h2>\n<ul>\n<li><strong>\u9748\u6d3b\u6027\uff1a<\/strong>\u5728\u7dda\u96f2Mongo\u6578\u64da\u5eab\u5141\u8a31\u7528\u6236\u6839\u64da\u9700\u6c42\u96a8\u6642\u8abf\u6574\u5b58\u5132\u5bb9\u91cf\u548c\u8a08\u7b97\u8cc7\u6e90\uff0c\u9019\u5c0d\u65bc\u5feb\u901f\u8b8a\u5316\u7684\u696d\u52d9\u74b0\u5883\u5c24\u70ba\u91cd\u8981\u3002<\/li>\n<li><strong>\u9ad8\u53ef\u7528\u6027\uff1a<\/strong>\u96f2\u670d\u52d9\u63d0\u4f9b\u5546\u901a\u5e38\u6703\u63d0\u4f9b\u591a\u500b\u6578\u64da\u4e2d\u5fc3\uff0c\u78ba\u4fdd\u6578\u64da\u7684\u5197\u9918\u5b58\u5132\u548c\u9ad8\u53ef\u7528\u6027\uff0c\u5f9e\u800c\u6e1b\u5c11\u7cfb\u7d71\u6545\u969c\u7684\u98a8\u96aa\u3002<\/li>\n<li><strong>\u81ea\u52d5\u5099\u4efd\uff1a<\/strong>\u8a31\u591a\u96f2Mongo\u6578\u64da\u5eab\u670d\u52d9\u63d0\u4f9b\u81ea\u52d5\u5099\u4efd\u529f\u80fd\uff0c\u78ba\u4fdd\u6578\u64da\u5728\u610f\u5916\u60c5\u6cc1\u4e0b\u4e0d\u6703\u4e1f\u5931\u3002<\/li>\n<li><strong>\u6613\u65bc\u64f4\u5c55\uff1a<\/strong>\u96a8\u8457\u696d\u52d9\u7684\u589e\u9577\uff0c\u96f2Mongo\u6578\u64da\u5eab\u53ef\u4ee5\u8f15\u9b06\u5730\u9032\u884c\u6c34\u5e73\u64f4\u5c55\uff0c\u652f\u6301\u66f4\u591a\u7684\u7528\u6236\u548c\u6578\u64da\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%95%b8%e6%93%9a%e5%ae%89%e5%85%a8%e6%80%a7-QNUwpDRYuN\">\u6578\u64da\u5b89\u5168\u6027<\/h2>\n<p>\u6578\u64da\u5b89\u5168\u662f\u4f01\u696d\u5728\u9078\u64c7\u6578\u64da\u5eab\u6642\u6700\u95dc\u5fc3\u7684\u554f\u984c\u4e4b\u4e00\u3002\u5728\u7dda\u96f2Mongo\u6578\u64da\u5eab\u63d0\u4f9b\u591a\u5c64\u6b21\u7684\u5b89\u5168\u4fdd\u969c\uff0c\u78ba\u4fdd\u6578\u64da\u7684\u5b8c\u6574\u6027\u548c\u4fdd\u5bc6\u6027\u3002<\/p>\n<h3 id=\"1-%e5%8a%a0%e5%af%86%e6%8a%80%e8%a1%93-QNUwpDRYuN\">1. \u52a0\u5bc6\u6280\u8853<\/h3>\n<p>\u8a31\u591a\u96f2Mongo\u6578\u64da\u5eab\u670d\u52d9\u63d0\u4f9b\u7aef\u5230\u7aef\u7684\u52a0\u5bc6\u6280\u8853\uff0c\u78ba\u4fdd\u6578\u64da\u5728\u50b3\u8f38\u548c\u5b58\u5132\u904e\u7a0b\u4e2d\u90fd\u53d7\u5230\u4fdd\u8b77\u3002\u9019\u610f\u5473\u8457\u5373\u4f7f\u6578\u64da\u88ab\u6514\u622a\uff0c\u672a\u7d93\u6388\u6b0a\u7684\u7528\u6236\u4e5f\u7121\u6cd5\u8b80\u53d6\u6578\u64da\u5167\u5bb9\u3002<\/p>\n<h3 id=\"2-%e8%a8%aa%e5%95%8f%e6%8e%a7%e5%88%b6-QNUwpDRYuN\">2. \u8a2a\u554f\u63a7\u5236<\/h3>\n<p>\u5728\u7dda\u96f2Mongo\u6578\u64da\u5eab\u901a\u5e38\u63d0\u4f9b\u7d30\u7c92\u5ea6\u7684\u8a2a\u554f\u63a7\u5236\uff0c\u5141\u8a31\u7528\u6236\u6839\u64da\u89d2\u8272\u548c\u6b0a\u9650\u4f86\u7ba1\u7406\u6578\u64da\u7684\u8a2a\u554f\u3002\u9019\u6a23\u53ef\u4ee5\u78ba\u4fdd\u53ea\u6709\u6388\u6b0a\u7684\u7528\u6236\u624d\u80fd\u8a2a\u554f\u654f\u611f\u6578\u64da\u3002<\/p>\n<h3 id=\"3-%e5%af%a9%e8%a8%88%e5%92%8c%e7%9b%a3%e6%8e%a7-QNUwpDRYuN\">3. \u5be9\u8a08\u548c\u76e3\u63a7<\/h3>\n<p>\u8a31\u591a\u96f2\u670d\u52d9\u63d0\u4f9b\u5546\u6703\u63d0\u4f9b\u5be9\u8a08\u548c\u76e3\u63a7\u529f\u80fd\uff0c\u5e6b\u52a9\u7528\u6236\u8ddf\u8e2a\u6578\u64da\u7684\u8a2a\u554f\u548c\u8b8a\u66f4\u6b77\u53f2\u3002\u9019\u4e0d\u50c5\u6709\u52a9\u65bc\u767c\u73fe\u6f5b\u5728\u7684\u5b89\u5168\u5a01\u8105\uff0c\u9084\u80fd\u6eff\u8db3\u5408\u898f\u6027\u8981\u6c42\u3002<\/p>\n<h2 id=\"%e7%b5%90%e8%ab%96-QNUwpDRYuN\">\u7d50\u8ad6<\/h2>\n<p>\u5728\u7dda\u96f2Mongo\u6578\u64da\u5eab\u4ee5\u5176\u9748\u6d3b\u6027\u3001\u9ad8\u53ef\u7528\u6027\u548c\u5f37\u5927\u7684\u5b89\u5168\u6027\uff0c\u6210\u70ba\u73fe\u4ee3\u4f01\u696d\u6578\u64da\u7ba1\u7406\u7684\u7406\u60f3\u9078\u64c7\u3002\u96a8\u8457\u6578\u64da\u91cf\u7684\u6301\u7e8c\u589e\u9577\uff0c\u9078\u64c7\u4e00\u500b\u53ef\u9760\u7684\u96f2Mongo\u6578\u64da\u5eab\u89e3\u6c7a\u65b9\u6848\u5c07\u6709\u52a9\u65bc\u4f01\u696d\u5728\u6fc0\u70c8\u7684\u5e02\u5834\u7af6\u722d\u4e2d\u4fdd\u6301\u512a\u52e2\u3002\u5c0d\u65bc\u9700\u8981\u7a69\u5b9a\u548c\u5b89\u5168\u7684\u6578\u64da\u5b58\u5132\u89e3\u6c7a\u65b9\u6848\u7684\u4f01\u696d\u4f86\u8aaa\uff0c\u9078\u64c7\u5408\u9069\u7684\u96f2\u670d\u52d9\u63d0\u4f9b\u5546\u81f3\u95dc\u91cd\u8981\u3002<\/p>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u6eff\u8db3\u4e0d\u540c\u9700\u6c42\u7684\u5ba2\u6236\u3002\u7121\u8ad6\u662f <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u9084\u662f\u5176\u4ed6\u985e\u578b\u7684 <a href=\"https:\/\/server.hk\">\u96f2\u4f3a\u670d\u5668<\/a>\uff0c\u6211\u5011\u90fd\u80fd\u70ba\u60a8\u63d0\u4f9b\u7a69\u5b9a\u548c\u5b89\u5168\u7684\u670d\u52d9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f15\u9b06\u5b58\u5132\u60a8\u7684\u6578\u64da\uff0c\u4eab\u53d7\u5b89\u5168\u4fdd\u969c\uff0c\u63a2\u7d22\u5728\u7dda\u96f2Mongo\u6578\u64da\u5eab\uff0c\u5be6\u73fe\u9ad8\u6548\u6578\u64da\u7ba1\u7406\u8207\u9748\u6d3b\u64f4\u5c55\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-171667","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171667","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=171667"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171667\/revisions"}],"predecessor-version":[{"id":171668,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171667\/revisions\/171668"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=171667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=171667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=171667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}