SQL Server Management Studio 2008:保存数据库图表而不应用表
您可以为数据库创建数据库图表并保存它而不创建实际的表吗?你知道吗,所以老板可以在你申请之前检查一下吗?
Can you create a database diagram for a database and save it without creating the actual tables? You know, so the boss can check it out before you apply it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不。数据库图的命名有些令人困惑,因为它基本上是一个表设计器,而不仅仅是数据库的图形表示。
保存图表将保留对底层数据库对象的所有更改。
No. The database diagram is somewhat confusingly named in that it is basically a table designer not just a pictorial representation of the database.
Saving the diagram will persist all changes to the underlying database objects.
如果您正在设置键/关系,则不是。当您在图中建立这些连接时,SSMS 也会建立键/约束。
如果您的老板想在进行更改之前查看图表,我建议您使用 Visio 或其他可视化工具。您可以提供相同的信息(尽管需要付出一些额外的努力),并且它不会干扰数据库本身。此外,您还会有一个与数据库断开连接的“数据库图”,因此,如果您想进行未来的更改,您可以不受惩罚地移动事物,直到您按照您想要的方式获得连接/关系。
Not if you're setting keys/relationships. When you make those connections in the diagram, SSMS establishes the keys/constraints as well.
If your boss wants to look at a diagram before you make the changes, I would suggest Visio or some other visualization tool. You can provide the same information (albiet with a little extra effort) and it doesn't mess with the DB itself. Addtionally, you'd then have a "database diagram" which was disconnected from the DB, so if you wanted to make future changes, you could move things around with impunity until you got your connections/relationships just the way you want them.
不,但是你为什么不打印出来并向你的老板展示呢?
理想情况下,你有一个数据库的开发版本,你可以在其中进行更改,这不会影响任何事情
No, but why don't you print it out and show it to your boss like that
ideally you have a dev version of the database where you make changes and this won't impact anything
您可以使用 SQL Dependency Tracker 之类的工具来可视化您的数据库,或者如果您不想将它们应用到原始实例,则可以只复制数据库架构并将 SSMS 中的数据库图保存在副本上。
You could use a tool like SQL Dependency Tracker to visualise your database, or you could just make a copy of your database schema and save your databse diagram in SSMS on the copy if you don't want to apply them to the original instance.