Visio 2003:连接数据库 ER 图中的 2 个表的关系箭头

发布于 2024-08-10 13:07:23 字数 157 浏览 8 评论 0原文

我正在尝试对两个表 Orders 和 OrderDetails 之间的关系进行建模。我使用外键 OrderID 从 OrderDetails 绘制“关系”箭头到 Orders 表。但在关系箭头的 DatabaseProperties 中,我得到未知的父级和未知的子级。如何使用关系箭头正确连接两个表。

I am trying to model relationship between 2 tables Orders and OrderDetails. I draw "relationship" arrow from OrderDetails to Orders table with Foreign key OrderID. But in DatabaseProperties for relationship arrow, I get unknown parent and unknown child. How do I connect the 2 tables with relationship arrow properly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

独闯女儿国 2024-08-17 13:07:23
  1. 确保您从实体关系模具中选取关系箭头。
  2. 将连接器(箭头)放在表面上。
  3. 选择箭头的顶部并将其拖动到 Orders 表的中间
  4. 选择另一端并将其拖动到 OrderDetails 表的中间。

您还可以在“箭头定义选项卡”中选择要连接的字段。
无需提前指定外键,一旦与箭头连接,它就会自动添加。

  1. Make sure you are picking the relationship arrow from the Entity Relationship stencil.
  2. Drop the connector (arrow) on the surface.
  3. Pick the top of the arrow and drag into middle of the Orders table
  4. Pick the other end and drag into middle of the OrderDetails table.

You can also select fields to connect in "Arrow definition tab".
No need to specify foreign key in advance, it will auto-add once you make connection with the arrow.

撩人痒 2024-08-17 13:07:23

我也遇到了同样的问题,但我只需将关系箭头拖放到我想要建立关系的表即可解决。只需等待红色轮廓出现即可将关系箭头拖放到表格中。然后,将端点拖动到另一个表,观察相同的步骤。您还可以在“其他”类别下更改关系类型和基数。

I had the same problem too, but I managed to solve it by just dragging and dropping the relationship arrow to the tables where I want to have relationship. Just wait for the red outline before you'll gonna drop the relationship arrow to the table. And then, drag the end point to another table observing the same steps. You can also change the relationship type and cardinality under the "Miscellaneous" category.

风透绣罗衣 2024-08-17 13:07:23

我为此挣扎了一会儿,终于弄清楚我做错了什么。

  • 基本上,在您从实体关系模具中选择关系箭头之后。您将光标移至父表。
  • 稍稍延迟后,表格的边框将变为粗体红色。
  • 然后按住鼠标左键将其拖动到要与之创建关系的子表。
  • 现在,这里是我们犯错误的地方,你必须按住鼠标按钮,不要松开按钮,直到子表框边框变成红色。我犯的错误只是因为我不够耐心。延迟时间只比我的病人长一点点。如果再等一两秒,边框就会变成红色。然后你就可以安全地松开鼠标左键了。

再说一次,关键是只有在子表边框变成红色之后才让鼠标按钮离开!

I struggled a bit with this and finally figure out what I did wrong.

  • Basically, after you picking the relationship arrow from the Entity Relationship stencil. You move your cursor to the parent table.
  • After a slight delay, the border box of the table will change into bolded red.
  • Then you Drag it by holding the left mouse key to the child table you want to create relationship with.
  • Now, here is where we make the mistake, you have to HOLD the mouse button, DO NOT let the button go until the child table box border turn into red. The mistake I made simply was because I was not patient enough. The delay was just a tad longer than my patient. If you wait a second or two longer the border will turn into RED. Then you are safe to let the left mouse button go.

Again, the key is to let the mouse button go only after the child table border turn into red!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文