如何在 Visual Studio (express) 中生成数据库架构图?
现在我所做的就是使用数据集设计器并将表从数据库资源管理器拖入其中。 它有效(无论如何我都需要),但感觉像是对数据集的滥用。 (实际上我不太确定如何使用数据集或预期用途是什么,我计划使用 LINQ2SQL 与数据库交互)
这样可以吗? 我只需要它用于设计器视图,并且它是一个非常简单的数据库布局(只有 4 个表)。 我确信还有其他工具,但是有什么东西集成到 VS Express 中是我应该使用的吗?
Right now all I did was use the Dataset designer and dragged tables into it from the Database Explorer. It works (for what I need anyway) but it feels like it's a misuse of Datasets. (Actually I'm not really sure how to use Datasets or what the intended usage is, I was planning on using LINQ2SQL to interact with the DB)
Is this ok? I only need it for the designer view and it's a very simple DB layout (just 4 tables). I'm sure there's other tools out there, but is there anything integrated into VS Express that I should be using instead?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 SQL Studio Management Studio Express 下载 MS SQL Express。 只有在 Studio Express 中才能连接到服务器、选择数据库、打开数据库图表和编辑图表。
然后,您可以将整组表拖放到 Linq to SQL 中。 实体框架很好,但我还没有让它很好地渲染我的表格。 我会坚持使用 Linq to SQL,直到他们发布对 EF 的另一个升级(对您来说更容易)。
You download MS SQL Express with the SQL Studio Management Studio Express. Only in the Studio Express can you connect to the server, select the database, open the database diagrams and edit diagrams.
Then, you can drag and drop the entire set of Tables in to Linq to SQL. Entity Framework is nice, but I have yet to get it to render my tables well yet. I would stick to Linq to SQL until they release another upgrade to EF (easier for you).
你说它有效,而你只想制作一个图表,所以就去做吧。 但是,您应该确保它不会构建生成的代码文件,因为它可能会导致最终产品膨胀。
如果您不打算将它用于代码并且它为您提供了足够的输出,那么如果它是“误用”又有什么关系呢? 我认识一些使用 Excel 设计文档的人,因为这样更容易排列内容。 我会使用 Word,这显然不是 Excel 所声明的主要用途,但这是否意味着使用 Excel 是错误的?
You say it works, and you want just want to make a diagram, so go with it. You should make sure it doesn't build the generated code file, however, as it could cause bloat in your final product.
If you're not going to use it for code and it provides adequate output for you, what does it matter if it's a "misuse"? I know people who used Excel to design documents because it was easier to line things up that way. I would use Word, and it's clearly not Excel's stated main purpose, but does it mean using Excel was wrong?