{"id":63838,"date":"2024-10-14T02:54:15","date_gmt":"2024-10-13T18:54:15","guid":{"rendered":"https:\/\/server.hk\/cnblog\/63838\/"},"modified":"2024-10-14T02:54:15","modified_gmt":"2024-10-13T18:54:15","slug":"mongodb%e8%a1%93%e8%aa%9e-%e9%a0%90%e5%af%ab%e6%97%a5%e8%aa%8c","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/63838\/","title":{"rendered":"MongoDB\u8853\u8a9e &#8211; \u9810\u5beb\u65e5\u8a8c"},"content":{"rendered":"<h1 id=\"mongodb%e8%a1%93%e8%aa%9e-%e9%a0%90%e5%af%ab%e6%97%a5%e8%aa%8c-YmlXdQcWFi\">MongoDB\u8853\u8a9e &#8211; \u9810\u5beb\u65e5\u8a8c<\/h1>\n<p>\u5728\u73fe\u4ee3\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\u4e2d\uff0cMongoDB\u4f5c\u70ba\u4e00\u500b\u6d41\u884c\u7684NoSQL\u6578\u64da\u5eab\uff0c\u56e0\u5176\u9748\u6d3b\u6027\u548c\u9ad8\u6548\u6027\u800c\u53d7\u5230\u5ee3\u6cdb\u4f7f\u7528\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eMongoDB\u4e2d\u7684\u4e00\u500b\u91cd\u8981\u6982\u5ff5\u2014\u2014\u9810\u5beb\u65e5\u8a8c\uff08WiredTiger Log\uff09\uff0c\u4e26\u89e3\u91cb\u5176\u5728\u6578\u64da\u6301\u4e45\u6027\u548c\u6027\u80fd\u65b9\u9762\u7684\u4f5c\u7528\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af%e9%a0%90%e5%af%ab%e6%97%a5%e8%aa%8c%ef%bc%9f-YmlXdQcWFi\">\u4ec0\u9ebc\u662f\u9810\u5beb\u65e5\u8a8c\uff1f<\/h2>\n<p>\u9810\u5beb\u65e5\u8a8c\u662f\u4e00\u7a2e\u7528\u65bc\u78ba\u4fdd\u6578\u64da\u5b8c\u6574\u6027\u548c\u6301\u4e45\u6027\u7684\u6280\u8853\u3002\u5728MongoDB\u4e2d\uff0c\u9810\u5beb\u65e5\u8a8c\u7684\u4e3b\u8981\u76ee\u7684\u662f\u5728\u6578\u64da\u5beb\u5165\u64cd\u4f5c\u4e4b\u524d\uff0c\u5148\u5c07\u9019\u4e9b\u64cd\u4f5c\u8a18\u9304\u5230\u65e5\u8a8c\u4e2d\u3002\u9019\u6a23\uff0c\u5373\u4f7f\u5728\u7cfb\u7d71\u5d29\u6f70\u6216\u6545\u969c\u7684\u60c5\u6cc1\u4e0b\uff0c\u6578\u64da\u4e5f\u80fd\u5920\u6062\u5fa9\u5230\u4e00\u81f4\u7684\u72c0\u614b\u3002<\/p>\n<h2 id=\"%e9%a0%90%e5%af%ab%e6%97%a5%e8%aa%8c%e7%9a%84%e5%b7%a5%e4%bd%9c%e5%8e%9f%e7%90%86-YmlXdQcWFi\">\u9810\u5beb\u65e5\u8a8c\u7684\u5de5\u4f5c\u539f\u7406<\/h2>\n<p>\u9810\u5beb\u65e5\u8a8c\u7684\u5de5\u4f5c\u6d41\u7a0b\u53ef\u4ee5\u5206\u70ba\u4ee5\u4e0b\u5e7e\u500b\u6b65\u9a5f\uff1a<\/p>\n<ol>\n<li><strong>\u5beb\u5165\u64cd\u4f5c\uff1a<\/strong>\u7576\u7528\u6236\u57f7\u884c\u5beb\u5165\u64cd\u4f5c\u6642\uff0cMongoDB\u9996\u5148\u5c07\u8a72\u64cd\u4f5c\u8a18\u9304\u5230\u9810\u5beb\u65e5\u8a8c\u4e2d\u3002<\/li>\n<li><strong>\u6578\u64da\u66f4\u65b0\uff1a<\/strong>\u63a5\u8457\uff0cMongoDB\u6703\u5c07\u6578\u64da\u66f4\u65b0\u61c9\u7528\u5230\u5167\u5b58\u4e2d\u7684\u6578\u64da\u7d50\u69cb\u3002<\/li>\n<li><strong>\u6301\u4e45\u5316\uff1a<\/strong>\u6700\u5f8c\uff0c\u7576\u7cfb\u7d71\u7a7a\u9592\u6642\uff0cMongoDB\u6703\u5c07\u5167\u5b58\u4e2d\u7684\u6578\u64da\u6301\u4e45\u5316\u5230\u78c1\u789f\u4e2d\u3002<\/li>\n<\/ol>\n<p>\u9019\u7a2e\u65b9\u6cd5\u78ba\u4fdd\u4e86\u5373\u4f7f\u5728\u5beb\u5165\u64cd\u4f5c\u5c1a\u672a\u5b8c\u6210\u6642\uff0c\u7cfb\u7d71\u4e5f\u80fd\u5920\u901a\u904e\u65e5\u8a8c\u6062\u5fa9\u5230\u6700\u8fd1\u7684\u4e00\u81f4\u72c0\u614b\u3002<\/p>\n<h2 id=\"%e9%a0%90%e5%af%ab%e6%97%a5%e8%aa%8c%e7%9a%84%e5%84%aa%e5%8b%a2-YmlXdQcWFi\">\u9810\u5beb\u65e5\u8a8c\u7684\u512a\u52e2<\/h2>\n<p>\u9810\u5beb\u65e5\u8a8c\u5728MongoDB\u4e2d\u63d0\u4f9b\u4e86\u591a\u9805\u512a\u52e2\uff1a<\/p>\n<ul>\n<li><strong>\u6578\u64da\u5b8c\u6574\u6027\uff1a<\/strong>\u901a\u904e\u8a18\u9304\u6240\u6709\u5beb\u5165\u64cd\u4f5c\uff0c\u9810\u5beb\u65e5\u8a8c\u80fd\u5920\u5728\u7cfb\u7d71\u6545\u969c\u6642\u6062\u5fa9\u6578\u64da\uff0c\u78ba\u4fdd\u6578\u64da\u7684\u4e00\u81f4\u6027\u3002<\/li>\n<li><strong>\u6027\u80fd\u63d0\u5347\uff1a<\/strong>\u7531\u65bc\u5beb\u5165\u64cd\u4f5c\u9996\u5148\u8a18\u9304\u5230\u65e5\u8a8c\u4e2d\uff0cMongoDB\u53ef\u4ee5\u5728\u5167\u5b58\u4e2d\u5feb\u901f\u8655\u7406\u6578\u64da\u66f4\u65b0\uff0c\u5f9e\u800c\u63d0\u9ad8\u6574\u9ad4\u6027\u80fd\u3002<\/li>\n<li><strong>\u6545\u969c\u6062\u5fa9\uff1a<\/strong>\u5728\u7cfb\u7d71\u5d29\u6f70\u5f8c\uff0cMongoDB\u53ef\u4ee5\u901a\u904e\u9810\u5beb\u65e5\u8a8c\u5feb\u901f\u6062\u5fa9\u5230\u6700\u8fd1\u7684\u72c0\u614b\uff0c\u6e1b\u5c11\u6578\u64da\u4e1f\u5931\u7684\u98a8\u96aa\u3002<\/li>\n<\/ul>\n<h2 id=\"%e9%a0%90%e5%af%ab%e6%97%a5%e8%aa%8c%e7%9a%84%e5%af%a6%e7%8f%be-YmlXdQcWFi\">\u9810\u5beb\u65e5\u8a8c\u7684\u5be6\u73fe<\/h2>\n<p>\u5728MongoDB\u4e2d\uff0c\u9810\u5beb\u65e5\u8a8c\u7684\u5be6\u73fe\u662f\u901a\u904eWiredTiger\u5b58\u5132\u5f15\u64ce\u4f86\u5b8c\u6210\u7684\u3002WiredTiger\u4f7f\u7528\u4e86\u4e00\u7a2e\u9ad8\u6548\u7684\u58d3\u7e2e\u7b97\u6cd5\uff0c\u80fd\u5920\u6e1b\u5c11\u78c1\u789f\u7a7a\u9593\u7684\u4f7f\u7528\uff0c\u540c\u6642\u63d0\u9ad8\u6578\u64da\u7684\u8b80\u53d6\u548c\u5beb\u5165\u901f\u5ea6\u3002<\/p>\n<pre><code>db.collection.insertOne({ name: \"Alice\", age: 30 });\n<\/code><\/pre>\n<p>\u5728\u57f7\u884c\u4e0a\u8ff0\u63d2\u5165\u64cd\u4f5c\u6642\uff0cMongoDB\u6703\u9996\u5148\u5c07\u8a72\u64cd\u4f5c\u8a18\u9304\u5230\u9810\u5beb\u65e5\u8a8c\u4e2d\uff0c\u7136\u5f8c\u518d\u5c07\u6578\u64da\u5beb\u5165\u5167\u5b58\uff0c\u6700\u7d42\u6301\u4e45\u5316\u5230\u78c1\u789f\u3002<\/p>\n<h2 id=\"%e7%b5%90%e8%ab%96-YmlXdQcWFi\">\u7d50\u8ad6<\/h2>\n<p>\u9810\u5beb\u65e5\u8a8c\u662fMongoDB\u4e2d\u4e00\u500b\u95dc\u9375\u7684\u6280\u8853\uff0c\u5c0d\u65bc\u78ba\u4fdd\u6578\u64da\u7684\u5b8c\u6574\u6027\u548c\u7cfb\u7d71\u7684\u6027\u80fd\u81f3\u95dc\u91cd\u8981\u3002\u901a\u904e\u5c07\u5beb\u5165\u64cd\u4f5c\u8a18\u9304\u5230\u65e5\u8a8c\u4e2d\uff0cMongoDB\u80fd\u5920\u5728\u7cfb\u7d71\u6545\u969c\u6642\u5feb\u901f\u6062\u5fa9\u6578\u64da\uff0c\u4e26\u63d0\u9ad8\u6574\u9ad4\u7684\u6578\u64da\u8655\u7406\u6548\u7387\u3002\u5c0d\u65bc\u9700\u8981\u9ad8\u53ef\u7528\u6027\u548c\u6578\u64da\u5b89\u5168\u6027\u7684\u61c9\u7528\uff0c\u7406\u89e3\u9810\u5beb\u65e5\u8a8c\u7684\u5de5\u4f5c\u539f\u7406\u53ca\u5176\u512a\u52e2\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002<\/p>\n<p>\u5982\u9700\u4e86\u89e3\u66f4\u591a\u6709\u95dc<code>VPS<\/code>\u3001<code>\u9999\u6e2fVPS<\/code>\u3001<code>\u4f3a\u670d\u5668<\/code>\u3001<code>\u4e91\u4f3a\u670d\u5668<\/code>\u7b49\u8cc7\u8a0a\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9 <a href=\"https:\/\/server.hk\">Server.HK<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3MongoDB\u4e2d\u7684\u9810\u5beb\u65e5\u8a8c\u8853\u8a9e\uff0c\u63a2\u7d22\u5176\u5728\u6578\u64da\u4e00\u81f4\u6027\u548c\u6545\u969c\u6062\u5fa9\u4e2d\u7684\u95dc\u9375\u89d2\u8272\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-63838","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/63838","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=63838"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/63838\/revisions"}],"predecessor-version":[{"id":63839,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/63838\/revisions\/63839"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=63838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=63838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=63838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}