VS2010数据库项目有表设计器吗?
我在这里错过了什么吗?似乎在VS2010中的数据库项目中创建新表的唯一选择是:
将表对象创建为文件,然后将所有约束(默认值)创建为单独的文件,然后将每个索引创建为单独的文件,并创建主键作为一个单独的文件,等等...
或者
使用 SSMS 中的表设计器创建整个表模式,然后使用模式比较工具为表的每个元素创建一个 SQL 语句的整体文件,并复制每个块将代码复制到VS中新建的文件中。
这个问题是两年前提出的,我希望答案有所改变。 请告诉我 VS2010 中的数据库项目有一个隐藏的表设计器,我刚刚忽略了。
Am I missing something here? It seems that the only options to create a new table in a database project in VS2010 is:
Create a table object as a file, then create all constraints (defaults) as separate files, then create each index as a separate file, and primary key as a separate file and on and on...
Or
Create the entire table schema using the table designer in SSMS and then use the schema compare tool to create a single monolithic file of SQL statements for each element of the table and copy each block of code to a newly created file in VS.
This question was asked 2 years ago and I'm hoping the answer has changed.
Please tell me there's a hidden table designer for the database project in VS2010 that I have just overlooked.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我很确定没有一个!
我可以问为什么您需要一个表设计器来为新对象创建和修改创建脚本文件吗?有什么东西是设计师不能给你的吗?
I'm pretty sure there isn't one!
Can I ask why you need a table designer over creating and modifying creation script files for your new objects? Is there anything that this doesn't give you that a designer would?
我刚刚注意到 VS 11 Beta 现在包含了一名设计师,尽管它的边缘还很粗糙(例如,关系仍然需要手动输入)。
I just noticed that VS 11 Beta now includes a designer, although it is rough around the edges (relationships, for example, still need to be typed by hand).
我在VS2010中使用数据库项目的方式是:
The way I use the database project in VS2010 is:
哇......不敢相信这么长时间以来没有人花时间回答这个问题。这是带有一些简单约束的表创建脚本示例。
您可以使用函数嵌入检查约束中,但同样,这是一个简单的示例。
Wow... can't believe no one has taken the time to answer this in all this time. Here's a sample of table creation script with some simple constraints.
You can use functions to embed in your check constraints, but again, this is a simplistic exaxmple.
正如我在此处评论的那样,VS2010参考指出存在此文档中的
表设计器
。但由于某种原因,无论我创建哪种类型的项目(服务器项目 2008/2005、数据库项目 2008/2005),我都无法显示
表设计器
。As I commented here, the VS2010 reference states that there exist a
Table Designer
in this document.But for some reason, no matter what kind of project I create (Server project 2008/2005, database project 2008/2005) I can't get the
Table Designer
being shown.