{"id":186812,"date":"2024-11-11T09:02:25","date_gmt":"2024-11-11T01:02:25","guid":{"rendered":"https:\/\/server.hk\/cnblog\/186812\/"},"modified":"2024-11-11T09:02:26","modified_gmt":"2024-11-11T01:02:26","slug":"%e6%95%b8%e6%93%9a%e5%ba%ab%e8%aa%b2%e7%a8%8b%e8%a6%96%e9%a0%bb%ef%bc%9a%e5%9f%ba%e7%a4%8e%e8%88%87%e6%87%89%e7%94%a8-%e6%95%b8%e6%93%9a%e5%ba%ab%e5%9f%ba%e7%a4%8e%e8%88%87%e6%87%89%e7%94%a8%e8%aa%b2","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/186812\/","title":{"rendered":"\u6578\u64da\u5eab\u8ab2\u7a0b\u8996\u983b\uff1a\u57fa\u790e\u8207\u61c9\u7528 (\u6578\u64da\u5eab\u57fa\u790e\u8207\u61c9\u7528\u8ab2\u7a0b\u8996\u983b)"},"content":{"rendered":"<h1 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e8%aa%b2%e7%a8%8b%e8%a6%96%e9%a0%bb%ef%bc%9a%e5%9f%ba%e7%a4%8e%e8%88%87%e6%87%89%e7%94%a8-eWRVKbPJob\">\u6578\u64da\u5eab\u8ab2\u7a0b\u8996\u983b\uff1a\u57fa\u790e\u8207\u61c9\u7528<\/h1>\n<p>\u5728\u7576\u4eca\u6578\u5b57\u5316\u7684\u6642\u4ee3\uff0c\u6578\u64da\u5eab\u6280\u8853\u5df2\u6210\u70ba\u5404\u884c\u5404\u696d\u4e0d\u53ef\u6216\u7f3a\u7684\u4e00\u90e8\u5206\u3002\u7121\u8ad6\u662f\u4f01\u696d\u7ba1\u7406\u3001\u96fb\u5b50\u5546\u52d9\u9084\u662f\u793e\u4ea4\u5a92\u9ad4\uff0c\u6578\u64da\u5eab\u90fd\u5728\u80cc\u5f8c\u652f\u6301\u8457\u6578\u64da\u7684\u5b58\u5132\u3001\u6aa2\u7d22\u548c\u7ba1\u7406\u3002\u56e0\u6b64\uff0c\u5b78\u7fd2\u6578\u64da\u5eab\u7684\u57fa\u790e\u77e5\u8b58\u53ca\u5176\u61c9\u7528\u8b8a\u5f97\u5c24\u70ba\u91cd\u8981\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u6578\u64da\u5eab\u8ab2\u7a0b\u8996\u983b\u7684\u5167\u5bb9\uff0c\u5e6b\u52a9\u8b80\u8005\u4e86\u89e3\u6578\u64da\u5eab\u7684\u57fa\u672c\u6982\u5ff5\u53ca\u5176\u5be6\u969b\u61c9\u7528\u3002<\/p>\n<h2 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e5%9f%ba%e6%9c%ac%e6%a6%82%e5%bf%b5-eWRVKbPJob\">\u6578\u64da\u5eab\u7684\u57fa\u672c\u6982\u5ff5<\/h2>\n<p>\u6578\u64da\u5eab\u662f\u4e00\u7a2e\u6709\u7d44\u7e54\u7684\u6578\u64da\u96c6\u5408\uff0c\u901a\u5e38\u4ee5\u96fb\u5b50\u65b9\u5f0f\u5b58\u5132\u5728\u8a08\u7b97\u6a5f\u7cfb\u7d71\u4e2d\u3002\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff08DBMS\uff09\u662f\u7528\u4f86\u5275\u5efa\u3001\u7ba1\u7406\u548c\u64cd\u4f5c\u6578\u64da\u5eab\u7684\u8edf\u4ef6\u3002\u5e38\u898b\u7684\u6578\u64da\u5eab\u985e\u578b\u5305\u62ec\u95dc\u4fc2\u578b\u6578\u64da\u5eab\uff08\u5982 MySQL\u3001PostgreSQL\uff09\u548c\u975e\u95dc\u4fc2\u578b\u6578\u64da\u5eab\uff08\u5982 MongoDB\u3001Cassandra\uff09\u3002<\/p>\n<h3 id=\"%e9%97%9c%e4%bf%82%e5%9e%8b%e6%95%b8%e6%93%9a%e5%ba%ab-eWRVKbPJob\">\u95dc\u4fc2\u578b\u6578\u64da\u5eab<\/h3>\n<p>\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u4f7f\u7528\u8868\u683c\u4f86\u5b58\u5132\u6578\u64da\uff0c\u8868\u683c\u4e4b\u9593\u53ef\u4ee5\u901a\u904e\u9375\uff08Key\uff09\u9032\u884c\u95dc\u806f\u3002\u9019\u7a2e\u7d50\u69cb\u4f7f\u5f97\u6578\u64da\u7684\u67e5\u8a62\u548c\u7ba1\u7406\u8b8a\u5f97\u66f4\u52a0\u9ad8\u6548\u3002\u4ee5\u4e0b\u662f\u4e00\u500b\u7c21\u55ae\u7684 SQL \u67e5\u8a62\u793a\u4f8b\uff1a<\/p>\n<pre><code>SELECT * FROM users WHERE age &gt; 18;<\/code><\/pre>\n<p>\u9019\u689d\u67e5\u8a62\u5c07\u8fd4\u56de\u6240\u6709\u5e74\u9f61\u5927\u65bc 18 \u6b72\u7684\u7528\u6236\u4fe1\u606f\u3002<\/p>\n<h3 id=\"%e9%9d%9e%e9%97%9c%e4%bf%82%e5%9e%8b%e6%95%b8%e6%93%9a%e5%ba%ab-eWRVKbPJob\">\u975e\u95dc\u4fc2\u578b\u6578\u64da\u5eab<\/h3>\n<p>\u975e\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u5247\u4e0d\u4f7f\u7528\u8868\u683c\u7d50\u69cb\uff0c\u800c\u662f\u4ee5\u6587\u6a94\u3001\u9375\u503c\u5c0d\u6216\u5716\u5f62\u7684\u5f62\u5f0f\u5b58\u5132\u6578\u64da\u3002\u9019\u4f7f\u5f97\u5b83\u5011\u5728\u8655\u7406\u5927\u898f\u6a21\u6578\u64da\u548c\u9ad8\u4e26\u767c\u8acb\u6c42\u6642\u8868\u73fe\u51fa\u8272\u3002\u4f8b\u5982\uff0cMongoDB \u4f7f\u7528 BSON \u683c\u5f0f\u4f86\u5b58\u5132\u6578\u64da\uff0c\u4ee5\u4e0b\u662f\u4e00\u500b\u63d2\u5165\u6587\u6a94\u7684\u793a\u4f8b\uff1a<\/p>\n<pre><code>db.users.insertOne({ name: \"John\", age: 30 });<\/code><\/pre>\n<h2 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e6%87%89%e7%94%a8-eWRVKbPJob\">\u6578\u64da\u5eab\u7684\u61c9\u7528<\/h2>\n<p>\u6578\u64da\u5eab\u7684\u61c9\u7528\u7bc4\u570d\u975e\u5e38\u5ee3\u6cdb\uff0c\u4ee5\u4e0b\u662f\u5e7e\u500b\u4e3b\u8981\u7684\u61c9\u7528\u9818\u57df\uff1a<\/p>\n<ul>\n<li><strong>\u4f01\u696d\u7ba1\u7406\uff1a<\/strong>\u4f01\u696d\u4f7f\u7528\u6578\u64da\u5eab\u4f86\u7ba1\u7406\u5ba2\u6236\u4fe1\u606f\u3001\u7522\u54c1\u5eab\u5b58\u548c\u92b7\u552e\u6578\u64da\u3002<\/li>\n<li><strong>\u96fb\u5b50\u5546\u52d9\uff1a<\/strong>\u5728\u7dda\u5546\u5e97\u4f9d\u8cf4\u6578\u64da\u5eab\u4f86\u5b58\u5132\u7522\u54c1\u4fe1\u606f\u3001\u8a02\u55ae\u8a18\u9304\u548c\u7528\u6236\u8cec\u6236\u3002<\/li>\n<li><strong>\u793e\u4ea4\u5a92\u9ad4\uff1a<\/strong>\u793e\u4ea4\u5e73\u53f0\u4f7f\u7528\u6578\u64da\u5eab\u4f86\u7ba1\u7406\u7528\u6236\u8cc7\u6599\u3001\u5e16\u5b50\u548c\u4e92\u52d5\u8a18\u9304\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%ad%b8%e7%bf%92%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e9%80%94%e5%be%91-eWRVKbPJob\">\u5b78\u7fd2\u6578\u64da\u5eab\u7684\u9014\u5f91<\/h2>\n<p>\u96a8\u8457\u6578\u64da\u5eab\u6280\u8853\u7684\u666e\u53ca\uff0c\u8a31\u591a\u5728\u7dda\u5e73\u53f0\u63d0\u4f9b\u4e86\u6578\u64da\u5eab\u8ab2\u7a0b\u8996\u983b\uff0c\u5e6b\u52a9\u5b78\u7fd2\u8005\u638c\u63e1\u76f8\u95dc\u77e5\u8b58\u3002\u9019\u4e9b\u8ab2\u7a0b\u901a\u5e38\u6db5\u84cb\u4ee5\u4e0b\u4e3b\u984c\uff1a<\/p>\n<ul>\n<li>\u6578\u64da\u5eab\u8a2d\u8a08\u539f\u5247<\/li>\n<li>SQL \u8a9e\u8a00\u57fa\u790e<\/li>\n<li>\u6578\u64da\u5eab\u6027\u80fd\u512a\u5316<\/li>\n<li>\u6578\u64da\u5b89\u5168\u8207\u5099\u4efd<\/li>\n<\/ul>\n<p>\u5b78\u7fd2\u8005\u53ef\u4ee5\u901a\u904e\u89c0\u770b\u9019\u4e9b\u8996\u983b\uff0c\u7372\u5f97\u5be6\u7528\u7684\u6280\u80fd\uff0c\u4e26\u80fd\u5920\u5728\u5be6\u969b\u5de5\u4f5c\u4e2d\u61c9\u7528\u6240\u5b78\u77e5\u8b58\u3002<\/p>\n<h2 id=\"%e7%b5%90%e8%ab%96-eWRVKbPJob\">\u7d50\u8ad6<\/h2>\n<p>\u6578\u64da\u5eab\u6280\u8853\u5728\u73fe\u4ee3\u793e\u6703\u4e2d\u626e\u6f14\u8457\u91cd\u8981\u89d2\u8272\uff0c\u638c\u63e1\u6578\u64da\u5eab\u7684\u57fa\u790e\u8207\u61c9\u7528\u5c0d\u65bc\u4efb\u4f55\u5e0c\u671b\u5728\u6280\u8853\u9818\u57df\u767c\u5c55\u7684\u4eba\u4f86\u8aaa\u90fd\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002\u900f\u904e\u6578\u64da\u5eab\u8ab2\u7a0b\u8996\u983b\uff0c\u5b78\u7fd2\u8005\u53ef\u4ee5\u7cfb\u7d71\u5730\u4e86\u89e3\u6578\u64da\u5eab\u7684\u904b\u4f5c\u539f\u7406\u53ca\u5176\u5be6\u969b\u61c9\u7528\uff0c\u5f9e\u800c\u63d0\u5347\u81ea\u5df1\u7684\u5c08\u696d\u6280\u80fd\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5c0d\u65bc\u6578\u64da\u5eab\u6280\u8853\u6709\u9032\u4e00\u6b65\u7684\u8208\u8da3\uff0c\u4e26\u5e0c\u671b\u5c0b\u627e\u5408\u9069\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u4f86\u9032\u884c\u5be6\u9a57\u548c\u958b\u767c\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u9069\u5408\u4e0d\u540c\u9700\u6c42\u7684\u7528\u6236\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22\u6578\u64da\u5eab\u57fa\u790e\u8207\u61c9\u7528\u8ab2\u7a0b\u8996\u983b\uff0c\u5b78\u7fd2\u6578\u64da\u5eab\u8a2d\u8a08\u3001\u67e5\u8a62\u6280\u5de7\u53ca\u5be6\u969b\u61c9\u7528\uff0c\u63d0\u5347\u60a8\u7684\u6578\u64da\u7ba1\u7406\u80fd\u529b\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-186812","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/186812","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=186812"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/186812\/revisions"}],"predecessor-version":[{"id":186813,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/186812\/revisions\/186813"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=186812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=186812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=186812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}