{"id":1120,"date":"2026-03-29T08:16:42","date_gmt":"2026-03-29T08:16:42","guid":{"rendered":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/"},"modified":"2026-03-29T08:16:42","modified_gmt":"2026-03-29T08:16:42","slug":"decoding-multiplicity-class-diagrams-guide","status":"publish","type":"post","link":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/","title":{"rendered":"\u89e3\u6790\u591a\u91cd\u6027\uff1a\u638c\u63e1 1:N\u30011:1 \u548c N:N \u5173\u7cfb\u7684\u7b80\u6613\u6307\u5357"},"content":{"rendered":"<p>\u5728\u8f6f\u4ef6\u67b6\u6784\u548c\u6570\u636e\u5efa\u6a21\u7684\u9886\u57df\u4e2d\uff0c\u5f88\u5c11\u6709\u6982\u5ff5\u80fd\u50cf\u5b9e\u4f53\u4e4b\u95f4\u7684\u5173\u7cfb\u90a3\u6837\u5177\u6709\u91cd\u8981\u6027\u3002\u5728\u8bbe\u8ba1\u7cfb\u7edf\u65f6\uff0c\u7406\u89e3\u5bf9\u8c61\u4e4b\u95f4\u7684\u4ea4\u4e92\u65b9\u5f0f\uff0c\u4e0e\u5b9a\u4e49\u5bf9\u8c61\u672c\u8eab\u540c\u6837\u5173\u952e\u3002\u8fd9\u79cd\u4ea4\u4e92\u901a\u8fc7<strong>\u7c7b\u56fe\u591a\u91cd\u6027<\/strong>\u8fd9\u4e00\u7b26\u53f7\u6765\u6b63\u5f0f\u8868\u8fbe\uff0c\u5b83\u89c4\u5b9a\u4e86\u4e24\u4e2a\u7c7b\u4e4b\u95f4\u7684\u6570\u91cf\u5173\u8054\u3002\u65e0\u8bba\u4f60\u662f\u7ed8\u5236\u6570\u636e\u5e93\u6a21\u5f0f\u8fd8\u662f\u6784\u5efa\u9762\u5411\u5bf9\u8c61\u7684\u4ee3\u7801\u5e93\uff0c\u8fd9\u91cc\u7684\u6e05\u6670\u6027\u90fd\u80fd\u5728\u95ee\u9898\u51fa\u73b0\u4e4b\u524d\u9632\u6b62\u67b6\u6784\u503a\u52a1\u7684\u79ef\u7d2f\u3002<\/p>\n<p>\u591a\u91cd\u6027\u5b9a\u4e49\u4e86\u67d0\u4e00\u7c7b\u5b9e\u4f8b\u53ef\u4ee5\u4e0e\u53e6\u4e00\u7c7b\u5b9e\u4f8b\u5173\u8054\u7684\u6570\u91cf\u9650\u5236\u3002\u5b83\u56de\u7b54\u4e86\u6839\u672c\u6027\u95ee\u9898\uff1a\u4e00\u4e2a\u7528\u6237\u80fd\u5426\u62e5\u6709\u591a\u4e2a\u4e2a\u4eba\u8d44\u6599\uff1f\u4e00\u4e2a\u8ba2\u5355\u80fd\u5426\u5c5e\u4e8e\u591a\u4e2a\u5ba2\u6237\uff1f\u8fd9\u4e9b\u533a\u522b\u51b3\u5b9a\u4e86\u6570\u636e\u7684\u6d41\u52a8\u65b9\u5f0f\u4ee5\u53ca\u5e94\u7528\u7a0b\u5e8f\u7684\u5b8c\u6574\u6027\u3002\u672c\u6307\u5357\u5c06\u6df1\u5165\u63a2\u8ba8\u6838\u5fc3\u57fa\u6570\u2014\u20141:1\u30011:N \u548c N:N\uff0c\u8be6\u7ec6\u5206\u6790\u5b83\u4eec\u7684\u5b9e\u73b0\u65b9\u5f0f\u3001\u5f71\u54cd\u4ee5\u53ca\u5e38\u89c1\u9677\u9631\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img alt=\"A playful child's drawing style infographic explaining class diagram multiplicity: one-to-one (1:1) shown as a person with one passport, one-to-many (1:N) as a tree with many apples, and many-to-many (N:N) as students connected to courses via a junction table, with simple UML notation symbols (1, *, 0..1) in bright crayon colors on a white background, teaching software architecture relationships in an intuitive visual way\" decoding=\"async\" src=\"https:\/\/www.method-post.com\/wp-content\/uploads\/2026\/03\/multiplicity-relationships-infographic-childs-drawing.jpg\"\/><\/figure>\n<\/div>\n<h2>\u7406\u89e3\u57fa\u7840\uff1a\u7b26\u53f7\u4e0e\u672f\u8bed \ud83e\udde9<\/h2>\n<p>\u5728\u6df1\u5165\u63a2\u8ba8\u7279\u5b9a\u5173\u7cfb\u7c7b\u578b\u4e4b\u524d\uff0c\u5fc5\u987b\u5148\u5efa\u7acb\u7edf\u4e00\u5efa\u6a21\u8bed\u8a00\uff08UML\uff09\u548c\u901a\u7528\u6570\u636e\u5efa\u6a21\u4e2d\u4f7f\u7528\u7684\u672f\u8bed\u4f53\u7cfb\u3002\u591a\u91cd\u6027\u4e0d\u4ec5\u4ec5\u662f\u8ba1\u6570\uff0c\u66f4\u5728\u4e8e\u5b9a\u4e49\u89c4\u5219\u3002<\/p>\n<ul>\n<li><strong>\u57fa\u6570\uff1a<\/strong> \u4e00\u4e2a\u7c7b\u7684\u5b9e\u4f8b\u53ef\u4ee5\u53c2\u4e0e\u5173\u7cfb\u7684\u6570\u91cf\u3002\u901a\u5e38\u7528\u6570\u5b57\u5982<code>1<\/code>, <code>*<\/code>\uff0c\u6216\u8303\u56f4\u5982<code>0..1<\/code>.<\/li>\n<li><strong>\u53ef\u9009\u6027\uff1a<\/strong> \u4e00\u4e2a\u7c7b\u7684\u5b9e\u4f8b\u662f\u5426\u5fc5\u987b\u53c2\u4e0e\u8be5\u5173\u7cfb\u3002\u4f8b\u5982\uff0c\u6bcf\u4e2a\u5458\u5de5\u90fd\u9700\u8981\u4e00\u4e2a\u7ecf\u7406\u5417\uff1f<\/li>\n<li><strong> \u5173\u8054\uff1a<\/strong> \u8fd9\u4e00\u8fde\u63a5\u672c\u8eab\uff0c\u8868\u793a\u7c7b\u4e4b\u95f4\u7684\u7ed3\u6784\u6027\u5173\u7cfb\u3002<\/li>\n<\/ul>\n<p>\u5f53\u4f60\u67e5\u770b\u7c7b\u56fe\u65f6\uff0c\u4f1a\u770b\u5230\u8fde\u63a5\u65b9\u6846\u7684\u7ebf\u6761\u3002\u5728\u8fd9\u4e9b\u7ebf\u6761\u9644\u8fd1\uff0c\u5c0f\u6570\u5b57\u6216\u7b26\u53f7\u8868\u793a\u591a\u91cd\u6027\u3002\u8fd9\u4e9b\u7b26\u53f7\u5982\u540c\u5951\u7ea6\u3002\u5982\u679c\u7cfb\u7edf\u903b\u8f91\u8fdd\u53cd\u4e86\u8fd9\u4e9b\u5951\u7ea6\uff0c\u6570\u636e\u5c31\u4f1a\u53d8\u5f97\u4e0d\u4e00\u81f4\u3002\u7406\u89e3\u8fd9\u79cd\u7b26\u53f7\u662f\u8fc8\u5411\u7a33\u5065\u8bbe\u8ba1\u7684\u7b2c\u4e00\u6b65\u3002<\/p>\n<h2>\u4e00\u5bf9\u4e00\u5173\u7cfb\uff081:1\uff09 \ud83d\udd17<\/h2>\n<p>\u4e00\u5bf9\u4e00\u5173\u7cfb\u662f\u6807\u51c6\u5173\u8054\u4e2d\u6700\u53d7\u9650\u5236\u7684\u4e00\u79cd\u3002\u5b83\u610f\u5473\u7740\u5bf9\u4e8e\u7c7b A \u7684\u6bcf\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u6700\u591a\u53ea\u6709\u4e00\u4e2a\u7c7b B \u7684\u5b9e\u4f8b\u4e0e\u4e4b\u5bf9\u5e94\uff0c\u53cd\u4e4b\u4ea6\u7136\u3002\u8fd9\u901a\u5e38\u7528\u7b26\u53f7<code>1<\/code>\u8868\u793a\u5728\u5173\u8054\u7ebf\u7684\u4e24\u7aef\u3002<\/p>\n<h3>\u4f55\u65f6\u4f7f\u7528 1:1 \u5173\u8054<\/h3>\n<p>\u5f53\u4e24\u4e2a\u6982\u5ff5\u672c\u8d28\u4e0a\u662f\u540c\u4e00\u5b9e\u4f53\u7684\u4e0d\u540c\u89c6\u89d2\uff0c\u6216\u5f53\u5173\u8054\u662f\u6392\u4ed6\u4e14\u6c38\u4e45\u6027\u65f6\uff0c\u8fd9\u79cd\u5173\u7cfb\u7c7b\u578b\u9002\u7528\u3002<\/p>\n<ul>\n<li><strong>\u8ba4\u8bc1\u4ee4\u724c\uff1a<\/strong> \u7528\u6237\u8d26\u6237\u5728\u540c\u4e00\u65f6\u95f4\u53ea\u80fd\u62e5\u6709\u4e00\u4e2a\u6709\u6548\u7684\u4f1a\u8bdd\u4ee4\u724c\u3002\u5982\u679c\u7528\u6237\u518d\u6b21\u767b\u5f55\uff0c\u4e4b\u524d\u7684\u4ee4\u724c\u5c06\u88ab\u5931\u6548\u3002<\/li>\n<li><strong> \u8eab\u4efd\u6587\u4ef6\uff1a<\/strong> \u62a4\u7167\u4ec5\u9881\u53d1\u7ed9\u4e00\u4e2a\u7279\u5b9a\u7684\u516c\u6c11\uff0c\u800c\u4e00\u4e2a\u516c\u6c11\u5728\u540c\u4e00\u65f6\u95f4\u53ea\u80fd\u6301\u6709\u4e00\u672c\u4e3b\u8981\u62a4\u7167\u3002<\/li>\n<li><strong>\u914d\u7f6e\u8bbe\u7f6e\uff1a<\/strong>\u7279\u5b9a\u7684\u5e94\u7528\u7a0b\u5e8f\u5b9e\u4f8b\u901a\u5e38\u53ea\u6709\u4e00\u4e2aConfiguration\u5bf9\u8c61\u6765\u4fdd\u5b58\u5176\u8fd0\u884c\u65f6\u53c2\u6570\u3002<\/li>\n<\/ul>\n<h3>\u5b9e\u73b0\u6ce8\u610f\u4e8b\u9879<\/h3>\n<p>\u5b9e\u73b0\u4e00\u5bf9\u4e00\u5173\u7cfb\u9700\u8981\u4ed4\u7ec6\u5173\u6ce8\u5916\u952e\u548c\u6570\u636e\u5e93\u7ea6\u675f\u3002\u5728\u5173\u7cfb\u578b\u6570\u636e\u5e93\u4e2d\uff0c\u901a\u5e38\u901a\u8fc7\u5728\u4e00\u4e2a\u8868\u4e2d\u653e\u7f6e\u4e00\u4e2a\u5916\u952e\u6765\u5b9e\u73b0\uff0c\u8be5\u5916\u952e\u5f15\u7528\u53e6\u4e00\u4e2a\u8868\u7684\u4e3b\u952e\u3002<\/p>\n<ul>\n<li><strong>\u6570\u636e\u5e93\u5916\u952e\uff1a<\/strong> \u60a8\u5fc5\u987b\u6dfb\u52a0\u4e00\u4e2a <code>\u5916\u952e<\/code>\u7ea6\u675f\u4ee5\u786e\u4fdd\u5f15\u7528\u5b8c\u6574\u6027\u3002\u8fd9\u53ef\u4ee5\u9632\u6b62\u51fa\u73b0\u5b64\u7acb\u8bb0\u5f55\u3002<\/li>\n<li><strong>\u552f\u4e00\u6027\u7ea6\u675f\uff1a<\/strong> \u4e3a\u4e86\u4e25\u683c\u5f3a\u5236\u201c\u4e00\u201d\u7aef\uff0c\u5305\u542b\u5916\u952e\u7684\u5217\u5fc5\u987b\u5177\u6709\u4e00\u4e2a <code>\u552f\u4e00<\/code>\u7ea6\u675f\u3002\u8fd9\u786e\u4fdd\u6ca1\u6709\u4e24\u884c\u53ef\u4ee5\u6307\u5411\u540c\u4e00\u4e2a\u7236\u7ea7\u3002<\/li>\n<li><strong>\u4ee3\u7801\u5f15\u7528\uff1a<\/strong> \u5728\u9762\u5411\u5bf9\u8c61\u7684\u4ee3\u7801\u4e2d\uff0c\u8fd9\u901a\u5e38\u8868\u73b0\u4e3a\u5bf9\u5355\u4e2a\u5bf9\u8c61\u7684\u76f4\u63a5\u5f15\u7528\uff0c\u800c\u4e0d\u662f\u96c6\u5408\u3002\u4e00\u4e2a <code>User<\/code> \u7c7b\u53ef\u80fd\u6709\u4e00\u4e2a\u540d\u4e3a <code>Profile<\/code> \u7684\u5c5e\u6027\uff0c\u5176\u7c7b\u578b\u4e3a <code>Profile<\/code>\uff0c\u800c\u4e0d\u662f <code>List&lt;Profile&gt;<\/code>.<\/li>\n<\/ul>\n<h2>\u4e00\u5bf9\u591a\u5173\u7cfb\uff081:N\uff09\ud83c\udf33<\/h2>\n<p>\u4e00\u5bf9\u591a\u5173\u7cfb\u662f\u4f01\u4e1a\u7cfb\u7edf\u4e2d\u6700\u5e38\u89c1\u7684\u5173\u8054\u3002\u5728\u8fd9\u91cc\uff0cClass A \u7684\u4e00\u4e2a\u5b9e\u4f8b\u4e0e\u96f6\u4e2a\u6216\u591a\u4e2a Class B \u7684\u5b9e\u4f8b\u76f8\u5173\u8054\u3002\u7136\u800c\uff0c\u6bcf\u4e2a Class B \u7684\u5b9e\u4f8b\u90fd\u6070\u597d\u4e0e\u4e00\u4e2a Class A \u7684\u5b9e\u4f8b\u76f8\u5173\u8054\u3002\u8868\u793a\u6cd5\u901a\u5e38\u5728\u4e00\u7aef\u663e\u793a <code>1<\/code>\uff0c\u5728\u53e6\u4e00\u7aef\u663e\u793a <code>*<\/code>\uff08\u6216 <code>0..*<\/code>\uff09<\/p>\n<h3>\u5e38\u89c1\u573a\u666f<\/h3>\n<p>\u6b64\u6a21\u5f0f\u63cf\u8ff0\u4e86\u5c42\u7ea7\u6570\u636e\uff0c\u5176\u4e2d\u7236\u7ea7\u62e5\u6709\u591a\u4e2a\u5b50\u7ea7\u3002<\/p>\n<ul>\n<li><strong>\u8ba2\u5355\u548c\u660e\u7ec6\u9879\uff1a<\/strong>\u4e00\u4e2a\u8ba2\u5355\u5305\u542b\u591a\u4e2a\u660e\u7ec6\u9879\uff0c\u4f46\u6bcf\u4e2a\u660e\u7ec6\u9879\u4ec5\u5c5e\u4e8e\u4e00\u4e2a\u8ba2\u5355\u3002<\/li>\n<li><strong>\u90e8\u95e8\u548c\u5458\u5de5\uff1a<\/strong>\u4e00\u4e2a\u90e8\u95e8\u96c7\u4f63\u591a\u540d\u5458\u5de5\uff0c\u4f46\u4e00\u540d\u5458\u5de5\u4ec5\u88ab\u5206\u914d\u5230\u4e00\u4e2a\u90e8\u95e8\uff08\u5728\u7b80\u5355\u7ed3\u6784\u4e2d\uff09\u3002<\/li>\n<li><strong>\u7c7b\u522b\u548c\u4ea7\u54c1\uff1a<\/strong>\u4e00\u4e2a\u4ea7\u54c1\u7c7b\u522b\u5305\u542b\u591a\u4e2a\u4ea7\u54c1\uff0c\u4f46\u4e00\u4e2a\u4ea7\u54c1\u4ec5\u5c5e\u4e8e\u4e00\u4e2a\u7279\u5b9a\u7c7b\u522b\u3002<\/li>\n<\/ul>\n<h3>\u6570\u636e\u7ed3\u6784\u5316<\/h3>\n<p>\u5728\u5173\u7cfb\u578b\u6570\u636e\u5e93\u4e2d\u5b9e\u73b01:N\u5173\u7cfb\u5f88\u7b80\u5355\uff0c\u4f46\u5728\u5185\u5b58\u6a21\u578b\u4e2d\u9700\u8981\u7279\u6b8a\u5904\u7406\u3002<\/p>\n<ul>\n<li><strong>\u5916\u952e\u4f4d\u7f6e\uff1a<\/strong> \u5916\u952e\u4f4d\u4e8e\u201c\u591a\u201d\u65b9\uff08\u5b50\u8868\uff09\u4e2d\u3002\u8ba2\u5355\u8868\u5c06\u6709\u4e00\u4e2a<code>order_id<\/code>\u5217\uff0c\u7528\u4e8e\u94fe\u63a5\u5230\u660e\u7ec6\u9879\u8868\u3002<\/li>\n<li><strong>\u96c6\u5408\u7ba1\u7406\uff1a<\/strong> \u5728\u201c\u4e00\u201d\u65b9\uff08\u7236\u5bf9\u8c61\uff09\u4e2d\uff0c\u901a\u5e38\u7ef4\u62a4\u4e00\u4e2a\u96c6\u5408\u3002\u4e00\u4e2a<code>Customer<\/code>\u5bf9\u8c61\u5c06\u5305\u542b\u4e00\u4e2a\u8ba2\u5355\u5bf9\u8c61\u7684\u5217\u8868\u6216\u6570\u7ec4\u3002<code>Order<\/code>\u5bf9\u8c61\u3002<\/li>\n<li><strong>\u6027\u80fd\u5f71\u54cd\uff1a<\/strong>\u5982\u679c\u96c6\u5408\u5f88\u5927\uff0c\u83b7\u53d6\u201c\u591a\u201d\u65b9\u7684\u6570\u636e\u53ef\u80fd\u4f1a\u53d8\u5f97\u6602\u8d35\u3002\u901a\u5e38\u91c7\u7528\u5ef6\u8fdf\u52a0\u8f7d\uff0c\u5728\u8bbf\u95ee\u65f6\u624d\u83b7\u53d6\u5b50\u5bf9\u8c61\uff0c\u4ece\u800c\u51cf\u5c11\u521d\u59cb\u67e5\u8be2\u5f00\u9500\u3002<\/li>\n<\/ul>\n<h3>\u5904\u7406\u7ea7\u8054\u5220\u9664<\/h3>\n<p>\u57281:N\u8bbe\u8ba1\u4e2d\uff0c\u4e00\u4e2a\u5173\u952e\u51b3\u7b56\u662f\u5f53\u7236\u7ea7\u88ab\u5220\u9664\u65f6\u4f1a\u53d1\u751f\u4ec0\u4e48\u3002\u5982\u679c\u4f60\u5220\u9664\u4e00\u4e2a\u90e8\u95e8\uff0c\u662f\u5426\u4e5f\u8981\u5220\u9664\u6240\u6709\u5458\u5de5\uff1f\u901a\u5e38\u7b54\u6848\u662f\u5426\u5b9a\u7684\uff0c\u4f46\u7cfb\u7edf\u5fc5\u987b\u59a5\u5584\u5904\u7406\u3002<\/p>\n<ul>\n<li><strong>\u7ea7\u8054\u5220\u9664\uff1a<\/strong>\u5f53\u7236\u7ea7\u88ab\u5220\u9664\u65f6\uff0c\u81ea\u52a8\u5220\u9664\u6240\u6709\u5b50\u8bb0\u5f55\u3002\u9002\u7528\u4e8e\u4e34\u65f6\u6570\u636e\uff0c\u5982\u8ba2\u5355\u65e5\u5fd7\u3002<\/li>\n<li><strong>\u9650\u5236\u5220\u9664\uff1a<\/strong>\u5982\u679c\u5b58\u5728\u5b50\u8bb0\u5f55\uff0c\u5219\u7981\u6b62\u5220\u9664\u7236\u8bb0\u5f55\u3002\u9002\u7528\u4e8e\u6838\u5fc3\u6570\u636e\uff0c\u5982\u4ea7\u54c1\u3002<\/li>\n<li><strong>\u7f6e\u4e3a\u7a7a\uff1a<\/strong>\u5c06\u5b50\u8bb0\u5f55\u4e2d\u7684\u5916\u952e\u8bbe\u7f6e\u4e3anull\u3002\u8981\u6c42\u5b50\u8bb0\u5f55\u5141\u8bb8null\u503c\u3002<\/li>\n<\/ul>\n<h2>\u591a\u5bf9\u591a\u5173\u7cfb (N:N) \ud83d\udd78\ufe0f<\/h2>\n<p>\u591a\u5bf9\u591a\u5173\u7cfb\u662f\u4e09\u79cd\u5173\u7cfb\u4e2d\u6700\u590d\u6742\u7684\u3002\u5f53\u7c7bA\u7684\u5b9e\u4f8b\u53ef\u4ee5\u4e0e\u7c7bB\u7684\u591a\u4e2a\u5b9e\u4f8b\u76f8\u5173\u8054\uff0c\u4e14\u7c7bB\u7684\u5b9e\u4f8b\u4e5f\u53ef\u4ee5\u4e0e\u7c7bA\u7684\u591a\u4e2a\u5b9e\u4f8b\u76f8\u5173\u8054\u65f6\uff0c\u5c31\u4f1a\u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5\u3002\u7b26\u53f7\u8868\u793a<code>*<\/code>\uff08\u6216<code>0..*<\/code>\uff09\u51fa\u73b0\u5728\u4e24\u7aef\u3002<\/p>\n<h3>\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684\u4f8b\u5b50<\/h3>\n<p>\u8fd9\u79cd\u5173\u7cfb\u5e38\u89c1\u4e8e\u6d89\u53ca\u6807\u7b7e\u3001\u89d2\u8272\u6216\u6ce8\u518c\u7684\u573a\u666f\u4e2d\u3002<\/p>\n<ul>\n<li><strong>\u5b66\u751f\u548c\u8bfe\u7a0b\uff1a<\/strong>\u4e00\u4e2a\u5b66\u751f\u53ef\u4ee5\u6ce8\u518c\u591a\u95e8\u8bfe\u7a0b\uff0c\u4e00\u95e8\u8bfe\u7a0b\u4e5f\u6709\u591a\u4e2a\u5b66\u751f\u3002<\/li>\n<li><strong>\u4f5c\u8005\u548c\u4e66\u7c4d\uff1a<\/strong>\u4e00\u4f4d\u4f5c\u8005\u64b0\u5199\u591a\u672c\u4e66\u7c4d\uff0c\u800c\u4e00\u672c\u4e66\u53ef\u4ee5\u6709\u591a\u4e2a\u4f5c\u8005\uff08\u5408\u8457\u8005\uff09\u3002<\/li>\n<li><strong>\u6280\u80fd\u548c\u5458\u5de5\uff1a<\/strong>\u4e00\u540d\u5458\u5de5\u62e5\u6709\u591a\u79cd\u6280\u80fd\uff0c\u800c\u4e00\u79cd\u6280\u80fd\u4e5f\u88ab\u591a\u540d\u5458\u5de5\u62e5\u6709\u3002<\/li>\n<\/ul>\n<h3>\u8fde\u63a5\u5b9e\u4f53\u89e3\u51b3\u65b9\u6848<\/h3>\n<p>\u5728\u5173\u7cfb\u578b\u6570\u636e\u5e93\u4e2d\u76f4\u63a5\u5b9e\u73b0N:N\u5173\u7cfb\u662f\u4e0d\u53ef\u80fd\u7684\u3002\u4e00\u4e2a\u5355\u4e00\u7684\u5916\u952e\u65e0\u6cd5\u5728\u4e0d\u4ea7\u751f\u6b67\u4e49\u7684\u60c5\u51b5\u4e0b\u53cc\u5411\u94fe\u63a5\u4e24\u4e2a\u8868\u3002\u89e3\u51b3\u65b9\u6848\u662f\u5f15\u5165\u4e00\u4e2a<strong>\u8fde\u63a5\u8868<\/strong>\uff08\u6216\u5173\u8054\u5b9e\u4f53\uff09\u3002<\/p>\n<p>\u8fd9\u4e2a\u4e2d\u95f4\u8868\u5c06N:N\u5173\u7cfb\u5206\u89e3\u4e3a\u4e24\u4e2a1:N\u5173\u7cfb\u3002<\/p>\n<ul>\n<li><strong>\u7ed3\u6784\uff1a<\/strong> \u8fde\u63a5\u8868\u5305\u542b\u4e24\u4e2a\u76f8\u5173\u8868\u7684\u4e3b\u952e\u4f5c\u4e3a\u5916\u952e\u3002<\/li>\n<li><strong>\u9644\u52a0\u6570\u636e\uff1a<\/strong> \u4e0e\u7b80\u5355\u7684\u94fe\u63a5\u4e0d\u540c\uff0c\u8fde\u63a5\u8868\u53ef\u4ee5\u62e5\u6709\u81ea\u5df1\u7684\u5c5e\u6027\u3002\u4f8b\u5982\uff0c\u5b66\u751f\u548c\u8bfe\u7a0b\u4e4b\u95f4\u7684\u5173\u8054\u53ef\u80fd\u9700\u8981\u4e00\u4e2a<code>\u6210\u7ee9<\/code>\u6216<code>\u6ce8\u518c\u65e5\u671f<\/code>.<\/li>\n<li><strong>\u590d\u5408\u952e\uff1a<\/strong> \u8fde\u63a5\u8868\u7684\u4e3b\u952e\u901a\u5e38\u662f\u7531\u4e24\u4e2a\u5916\u952e\u7ec4\u6210\u7684\u590d\u5408\u952e\uff0c\u4ee5\u786e\u4fdd\u914d\u5bf9\u7684\u552f\u4e00\u6027\u3002<\/li>\n<\/ul>\n<h3>\u9762\u5411\u5bf9\u8c61\u7684\u5b9e\u73b0<\/h3>\n<p>\u5728\u4ee3\u7801\u4e2d\uff0c\u7ba1\u7406N:N\u5173\u7cfb\u9700\u8981\u4fdd\u6301\u53cc\u5411\u4e00\u81f4\u6027\u3002\u5982\u679c\u4f60\u5c06\u4e00\u95e8\u8bfe\u7a0b\u6dfb\u52a0\u5230\u5b66\u751f\u4e2d\uff0c\u4f60\u4e5f\u5fc5\u987b\u5c06\u8be5\u5b66\u751f\u6dfb\u52a0\u5230\u8fd9\u95e8\u8bfe\u7a0b\u4e2d\u3002<\/p>\n<ul>\n<li><strong>\u540c\u6b65\uff1a<\/strong>\u5e94\u521b\u5efa\u8f85\u52a9\u65b9\u6cd5\u6765\u7ba1\u7406\u8fd9\u4e9b\u94fe\u63a5\u3002\u4e00\u4e2a<code>Student.addCourse(\u8bfe\u7a0b c)<\/code>\u65b9\u6cd5\u5e94\u81ea\u52a8\u5c06\u5b66\u751f\u6dfb\u52a0\u5230\u8bfe\u7a0b\u7684\u5217\u8868\u4e2d\u3002<\/li>\n<li><strong>\u5185\u5b58\u4f7f\u7528\uff1a<\/strong> \u7531\u4e8e\u6570\u636e\u5728\u4e24\u4e2a\u96c6\u5408\uff08\u5b66\u751f\u5217\u8868\u548c\u8bfe\u7a0b\u5217\u8868\uff09\u4e2d\u91cd\u590d\uff0c\u5185\u5b58\u4f7f\u7528\u91cf\u589e\u52a0\u3002\u5982\u679c\u5220\u9664\u4e86\u94fe\u63a5\uff0c\u8bf7\u786e\u4fdd\u5783\u573e\u56de\u6536\u80fd\u5904\u7406\u5b64\u7acb\u7684\u5f15\u7528\u3002<\/li>\n<\/ul>\n<h2>\u57fa\u6570\u4e0e\u53ef\u9009\u6027\uff1a\u4e00\u4e2a\u5173\u952e\u533a\u522b \u2696\ufe0f<\/h2>\n<p>\u5728\u8ba8\u8bba\u591a\u91cd\u6027\u65f6\uff0c\u5fc5\u987b\u533a\u5206\u6570\u91cf\u591a\u5c11\u548c\u662f\u5426\u5fc5\u9700\u3002\u8fd9\u4e24\u8005\u5e38\u88ab\u6df7\u6dc6\uff0c\u4f46\u4ee3\u8868\u4e0d\u540c\u7684\u89c4\u5219\u3002<\/p>\n<ul>\n<li><strong>\u6700\u5c0f\u57fa\u6570\uff1a<\/strong> \u6240\u9700\u7684\u6700\u5c11\u5b9e\u4f8b\u6570\u91cf\u3002\u901a\u5e38\u4e3a0\u62161\u3002<\/li>\n<li><strong>\u6700\u5927\u57fa\u6570\uff1a<\/strong> \u5141\u8bb8\u7684\u6700\u5927\u5b9e\u4f8b\u6570\u91cf\u3002\u901a\u5e38\u4e3a1\u6216\u591a\u4e2a\uff08*\uff09\u3002<\/li>\n<li><strong>\u96f6\u4e2a\u6216\u4e00\u4e2a\uff080..1\uff09\uff1a<\/strong> \u8be5\u5173\u7cfb\u662f\u53ef\u9009\u7684\u3002\u8be5\u5b9e\u4f8b\u53ef\u80fd\u5b58\u5728\uff0c\u4e5f\u53ef\u80fd\u4e0d\u5b58\u5728\u3002<\/li>\n<li><strong>\u4e00\u4e2a\u6216\u591a\u4e2a\uff081..*\uff09\uff1a<\/strong> \u8be5\u5173\u7cfb\u662f\u5f3a\u5236\u7684\u3002\u8be5\u5b9e\u4f8b\u5fc5\u987b\u5b58\u5728\uff0c\u5e76\u4e14\u53ef\u4ee5\u6709\u591a\u4e2a\u3002<\/li>\n<\/ul>\n<p>\u8003\u8651\u4e00\u4e2a<code>\u5458\u5de5<\/code> \u548c <code>\u7ecf\u7406<\/code> \u7684\u5173\u7cfb\u3002\u4e00\u540d\u5458\u5de5\u5fc5\u987b\u6709\u4e00\u4f4d\u7ecf\u7406\uff081..1\uff09\uff0c\u4f46\u4e00\u4f4d\u7ecf\u7406\u5728\u7279\u5b9a\u65f6\u523b\u53ef\u80fd\u4e0d\u7ba1\u7406\u4efb\u4f55\u4eba\uff080..*\uff09\u3002\u7406\u89e3\u8fd9\u4e9b\u7ec6\u5fae\u5dee\u522b\u6709\u52a9\u4e8e\u5b9e\u73b0\u7cbe\u786e\u7684\u6570\u636e\u5e93\u7ea6\u675f\u548c\u9a8c\u8bc1\u903b\u8f91\u3002<\/p>\n<h2>\u5c06\u8bbe\u8ba1\u8f6c\u5316\u4e3a\u5b9e\u73b0 \ud83d\udee0\ufe0f<\/h2>\n<p>\u4e00\u65e6\u7c7b\u56fe\u786e\u5b9a\uff0c\u8f6c\u5411\u5b9e\u9645\u4ee3\u7801\u548c\u5b58\u50a8\u5c31\u9700\u8981\u9488\u5bf9\u6bcf\u79cd\u5173\u7cfb\u7c7b\u578b\u5236\u5b9a\u7279\u5b9a\u7b56\u7565\u3002<\/p>\n<h3>\u6570\u636e\u5e93\u6a21\u5f0f\u8bbe\u8ba1<\/h3>\n<p>\u7269\u7406\u6a21\u5f0f\u662f\u7cfb\u7edf\u4e2d\u6700\u50f5\u5316\u7684\u4e00\u90e8\u5206\u3002\u8fd9\u91cc\u7684\u66f4\u6539\u6210\u672c\u5f88\u9ad8\u3002<\/p>\n<ul>\n<li><strong>\u89c4\u8303\u5316\uff1a<\/strong> \u786e\u4fdd\u4f60\u7684\u8bbe\u8ba1\u9075\u5faa\u89c4\u8303\u5316\u89c4\u5219\uff08\u901a\u5e38\u52303NF\u4e3a\u6b62\uff09\u3002\u5197\u4f59\u6570\u636e\u901a\u5e38\u6e90\u4e8e\u5bf9\u5173\u7cfb\u7684\u8bef\u89e3\u3002<\/li>\n<li><strong>\u7d22\u5f15\uff1a<\/strong> \u5916\u952e\u5217\u5e94\u5efa\u7acb\u7d22\u5f15\u3002\u8fd9\u80fd\u663e\u8457\u52a0\u5feb\u8fde\u63a5\u64cd\u4f5c\u548c\u7ea6\u675f\u68c0\u67e5\u3002<\/li>\n<li><strong>\u6570\u636e\u7c7b\u578b\uff1a<\/strong> \u786e\u4fdd\u4e3b\u952e\u7684\u6570\u636e\u7c7b\u578b\u4e0e\u5916\u952e\u5b8c\u5168\u5339\u914d\u3002\u7c7b\u578b\u4e0d\u5339\u914d\u4f1a\u5bfc\u81f4\u8fd0\u884c\u65f6\u9519\u8bef\u3002<\/li>\n<\/ul>\n<h3>\u5e94\u7528\u5c42\u903b\u8f91<\/h3>\n<p>\u4ee3\u7801\u5c42\u662f\u4e1a\u52a1\u89c4\u5219\u5f3a\u5236\u5b9e\u65bd\u5173\u7cfb\u7684\u5730\u65b9\u3002<\/p>\n<ul>\n<li><strong>\u9a8c\u8bc1\uff1a<\/strong> \u5728\u4fdd\u5b58\u5bf9\u8c61\u4e4b\u524d\uff0c\u9a8c\u8bc1\u5173\u7cfb\u7ea6\u675f\u662f\u5426\u6ee1\u8db3\u3002\u4f8b\u5982\uff0c\u4e0d\u5141\u8bb8\u5b66\u751f\u6ce8\u518c\u5df2\u6ee1\u7684\u8bfe\u7a0b\u3002<\/li>\n<li><strong>\u4e8b\u52a1\u7ba1\u7406\uff1a<\/strong> \u5728\u521b\u5efa\u6216\u66f4\u65b0\u76f8\u5173\u5bf9\u8c61\u65f6\uff0c\u5c06\u64cd\u4f5c\u5305\u88f9\u5728\u4e8b\u52a1\u4e2d\u3002\u8fd9\u786e\u4fdd\u5982\u679c\u5173\u7cfb\u7684\u67d0\u4e00\u90e8\u5206\u5931\u8d25\uff0c\u6574\u4e2a\u66f4\u6539\u90fd\u4f1a\u56de\u6eda\u3002<\/li>\n<li><strong>API \u54cd\u5e94\uff1a<\/strong> \u901a\u8fc7 API \u66b4\u9732\u6570\u636e\u65f6\uff0c\u51b3\u5b9a\u76f8\u5173\u5bf9\u8c61\u5d4c\u5957\u7684\u6df1\u5ea6\u3002\u5728\u5355\u4e2a\u54cd\u5e94\u4e2d\u8fd4\u56de\u5305\u542b\u6240\u6709\u8ba2\u5355\u7684\u5b8c\u6574\u5ba2\u6237\u5bf9\u8c61\u53ef\u80fd\u5bfc\u81f4\u6027\u80fd\u74f6\u9888\u3002<\/li>\n<\/ul>\n<h2>\u5e38\u89c1\u9677\u9631\u4e0e\u53cd\u6a21\u5f0f \ud83d\udeab<\/h2>\n<p>\u5373\u4f7f\u7ecf\u9a8c\u4e30\u5bcc\u7684\u8bbe\u8ba1\u5e08\u5728\u5b9a\u4e49\u591a\u91cd\u6027\u65f6\u4e5f\u4f1a\u72af\u9519\u3002\u53ca\u65e9\u8bc6\u522b\u8fd9\u4e9b\u6a21\u5f0f\u53ef\u4ee5\u8282\u7701\u5927\u91cf\u540e\u671f\u91cd\u6784\u65f6\u95f4\u3002<\/p>\n<ul>\n<li><strong>\u5047\u8bbe N:N \u603b\u662f\u5fc5\u8981\u7684\uff1a<\/strong> \u5982\u679c\u4e24\u4e2a\u5b9e\u4f53\u770b\u4f3c\u6709\u5173\u8054\uff0c\u9700\u68c0\u67e5\u5b83\u4eec\u662f\u5426\u771f\u7684\u9700\u8981\u76f4\u63a5\u8fde\u63a5\u3002\u5982\u679c\u5173\u7cfb\u5177\u6709\u65b9\u5411\u6027\uff0c\u901a\u5e38 1:N \u5df2\u7ecf\u8db3\u591f\u3002<\/li>\n<li><strong>\u5ffd\u7565\u53ef\u9009\u6027\uff1a<\/strong> \u5f53\u5173\u7cfb\u5b9e\u9645\u4e0a\u662f\u53ef\u9009\u7684\uff080..1\uff09\u65f6\uff0c\u5374\u8bbe\u8ba1\u4e3a\u5f3a\u5236\u94fe\u63a5\uff081..1\uff09\uff0c\u4f1a\u5bfc\u81f4\u6570\u636e\u5f55\u5165\u9519\u8bef\u548c\u7cfb\u7edf\u50f5\u5316\u3002<\/li>\n<li><strong>\u5faa\u73af\u4f9d\u8d56\uff1a<\/strong> \u5f53\u7c7b A \u5f15\u7528\u7c7b B\uff0c\u800c\u7c7b B \u53c8\u5f15\u7528\u7c7b A \u65f6\uff0c\u5e8f\u5217\u5316\u548c\u5185\u5b58\u7ba1\u7406\u53ef\u80fd\u53d8\u5f97\u590d\u6742\u3002\u5728\u904d\u5386\u7b97\u6cd5\u4e2d\u4f7f\u7528\u6df1\u5c42\u9012\u5f52\u65f6\u9700\u8c28\u614e\u3002<\/li>\n<li><strong>\u8fc7\u5ea6\u8bbe\u8ba1\u7684\u8fde\u63a5\u8868\uff1a<\/strong> \u5982\u679c\u5173\u7cfb\u7b80\u5355\u4e14\u4e0d\u9700\u8981\u81ea\u8eab\u5c5e\u6027\uff0c\u5c31\u4e0d\u5e94\u521b\u5efa\u8fde\u63a5\u8868\u3002\u6709\u65f6\uff0c\u4e00\u4e2a\u5916\u952e\u5c31\u8db3\u591f\u4e86\u3002<\/li>\n<\/ul>\n<h2>\u5173\u7cfb\u7c7b\u578b\u5bf9\u6bd4 \ud83d\udcca<\/h2>\n<p>\u4e3a\u603b\u7ed3\u5dee\u5f02\u548c\u6743\u8861\uff0c\u53ef\u53c2\u8003\u8fd9\u4e09\u79cd\u4e3b\u8981\u57fa\u6570\u7684\u6982\u8ff0\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u7279\u6027<\/th>\n<th>\u4e00\u5bf9\u4e00\uff081:1\uff09<\/th>\n<th>\u4e00\u5bf9\u591a\uff081:N\uff09<\/th>\n<th>\u591a\u5bf9\u591a\uff08N:N\uff09<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>\u8868\u793a\u6cd5<\/strong><\/td>\n<td>1 \u2014 1<\/td>\n<td>1 \u2014 *<\/td>\n<td>* \u2014 *<\/td>\n<\/tr>\n<tr>\n<td><strong>\u6570\u636e\u5e93\u5b9e\u73b0<\/strong><\/td>\n<td>\u5e26\u552f\u4e00\u7ea6\u675f\u7684\u5916\u952e<\/td>\n<td>\u5b50\u8868\u4e2d\u7684\u5916\u952e<\/td>\n<td>\u8fde\u63a5\u8868\uff08\u5173\u8054\u5b9e\u4f53\uff09<\/td>\n<\/tr>\n<tr>\n<td><strong>\u4ee3\u7801\u7ed3\u6784<\/strong><\/td>\n<td>\u5355\u4e2a\u5bf9\u8c61\u5f15\u7528<\/td>\n<td>\u5bf9\u8c61\u96c6\u5408\/\u5217\u8868<\/td>\n<td>\u96c6\u5408\u7684\u96c6\u5408<\/td>\n<\/tr>\n<tr>\n<td><strong>\u67e5\u8be2\u590d\u6742\u5ea6<\/strong><\/td>\n<td>\u4f4e<\/td>\n<td>\u4e2d\u7b49<\/td>\n<td>\u9ad8\uff08\u9700\u8981\u8fde\u63a5\uff09<\/td>\n<\/tr>\n<tr>\n<td><strong>\u7075\u6d3b\u6027<\/strong><\/td>\n<td>\u4f4e\uff08\u4e25\u683c\uff09<\/td>\n<td>\u9ad8<\/td>\n<td>\u975e\u5e38\u9ad8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u6570\u636e\u5b8c\u6574\u6027\u6700\u7ec8\u8003\u91cf \u2705<\/h2>\n<p>\u8f6f\u4ef6\u7cfb\u7edf\u7684\u7a33\u5b9a\u6027\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u4f9d\u8d56\u4e8e\u5176\u5173\u7cfb\u7684\u6b63\u786e\u6027\u3002\u5728\u5b9a\u4e49\u591a\u91cd\u6027\u65f6\uff0c\u60a8\u5b9e\u9645\u4e0a\u662f\u5728\u4e3a\u6570\u636e\u8bbe\u5b9a\u4ea4\u4e92\u89c4\u5219\u3002\u4e00\u4e2a\u5b9a\u4e49\u6e05\u6670\u7684\u7c7b\u56fe\u5c31\u50cf\u4e00\u4efd\u84dd\u56fe\uff0c\u80fd\u591f\u4f7f\u6570\u636e\u5e93\u3001\u4ee3\u7801\u548c\u4e1a\u52a1\u903b\u8f91\u4fdd\u6301\u4e00\u81f4\u3002<\/p>\n<p>\u59cb\u7ec8\u9a8c\u8bc1\u60a8\u7684\u5047\u8bbe\u3002\u7ed8\u5236\u56fe\u8868\uff0c\u5b9e\u73b0\u4e00\u4e2a\u539f\u578b\uff0c\u5e76\u68c0\u67e5\u6570\u636e\u662f\u5426\u81ea\u7136\u6d41\u52a8\u3002\u5982\u679c\u60a8\u53d1\u73b0\u81ea\u5df1\u4e0d\u65ad\u6dfb\u52a0\u53d8\u901a\u65b9\u6cd5\uff0c\u4ee5\u5c06\u6570\u636e\u585e\u5165\u770b\u4f3c N:N \u7684 1:N \u7ed3\u6784\u4e2d\uff0c\u90a3\u4e48\u662f\u65f6\u5019\u91cd\u65b0\u5ba1\u89c6\u8bbe\u8ba1\u4e86\u3002<\/p>\n<p>\u901a\u8fc7\u9075\u5faa\u8fd9\u4e9b\u539f\u5219\uff0c\u60a8\u53ef\u4ee5\u786e\u4fdd\u7cfb\u7edf\u4fdd\u6301\u53ef\u6269\u5c55\u6027\u3001\u53ef\u7ef4\u62a4\u6027\u548c\u903b\u8f91\u4e00\u81f4\u6027\u3002\u5728\u6b63\u786e\u8bc6\u522b 1:1\u30011:N \u548c N:N \u5173\u7cfb\u4e0a\u6295\u5165\u7684\u52aa\u529b\uff0c\u5c06\u5728\u9879\u76ee\u751f\u547d\u5468\u671f\u5185\u5e26\u6765\u66f4\u5c11\u7684\u9519\u8bef\u548c\u66f4\u6e05\u6670\u7684\u4ee3\u7801\u7ed3\u6784\u56de\u62a5\u3002<\/p>\n<h3>\u5173\u952e\u8981\u70b9<\/h3>\n<ul>\n<li><strong>\u7b26\u53f7\u5f88\u91cd\u8981\uff1a<\/strong> \u4f7f\u7528\u6807\u51c6\u7b26\u53f7\uff081\u30010..1\u3001*\uff09\u4ee5\u6e05\u6670\u4f20\u8fbe\u610f\u56fe\u3002<\/li>\n<li><strong>\u6570\u636e\u5e93\u5bf9\u9f50\uff1a<\/strong> \u786e\u4fdd\u60a8\u7684\u6a21\u5f0f\u652f\u6301\u56fe\u8868\uff0c\u800c\u65e0\u9700\u5f3a\u884c\u4f7f\u7528\u522b\u626d\u7684\u53d8\u901a\u65b9\u6cd5\u3002<\/li>\n<li><strong>\u53ef\u9009\u6027\u662f\u5173\u952e\uff1a<\/strong> \u533a\u5206\u201c\u5fc5\u987b\u5b58\u5728\u201d\u548c\u201c\u53ef\u80fd\u4e0d\u5b58\u5728\u201d\uff0c\u4ee5\u907f\u514d\u8fc7\u4e8e\u50f5\u5316\u7684\u7ea6\u675f\u3002<\/li>\n<li><strong>\u7ba1\u7406\u590d\u6742\u6027\uff1a<\/strong> \u5bf9\u4e8e N:N \u5173\u7cfb\uff0c\u4f7f\u7528\u8fde\u63a5\u8868\u4ee5\u4fdd\u6301\u5f15\u7528\u5b8c\u6574\u6027\u3002<\/li>\n<li><strong>\u5c3d\u65e9\u9a8c\u8bc1\uff1a<\/strong> \u5728\u8bbe\u8ba1\u9636\u6bb5\u68c0\u67e5\u5173\u7cfb\uff0c\u4ee5\u9632\u6b62\u67b6\u6784\u503a\u52a1\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u8f6f\u4ef6\u67b6\u6784\u548c\u6570\u636e\u5efa\u6a21\u7684\u9886\u57df\u4e2d\uff0c\u5f88\u5c11\u6709\u6982\u5ff5\u80fd\u50cf\u5b9e\u4f53\u4e4b\u95f4\u7684\u5173\u7cfb\u90a3&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1121,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_title":"\u7c7b\u56fe\u591a\u91cd\u6027\u6307\u5357\uff1a1:1\u30011:N\u3001N:N \u89e3\u91ca","_yoast_wpseo_metadesc":"\u4e00\u4efd\u5168\u9762\u7684\u6307\u5357\uff0c\u5e2e\u52a9\u7406\u89e3\u7c7b\u56fe\u591a\u91cd\u6027\u3002\u5b66\u4e60\u5982\u4f55\u5728\u6570\u636e\u6a21\u578b\u548c\u8f6f\u4ef6\u8bbe\u8ba1\u4e2d\u5b9e\u73b01:1\u30011:N\u548cN:N\u5173\u7cfb\u3002","fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[13],"tags":[43,45],"class_list":["post-1120","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uml","tag-academic","tag-class-diagram"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u7c7b\u56fe\u591a\u91cd\u6027\u6307\u5357\uff1a1:1\u30011:N\u3001N:N \u89e3\u91ca<\/title>\n<meta name=\"description\" content=\"\u4e00\u4efd\u5168\u9762\u7684\u6307\u5357\uff0c\u5e2e\u52a9\u7406\u89e3\u7c7b\u56fe\u591a\u91cd\u6027\u3002\u5b66\u4e60\u5982\u4f55\u5728\u6570\u636e\u6a21\u578b\u548c\u8f6f\u4ef6\u8bbe\u8ba1\u4e2d\u5b9e\u73b01:1\u30011:N\u548cN:N\u5173\u7cfb\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7c7b\u56fe\u591a\u91cd\u6027\u6307\u5357\uff1a1:1\u30011:N\u3001N:N \u89e3\u91ca\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u4efd\u5168\u9762\u7684\u6307\u5357\uff0c\u5e2e\u52a9\u7406\u89e3\u7c7b\u56fe\u591a\u91cd\u6027\u3002\u5b66\u4e60\u5982\u4f55\u5728\u6570\u636e\u6a21\u578b\u548c\u8f6f\u4ef6\u8bbe\u8ba1\u4e2d\u5b9e\u73b01:1\u30011:N\u548cN:N\u5173\u7cfb\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Method Post Simplified Chinese | Your Daily Guide to AI &amp; Software Solutions\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-29T08:16:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2026\/03\/multiplicity-relationships-infographic-childs-drawing.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1664\" \/>\n\t<meta property=\"og:image:height\" content=\"928\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"vpadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"vpadmin\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/\"},\"author\":{\"name\":\"vpadmin\",\"@id\":\"https:\/\/www.method-post.com\/cn\/#\/schema\/person\/c45282b4509328baa27563996f83263e\"},\"headline\":\"\u89e3\u6790\u591a\u91cd\u6027\uff1a\u638c\u63e1 1:N\u30011:1 \u548c N:N \u5173\u7cfb\u7684\u7b80\u6613\u6307\u5357\",\"datePublished\":\"2026-03-29T08:16:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/\"},\"wordCount\":57,\"publisher\":{\"@id\":\"https:\/\/www.method-post.com\/cn\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2026\/03\/multiplicity-relationships-infographic-childs-drawing.jpg\",\"keywords\":[\"academic\",\"class diagram\"],\"articleSection\":[\"UML\"],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/\",\"url\":\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/\",\"name\":\"\u7c7b\u56fe\u591a\u91cd\u6027\u6307\u5357\uff1a1:1\u30011:N\u3001N:N \u89e3\u91ca\",\"isPartOf\":{\"@id\":\"https:\/\/www.method-post.com\/cn\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2026\/03\/multiplicity-relationships-infographic-childs-drawing.jpg\",\"datePublished\":\"2026-03-29T08:16:42+00:00\",\"description\":\"\u4e00\u4efd\u5168\u9762\u7684\u6307\u5357\uff0c\u5e2e\u52a9\u7406\u89e3\u7c7b\u56fe\u591a\u91cd\u6027\u3002\u5b66\u4e60\u5982\u4f55\u5728\u6570\u636e\u6a21\u578b\u548c\u8f6f\u4ef6\u8bbe\u8ba1\u4e2d\u5b9e\u73b01:1\u30011:N\u548cN:N\u5173\u7cfb\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#primaryimage\",\"url\":\"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2026\/03\/multiplicity-relationships-infographic-childs-drawing.jpg\",\"contentUrl\":\"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2026\/03\/multiplicity-relationships-infographic-childs-drawing.jpg\",\"width\":1664,\"height\":928},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.method-post.com\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u89e3\u6790\u591a\u91cd\u6027\uff1a\u638c\u63e1 1:N\u30011:1 \u548c N:N \u5173\u7cfb\u7684\u7b80\u6613\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.method-post.com\/cn\/#website\",\"url\":\"https:\/\/www.method-post.com\/cn\/\",\"name\":\"Method Post Simplified Chinese | Your Daily Guide to AI &amp; Software Solutions\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.method-post.com\/cn\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.method-post.com\/cn\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.method-post.com\/cn\/#organization\",\"name\":\"Method Post Simplified Chinese | Your Daily Guide to AI &amp; Software Solutions\",\"url\":\"https:\/\/www.method-post.com\/cn\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.method-post.com\/cn\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2025\/02\/logo-big.png\",\"contentUrl\":\"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2025\/02\/logo-big.png\",\"width\":117,\"height\":71,\"caption\":\"Method Post Simplified Chinese | Your Daily Guide to AI &amp; Software Solutions\"},\"image\":{\"@id\":\"https:\/\/www.method-post.com\/cn\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.method-post.com\/cn\/#\/schema\/person\/c45282b4509328baa27563996f83263e\",\"name\":\"vpadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.method-post.com\/cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/56e0eb902506d9cea7c7e209205383146b8e81c0ef2eff693d9d5e0276b3d7e3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/56e0eb902506d9cea7c7e209205383146b8e81c0ef2eff693d9d5e0276b3d7e3?s=96&d=mm&r=g\",\"caption\":\"vpadmin\"},\"sameAs\":[\"https:\/\/www.method-post.com\"],\"url\":\"https:\/\/www.method-post.com\/cn\/author\/vpadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u7c7b\u56fe\u591a\u91cd\u6027\u6307\u5357\uff1a1:1\u30011:N\u3001N:N \u89e3\u91ca","description":"\u4e00\u4efd\u5168\u9762\u7684\u6307\u5357\uff0c\u5e2e\u52a9\u7406\u89e3\u7c7b\u56fe\u591a\u91cd\u6027\u3002\u5b66\u4e60\u5982\u4f55\u5728\u6570\u636e\u6a21\u578b\u548c\u8f6f\u4ef6\u8bbe\u8ba1\u4e2d\u5b9e\u73b01:1\u30011:N\u548cN:N\u5173\u7cfb\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/","og_locale":"zh_CN","og_type":"article","og_title":"\u7c7b\u56fe\u591a\u91cd\u6027\u6307\u5357\uff1a1:1\u30011:N\u3001N:N \u89e3\u91ca","og_description":"\u4e00\u4efd\u5168\u9762\u7684\u6307\u5357\uff0c\u5e2e\u52a9\u7406\u89e3\u7c7b\u56fe\u591a\u91cd\u6027\u3002\u5b66\u4e60\u5982\u4f55\u5728\u6570\u636e\u6a21\u578b\u548c\u8f6f\u4ef6\u8bbe\u8ba1\u4e2d\u5b9e\u73b01:1\u30011:N\u548cN:N\u5173\u7cfb\u3002","og_url":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/","og_site_name":"Method Post Simplified Chinese | Your Daily Guide to AI &amp; Software Solutions","article_published_time":"2026-03-29T08:16:42+00:00","og_image":[{"width":1664,"height":928,"url":"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2026\/03\/multiplicity-relationships-infographic-childs-drawing.jpg","type":"image\/jpeg"}],"author":"vpadmin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"vpadmin"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#article","isPartOf":{"@id":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/"},"author":{"name":"vpadmin","@id":"https:\/\/www.method-post.com\/cn\/#\/schema\/person\/c45282b4509328baa27563996f83263e"},"headline":"\u89e3\u6790\u591a\u91cd\u6027\uff1a\u638c\u63e1 1:N\u30011:1 \u548c N:N \u5173\u7cfb\u7684\u7b80\u6613\u6307\u5357","datePublished":"2026-03-29T08:16:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/"},"wordCount":57,"publisher":{"@id":"https:\/\/www.method-post.com\/cn\/#organization"},"image":{"@id":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2026\/03\/multiplicity-relationships-infographic-childs-drawing.jpg","keywords":["academic","class diagram"],"articleSection":["UML"],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/","url":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/","name":"\u7c7b\u56fe\u591a\u91cd\u6027\u6307\u5357\uff1a1:1\u30011:N\u3001N:N \u89e3\u91ca","isPartOf":{"@id":"https:\/\/www.method-post.com\/cn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2026\/03\/multiplicity-relationships-infographic-childs-drawing.jpg","datePublished":"2026-03-29T08:16:42+00:00","description":"\u4e00\u4efd\u5168\u9762\u7684\u6307\u5357\uff0c\u5e2e\u52a9\u7406\u89e3\u7c7b\u56fe\u591a\u91cd\u6027\u3002\u5b66\u4e60\u5982\u4f55\u5728\u6570\u636e\u6a21\u578b\u548c\u8f6f\u4ef6\u8bbe\u8ba1\u4e2d\u5b9e\u73b01:1\u30011:N\u548cN:N\u5173\u7cfb\u3002","breadcrumb":{"@id":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#primaryimage","url":"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2026\/03\/multiplicity-relationships-infographic-childs-drawing.jpg","contentUrl":"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2026\/03\/multiplicity-relationships-infographic-childs-drawing.jpg","width":1664,"height":928},{"@type":"BreadcrumbList","@id":"https:\/\/www.method-post.com\/cn\/decoding-multiplicity-class-diagrams-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.method-post.com\/cn\/"},{"@type":"ListItem","position":2,"name":"\u89e3\u6790\u591a\u91cd\u6027\uff1a\u638c\u63e1 1:N\u30011:1 \u548c N:N \u5173\u7cfb\u7684\u7b80\u6613\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.method-post.com\/cn\/#website","url":"https:\/\/www.method-post.com\/cn\/","name":"Method Post Simplified Chinese | Your Daily Guide to AI &amp; Software Solutions","description":"","publisher":{"@id":"https:\/\/www.method-post.com\/cn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.method-post.com\/cn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/www.method-post.com\/cn\/#organization","name":"Method Post Simplified Chinese | Your Daily Guide to AI &amp; Software Solutions","url":"https:\/\/www.method-post.com\/cn\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.method-post.com\/cn\/#\/schema\/logo\/image\/","url":"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2025\/02\/logo-big.png","contentUrl":"https:\/\/www.method-post.com\/cn\/wp-content\/uploads\/sites\/2\/2025\/02\/logo-big.png","width":117,"height":71,"caption":"Method Post Simplified Chinese | Your Daily Guide to AI &amp; Software Solutions"},"image":{"@id":"https:\/\/www.method-post.com\/cn\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.method-post.com\/cn\/#\/schema\/person\/c45282b4509328baa27563996f83263e","name":"vpadmin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.method-post.com\/cn\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/56e0eb902506d9cea7c7e209205383146b8e81c0ef2eff693d9d5e0276b3d7e3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/56e0eb902506d9cea7c7e209205383146b8e81c0ef2eff693d9d5e0276b3d7e3?s=96&d=mm&r=g","caption":"vpadmin"},"sameAs":["https:\/\/www.method-post.com"],"url":"https:\/\/www.method-post.com\/cn\/author\/vpadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.method-post.com\/cn\/wp-json\/wp\/v2\/posts\/1120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.method-post.com\/cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.method-post.com\/cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.method-post.com\/cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.method-post.com\/cn\/wp-json\/wp\/v2\/comments?post=1120"}],"version-history":[{"count":0,"href":"https:\/\/www.method-post.com\/cn\/wp-json\/wp\/v2\/posts\/1120\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.method-post.com\/cn\/wp-json\/wp\/v2\/media\/1121"}],"wp:attachment":[{"href":"https:\/\/www.method-post.com\/cn\/wp-json\/wp\/v2\/media?parent=1120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.method-post.com\/cn\/wp-json\/wp\/v2\/categories?post=1120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.method-post.com\/cn\/wp-json\/wp\/v2\/tags?post=1120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}