{"id":186314,"date":"2024-11-11T04:53:20","date_gmt":"2024-11-10T20:53:20","guid":{"rendered":"https:\/\/server.hk\/cnblog\/186314\/"},"modified":"2024-11-11T04:53:21","modified_gmt":"2024-11-10T20:53:21","slug":"%e6%95%b8%e6%93%9a%e5%ba%ab%e5%ad%98%e5%84%b2%e7%af%84%e5%9c%8d%e5%a4%a7%e6%8f%ad%e7%a7%98%ef%bc%9a%e7%9c%8b%e7%9c%8b%e5%93%aa%e4%ba%9b%e6%95%b8%e6%93%9a%e5%8f%af%e4%bb%a5%e8%a2%ab%e5%ad%98%e5%84%b2","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/186314\/","title":{"rendered":"\u6578\u64da\u5eab\u5b58\u5132\u7bc4\u570d\u5927\u63ed\u79d8\uff1a\u770b\u770b\u54ea\u4e9b\u6578\u64da\u53ef\u4ee5\u88ab\u5b58\u5132\u9032\u53bb\uff01\uff08\u6578\u64da\u5eab\u80fd\u5b58\u54ea\u4e9b\u6578\u64da\uff09"},"content":{"rendered":"<h1 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e5%ad%98%e5%84%b2%e7%af%84%e5%9c%8d%e5%a4%a7%e6%8f%ad%e7%a7%98%ef%bc%9a%e7%9c%8b%e7%9c%8b%e5%93%aa%e4%ba%9b%e6%95%b8%e6%93%9a%e5%8f%af%e4%bb%a5%e8%a2%ab%e5%ad%98%e5%84%b2-SqERWEdPpN\">\u6578\u64da\u5eab\u5b58\u5132\u7bc4\u570d\u5927\u63ed\u79d8\uff1a\u770b\u770b\u54ea\u4e9b\u6578\u64da\u53ef\u4ee5\u88ab\u5b58\u5132\u9032\u53bb\uff01\uff08\u6578\u64da\u5eab\u80fd\u5b58\u54ea\u4e9b\u6578\u64da\uff09<\/h1>\n<p>\u5728\u7576\u4eca\u6578\u5b57\u5316\u7684\u6642\u4ee3\uff0c\u6578\u64da\u5eab\u5df2\u6210\u70ba\u4f01\u696d\u548c\u500b\u4eba\u7ba1\u7406\u6578\u64da\u7684\u91cd\u8981\u5de5\u5177\u3002\u7121\u8ad6\u662f\u5c0f\u578b\u4f01\u696d\u9084\u662f\u5927\u578b\u6a5f\u69cb\uff0c\u6578\u64da\u5eab\u90fd\u80fd\u6709\u6548\u5730\u5b58\u5132\u3001\u6aa2\u7d22\u548c\u7ba1\u7406\u5404\u985e\u6578\u64da\u3002\u90a3\u9ebc\uff0c\u7a76\u7adf\u54ea\u4e9b\u6578\u64da\u53ef\u4ee5\u88ab\u5b58\u5132\u5728\u6578\u64da\u5eab\u4e2d\u5462\uff1f\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u6578\u64da\u5eab\u7684\u5b58\u5132\u7bc4\u570d\uff0c\u5e6b\u52a9\u8b80\u8005\u66f4\u597d\u5730\u7406\u89e3\u6578\u64da\u5eab\u7684\u529f\u80fd\u548c\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-SqERWEdPpN\">\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\u5982MySQL\u3001PostgreSQL\uff09\u548c\u975e\u95dc\u4fc2\u578b\u6578\u64da\u5eab\uff08\u5982MongoDB\u3001Cassandra\uff09\u3002<\/p>\n<h2 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e8%83%bd%e5%ad%98%e5%93%aa%e4%ba%9b%e6%95%b8%e6%93%9a-SqERWEdPpN\">\u6578\u64da\u5eab\u80fd\u5b58\u54ea\u4e9b\u6578\u64da<\/h2>\n<p>\u6578\u64da\u5eab\u53ef\u4ee5\u5b58\u5132\u5404\u7a2e\u985e\u578b\u7684\u6578\u64da\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u898b\u7684\u6578\u64da\u985e\u578b\uff1a<\/p>\n<ul>\n<li><strong>\u7d50\u69cb\u5316\u6578\u64da\uff1a<\/strong>\u9019\u985e\u6578\u64da\u901a\u5e38\u4ee5\u8868\u683c\u5f62\u5f0f\u5b58\u5132\uff0c\u5177\u6709\u660e\u78ba\u7684\u7d50\u69cb\u548c\u683c\u5f0f\u3002\u4f8b\u5982\uff0c\u5ba2\u6236\u4fe1\u606f\u3001\u7522\u54c1\u6e05\u55ae\u548c\u8a02\u55ae\u8a18\u9304\u7b49\u3002<\/li>\n<li><strong>\u534a\u7d50\u69cb\u5316\u6578\u64da\uff1a<\/strong>\u9019\u985e\u6578\u64da\u4e0d\u5b8c\u5168\u7b26\u5408\u50b3\u7d71\u7684\u8868\u683c\u7d50\u69cb\uff0c\u4f46\u4ecd\u7136\u5305\u542b\u6a19\u7c64\u6216\u5176\u4ed6\u6a19\u8b58\u7b26\u3002\u4f8b\u5982\uff0cXML\u548cJSON\u683c\u5f0f\u7684\u6578\u64da\u3002<\/li>\n<li><strong>\u975e\u7d50\u69cb\u5316\u6578\u64da\uff1a<\/strong>\u9019\u985e\u6578\u64da\u6c92\u6709\u660e\u78ba\u7684\u7d50\u69cb\uff0c\u901a\u5e38\u5305\u62ec\u6587\u672c\u3001\u5716\u50cf\u3001\u97f3\u983b\u548c\u8996\u983b\u6587\u4ef6\u3002\u4f8b\u5982\uff0c\u793e\u4ea4\u5a92\u9ad4\u5e16\u5b50\u3001\u96fb\u5b50\u90f5\u4ef6\u548c\u591a\u5a92\u9ad4\u5167\u5bb9\u3002<\/li>\n<\/ul>\n<h3 id=\"%e7%b5%90%e6%a7%8b%e5%8c%96%e6%95%b8%e6%93%9a%e7%9a%84%e7%a4%ba%e4%be%8b-SqERWEdPpN\">\u7d50\u69cb\u5316\u6578\u64da\u7684\u793a\u4f8b<\/h3>\n<p>\u7d50\u69cb\u5316\u6578\u64da\u901a\u5e38\u5b58\u5132\u5728\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u4e2d\uff0c\u4ee5\u4e0b\u662f\u4e00\u500b\u7c21\u55ae\u7684SQL\u793a\u4f8b\uff0c\u5c55\u793a\u5982\u4f55\u5275\u5efa\u4e00\u500b\u5ba2\u6236\u4fe1\u606f\u8868\uff1a<\/p>\n<pre><code>CREATE TABLE Customers (\n    CustomerID INT PRIMARY KEY,\n    FirstName VARCHAR(50),\n    LastName VARCHAR(50),\n    Email VARCHAR(100),\n    Phone VARCHAR(15)\n);<\/code><\/pre>\n<h3 id=\"%e5%8d%8a%e7%b5%90%e6%a7%8b%e5%8c%96%e6%95%b8%e6%93%9a%e7%9a%84%e7%a4%ba%e4%be%8b-SqERWEdPpN\">\u534a\u7d50\u69cb\u5316\u6578\u64da\u7684\u793a\u4f8b<\/h3>\n<p>\u534a\u7d50\u69cb\u5316\u6578\u64da\u53ef\u4ee5\u4f7f\u7528JSON\u683c\u5f0f\u5b58\u5132\uff0c\u4ee5\u4e0b\u662f\u4e00\u500bJSON\u793a\u4f8b\uff0c\u5c55\u793a\u5982\u4f55\u5b58\u5132\u4e00\u500b\u7522\u54c1\u4fe1\u606f\uff1a<\/p>\n<pre><code>{\n    \"ProductID\": 1,\n    \"ProductName\": \"Laptop\",\n    \"Price\": 999.99,\n    \"Specifications\": {\n        \"RAM\": \"16GB\",\n        \"Storage\": \"512GB SSD\"\n    }\n}<\/code><\/pre>\n<h3 id=\"%e9%9d%9e%e7%b5%90%e6%a7%8b%e5%8c%96%e6%95%b8%e6%93%9a%e7%9a%84%e7%a4%ba%e4%be%8b-SqERWEdPpN\">\u975e\u7d50\u69cb\u5316\u6578\u64da\u7684\u793a\u4f8b<\/h3>\n<p>\u975e\u7d50\u69cb\u5316\u6578\u64da\u7684\u5b58\u5132\u901a\u5e38\u9700\u8981\u5c08\u9580\u7684\u6578\u64da\u5eab\uff0c\u5982MongoDB\u3002\u4ee5\u4e0b\u662f\u4e00\u500bMongoDB\u7684\u63d2\u5165\u793a\u4f8b\uff1a<\/p>\n<pre><code>db.posts.insertOne({\n    title: \"\u6211\u7684\u7b2c\u4e00\u7bc7\u535a\u5ba2\",\n    content: \"\u9019\u662f\u4e00\u7bc7\u95dc\u65bc\u6578\u64da\u5eab\u7684\u535a\u5ba2\u6587\u7ae0\u3002\",\n    tags: [\"\u6578\u64da\u5eab\", \"\u6280\u8853\", \"\u5b78\u7fd2\"]\n});<\/code><\/pre>\n<h2 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e6%87%89%e7%94%a8%e5%a0%b4%e6%99%af-SqERWEdPpN\">\u6578\u64da\u5eab\u7684\u61c9\u7528\u5834\u666f<\/h2>\n<p>\u6578\u64da\u5eab\u7684\u61c9\u7528\u7bc4\u570d\u975e\u5e38\u5ee3\u6cdb\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u898b\u7684\u61c9\u7528\u5834\u666f\uff1a<\/p>\n<ul>\n<li><strong>\u96fb\u5b50\u5546\u52d9\uff1a<\/strong>\u5728\u7dda\u5546\u5e97\u4f7f\u7528\u6578\u64da\u5eab\u4f86\u7ba1\u7406\u7522\u54c1\u3001\u5ba2\u6236\u548c\u8a02\u55ae\u4fe1\u606f\u3002<\/li>\n<li><strong>\u793e\u4ea4\u5a92\u9ad4\uff1a<\/strong>\u793e\u4ea4\u5e73\u53f0\u4f7f\u7528\u6578\u64da\u5eab\u4f86\u5b58\u5132\u7528\u6236\u8cc7\u6599\u3001\u5e16\u5b50\u548c\u4e92\u52d5\u8a18\u9304\u3002<\/li>\n<li><strong>\u91d1\u878d\u670d\u52d9\uff1a<\/strong>\u9280\u884c\u548c\u91d1\u878d\u6a5f\u69cb\u4f7f\u7528\u6578\u64da\u5eab\u4f86\u7ba1\u7406\u5ba2\u6236\u8cec\u6236\u3001\u4ea4\u6613\u548c\u98a8\u96aa\u8a55\u4f30\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b5%90%e8%ab%96-SqERWEdPpN\">\u7d50\u8ad6<\/h2>\n<p>\u6578\u64da\u5eab\u7684\u5b58\u5132\u7bc4\u570d\u6db5\u84cb\u4e86\u7d50\u69cb\u5316\u3001\u534a\u7d50\u69cb\u5316\u548c\u975e\u7d50\u69cb\u5316\u6578\u64da\uff0c\u4e26\u5728\u5404\u884c\u5404\u696d\u4e2d\u767c\u63ee\u8457\u91cd\u8981\u4f5c\u7528\u3002\u4e86\u89e3\u6578\u64da\u5eab\u80fd\u5b58\u5132\u54ea\u4e9b\u6578\u64da\uff0c\u5c0d\u65bc\u4f01\u696d\u548c\u958b\u767c\u8005\u4f86\u8aaa\u81f3\u95dc\u91cd\u8981\uff0c\u56e0\u70ba\u9019\u5c07\u5f71\u97ff\u5230\u6578\u64da\u7684\u7ba1\u7406\u548c\u61c9\u7528\u6548\u7387\u3002\u7121\u8ad6\u662f\u9078\u64c7\u95dc\u4fc2\u578b\u9084\u662f\u975e\u95dc\u4fc2\u578b\u6578\u64da\u5eab\uff0c\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u5b58\u5132\u65b9\u6848\u5c07\u6709\u52a9\u65bc\u63d0\u5347\u696d\u52d9\u904b\u71df\u7684\u9748\u6d3b\u6027\u548c\u6548\u7387\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5c0d\u65bc\u5982\u4f55\u9078\u64c7\u5408\u9069\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u65b9\u6848\u4ee5\u652f\u6301\u60a8\u7684\u6578\u64da\u5eab\u9700\u6c42\u6709\u8208\u8da3\uff0c\u6b61\u8fce\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u66f4\u591a\u8cc7\u8a0a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22\u6578\u64da\u5eab\u7684\u5b58\u5132\u7bc4\u570d\uff0c\u4e86\u89e3\u5404\u985e\u6578\u64da\uff08\u5982\u6587\u672c\u3001\u5716\u50cf\u3001\u97f3\u983b\u7b49\uff09\u5982\u4f55\u88ab\u6709\u6548\u5b58\u5132\u8207\u7ba1\u7406\uff01<\/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-186314","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/186314","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=186314"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/186314\/revisions"}],"predecessor-version":[{"id":186315,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/186314\/revisions\/186315"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=186314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=186314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=186314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}