{"id":171373,"date":"2024-11-07T02:12:19","date_gmt":"2024-11-06T18:12:19","guid":{"rendered":"https:\/\/server.hk\/cnblog\/171373\/"},"modified":"2024-11-07T02:12:20","modified_gmt":"2024-11-06T18:12:20","slug":"%e6%b7%ba%e8%ab%87%e8%ae%80%e6%95%b8%e6%93%9a%e5%ba%ab%e9%ab%94%e6%9c%83%e8%88%87%e5%bf%83%e5%be%97-%e8%ae%80%e6%95%b8%e6%93%9a%e5%ba%ab%e6%9c%89%e6%84%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/171373\/","title":{"rendered":"\u6dfa\u8ac7\u8b80\u6578\u64da\u5eab\u9ad4\u6703\u8207\u5fc3\u5f97 (\u8b80\u6578\u64da\u5eab\u6709\u611f)"},"content":{"rendered":"<h1 id=\"%e6%b7%ba%e8%ab%87%e8%ae%80%e6%95%b8%e6%93%9a%e5%ba%ab%e9%ab%94%e6%9c%83%e8%88%87%e5%bf%83%e5%be%97-%e8%ae%80%e6%95%b8%e6%93%9a%e5%ba%ab%e6%9c%89%e6%84%9f-auSvzVAhCa\">\u6dfa\u8ac7\u8b80\u6578\u64da\u5eab\u9ad4\u6703\u8207\u5fc3\u5f97 (\u8b80\u6578\u64da\u5eab\u6709\u611f)<\/h1>\n<p>\u5728\u7576\u4eca\u6578\u64da\u9a45\u52d5\u7684\u6642\u4ee3\uff0c\u6578\u64da\u5eab\u7684\u5b78\u7fd2\u8207\u61c9\u7528\u5df2\u6210\u70ba\u8a31\u591aIT\u5c08\u696d\u4eba\u58eb\u548c\u958b\u767c\u8005\u7684\u91cd\u8981\u8ab2\u984c\u3002\u6578\u64da\u5eab\u4e0d\u50c5\u662f\u5b58\u5132\u6578\u64da\u7684\u5de5\u5177\uff0c\u66f4\u662f\u5206\u6790\u548c\u7ba1\u7406\u6578\u64da\u7684\u95dc\u9375\u3002\u672c\u6587\u5c07\u5206\u4eab\u4e00\u4e9b\u8b80\u6578\u64da\u5eab\u7684\u9ad4\u6703\u8207\u5fc3\u5f97\uff0c\u5e6b\u52a9\u8b80\u8005\u66f4\u6df1\u5165\u5730\u7406\u89e3\u6578\u64da\u5eab\u7684\u904b\u4f5c\u53ca\u5176\u5728\u5be6\u969b\u61c9\u7528\u4e2d\u7684\u91cd\u8981\u6027\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-auSvzVAhCa\">\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\u7531\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff08DBMS\uff09\u4f86\u7ba1\u7406\u3002\u6578\u64da\u5eab\u53ef\u4ee5\u5206\u70ba\u591a\u7a2e\u985e\u578b\uff0c\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\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u4f7f\u7528\u8868\u683c\u4f86\u5b58\u5132\u6578\u64da\uff0c\u800c\u975e\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u5247\u4f7f\u7528\u6587\u6a94\u6216\u9375\u503c\u5c0d\u7684\u5f62\u5f0f\u3002<\/p>\n<h2 id=\"%e5%ad%b8%e7%bf%92%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e5%8b%95%e6%a9%9f-auSvzVAhCa\">\u5b78\u7fd2\u6578\u64da\u5eab\u7684\u52d5\u6a5f<\/h2>\n<p>\u5b78\u7fd2\u6578\u64da\u5eab\u7684\u52d5\u6a5f\u4e3b\u8981\u4f86\u81ea\u65bc\u4ee5\u4e0b\u5e7e\u500b\u65b9\u9762\uff1a<\/p>\n<ul>\n<li><strong>\u6578\u64da\u7ba1\u7406\u80fd\u529b\uff1a<\/strong>\u96a8\u8457\u6578\u64da\u91cf\u7684\u589e\u52a0\uff0c\u5982\u4f55\u6709\u6548\u5730\u7ba1\u7406\u548c\u6aa2\u7d22\u6578\u64da\u6210\u70ba\u4e00\u9805\u91cd\u8981\u6280\u80fd\u3002<\/li>\n<li><strong>\u6578\u64da\u5206\u6790\u9700\u6c42\uff1a<\/strong>\u4f01\u696d\u9700\u8981\u901a\u904e\u6578\u64da\u5206\u6790\u4f86\u505a\u51fa\u66f4\u660e\u667a\u7684\u6c7a\u7b56\uff0c\u9019\u9700\u8981\u5c0d\u6578\u64da\u5eab\u6709\u6df1\u5165\u7684\u7406\u89e3\u3002<\/li>\n<li><strong>\u6280\u8853\u767c\u5c55\uff1a<\/strong>\u96a8\u8457\u96f2\u8a08\u7b97\u548c\u5927\u6578\u64da\u6280\u8853\u7684\u8208\u8d77\uff0c\u6578\u64da\u5eab\u6280\u8853\u4e5f\u5728\u4e0d\u65b7\u6f14\u9032\uff0c\u5b78\u7fd2\u65b0\u6280\u8853\u80fd\u5920\u4fdd\u6301\u7af6\u722d\u529b\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c-auSvzVAhCa\">\u6578\u64da\u5eab\u7684\u57fa\u672c\u64cd\u4f5c<\/h2>\n<p>\u5728\u5b78\u7fd2\u6578\u64da\u5eab\u7684\u904e\u7a0b\u4e2d\uff0c\u638c\u63e1\u57fa\u672c\u7684\u64cd\u4f5c\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u898b\u7684\u6578\u64da\u5eab\u64cd\u4f5c\uff1a<\/p>\n<h3 id=\"1-%e5%89%b5%e5%bb%ba%e6%95%b8%e6%93%9a%e5%ba%ab%e5%92%8c%e8%a1%a8%e6%a0%bc-auSvzVAhCa\">1. \u5275\u5efa\u6578\u64da\u5eab\u548c\u8868\u683c<\/h3>\n<pre><code>CREATE DATABASE my_database;\nUSE my_database;\nCREATE TABLE users (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    name VARCHAR(100),\n    email VARCHAR(100)\n);<\/code><\/pre>\n<h3 id=\"2-%e6%8f%92%e5%85%a5%e6%95%b8%e6%93%9a-auSvzVAhCa\">2. \u63d2\u5165\u6578\u64da<\/h3>\n<pre><code>INSERT INTO users (name, email) VALUES ('Alice', 'alice@example.com');<\/code><\/pre>\n<h3 id=\"3-%e6%9f%a5%e8%a9%a2%e6%95%b8%e6%93%9a-auSvzVAhCa\">3. \u67e5\u8a62\u6578\u64da<\/h3>\n<pre><code>SELECT * FROM users WHERE email = 'alice@example.com';<\/code><\/pre>\n<h3 id=\"4-%e6%9b%b4%e6%96%b0%e6%95%b8%e6%93%9a-auSvzVAhCa\">4. \u66f4\u65b0\u6578\u64da<\/h3>\n<pre><code>UPDATE users SET name = 'Alice Smith' WHERE id = 1;<\/code><\/pre>\n<h3 id=\"5-%e5%88%aa%e9%99%a4%e6%95%b8%e6%93%9a-auSvzVAhCa\">5. \u522a\u9664\u6578\u64da<\/h3>\n<pre><code>DELETE FROM users WHERE id = 1;<\/code><\/pre>\n<h2 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e8%a8%ad%e8%a8%88%e7%9a%84%e9%87%8d%e8%a6%81%e6%80%a7-auSvzVAhCa\">\u6578\u64da\u5eab\u8a2d\u8a08\u7684\u91cd\u8981\u6027<\/h2>\n<p>\u826f\u597d\u7684\u6578\u64da\u5eab\u8a2d\u8a08\u80fd\u5920\u63d0\u9ad8\u6578\u64da\u7684\u5b8c\u6574\u6027\u548c\u67e5\u8a62\u6548\u7387\u3002\u5728\u8a2d\u8a08\u6578\u64da\u5eab\u6642\uff0c\u9700\u8981\u8003\u616e\u4ee5\u4e0b\u5e7e\u500b\u65b9\u9762\uff1a<\/p>\n<ul>\n<li><strong>\u6b63\u898f\u5316\uff1a<\/strong>\u901a\u904e\u6b63\u898f\u5316\u4f86\u6d88\u9664\u6578\u64da\u5197\u9918\uff0c\u78ba\u4fdd\u6578\u64da\u7684\u4e00\u81f4\u6027\u3002<\/li>\n<li><strong>\u7d22\u5f15\uff1a<\/strong>\u70ba\u5e38\u7528\u7684\u67e5\u8a62\u5b57\u6bb5\u5efa\u7acb\u7d22\u5f15\uff0c\u4ee5\u63d0\u9ad8\u67e5\u8a62\u6027\u80fd\u3002<\/li>\n<li><strong>\u5b89\u5168\u6027\uff1a<\/strong>\u8a2d\u7f6e\u9069\u7576\u7684\u6b0a\u9650\uff0c\u78ba\u4fdd\u6578\u64da\u7684\u5b89\u5168\u6027\u548c\u96b1\u79c1\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b5%90%e8%ab%96-auSvzVAhCa\">\u7d50\u8ad6<\/h2>\n<p>\u8b80\u6578\u64da\u5eab\u7684\u904e\u7a0b\u662f\u4e00\u500b\u4e0d\u65b7\u5b78\u7fd2\u548c\u5be6\u8e10\u7684\u904e\u7a0b\u3002\u901a\u904e\u638c\u63e1\u57fa\u672c\u64cd\u4f5c\u3001\u7406\u89e3\u6578\u64da\u5eab\u8a2d\u8a08\u539f\u5247\u4ee5\u53ca\u4e0d\u65b7\u63a2\u7d22\u65b0\u6280\u8853\uff0c\u80fd\u5920\u5728\u6578\u64da\u7ba1\u7406\u548c\u5206\u6790\u9818\u57df\u4e2d\u7372\u5f97\u66f4\u5927\u7684\u6210\u5c31\u3002\u96a8\u8457\u6280\u8853\u7684\u767c\u5c55\uff0c\u6578\u64da\u5eab\u7684\u61c9\u7528\u7bc4\u570d\u4e5f\u5728\u4e0d\u65b7\u64f4\u5927\uff0c\u672a\u4f86\u7684\u8077\u696d\u767c\u5c55\u5c07\u66f4\u52a0\u4f9d\u8cf4\u65bc\u5c0d\u6578\u64da\u5eab\u7684\u6df1\u5165\u7406\u89e3\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5c0d\u65bc\u5982\u4f55\u9078\u64c7\u5408\u9069\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u6216\u5176\u4ed6 <a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a> \u670d\u52d9\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>\u6dfa\u8ac7\u8b80\u6578\u64da\u5eab\u7684\u9ad4\u6703\u8207\u5fc3\u5f97\uff0c\u5206\u4eab\u5b78\u7fd2\u904e\u7a0b\u4e2d\u7684\u6536\u7a6b\u8207\u6311\u6230\uff0c\u63a2\u7d22\u6578\u64da\u80cc\u5f8c\u7684\u6545\u4e8b\u8207\u50f9\u503c\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-171373","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171373","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=171373"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171373\/revisions"}],"predecessor-version":[{"id":171374,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171373\/revisions\/171374"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=171373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=171373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=171373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}