visual-studio 如何在 VS 中可视化数据库表模式

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3327153/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 12:14:55  来源:igfitidea点击:

How to visualize database tables schema in VS

databasevisual-studioschema

提问by Rasto

How do I display that schema of tables in my database and foreign keys that links them in VS ?

如何在我的数据库中显示表的架构以及在 VS 中链接它们的外键?

Example of such schema is used in thisquestion mattlant's answer.

这个问题 mattlant 的答案中使用了这种模式的示例。

回答by gillyb

They can be done through Visual Studio or the Sql Server Management Studio.

它们可以通过 Visual Studio 或 Sql Server Management Studio 完成。

In visual studio just open the "Server Explorer" window, right-click on the Database Diagrams folder (under the db you want), and choose "Add Database Diagram", just drag-and-drop the tables you want onto the diagram.

在 Visual Studio 中,只需打开“服务器资源管理器”窗口,右键单击“数据库图表”文件夹(在您想要的数据库下),然后选择“添加数据库图表”,只需将您想要的表拖放到图表上。

Through Sql Server management studio there done the same way (just without the server explorer window).

通过 Sql Server management studio 有同样的方式(只是没有服务器资源管理器窗口)。