Just to preface: I work in a small company that does ASP.NET development and uses SQL Server 2005 for all of our database needs.
仅作为序言:我在一家小公司工作,该公司负责ASP.NET开发,并使用SQL Server 2005满足我们所有的数据库需求。
I was curious as to what were the pros and cons of using Visual Studio or SQL Server Management Studio for our development on the database side (i.e. table creation, stored procedure writing, etc.).
我很好奇在数据库端使用Visual Studio或SQL Server Management Studio进行开发的优缺点(即表创建,存储过程编写等)。
Right now we perform all of our database tasks inside Management Studio and I was wondering if there was some benefit to using Visual Studio instead. Would it make it easier to keep track of procedure changes and other modifications to the database (whether that is through Visual Studio itself or through some type of source control (planning on implementing subversion soon).
现在我们在Management Studio中执行所有数据库任务,我想知道使用Visual Studio是否有一些好处。是否可以更容易地跟踪过程更改和对数据库的其他修改(无论是通过Visual Studio本身还是通过某种类型的源代码控制(计划很快实现subversion)。
I don't personally have problems working with Management Studio but if it would be more efficient and more controllable through Visual Studio in ways that I am just not familiar with I would love to hear about it.
我个人在使用Management Studio时没有遇到任何问题,但是如果通过Visual Studio以我不熟悉的方式提高效率和可控性,我很乐意听到它。
EDIT: I just wanted to note that my specific development environments are SQL Sever 2005, Visual Studio 2005 Professional Edition, and Visual Studio Team System 2008 Development Edition. We do not have team foundation server or any other extras running or installed.
编辑:我只是想说明我的特定开发环境是SQL Sever 2005,Visual Studio 2005 Professional Edition和Visual Studio Team System 2008开发版。我们没有运行或安装团队基础服务器或任何其他附加功能。
6 个解决方案
#1
9
My personal method is to use SQL MS for all the design-related stuff (schema design, diagrams, keys, indexes, etc.), but to craft all my stored procedures, functions and the like in Visual Studio in a "Database" project attached to my solution -- mainly because it lets me keep the procs better version-controlled that way (as I find they generally change more often than the schema), and I find it's particularly handy using the context menus in VS to run the procs on my test and staging machines directly, since I do that so often.
我个人的方法是将SQL MS用于所有与设计相关的东西(架构设计,图表,键,索引等),但是在“数据库”项目中在Visual Studio中制作我的所有存储过程,函数等附加到我的解决方案 - 主要是因为它让我保持procs更好的版本控制的方式(因为我发现它们通常比模式更改),我发现使用VS中的上下文菜单来运行procs特别方便直接在我的测试和登台机器上,因为我经常这样做。
#2
8
IMHO one big advantage to using the management studio is "script as". To my knowledge there is no equivalent in VS.
恕我直言,使用管理工作室的一大优势是“脚本为”。据我所知,在VS中没有相应的东西。
#3
3
I used Management Studio for all of the SQL work earlier, but of late I've found that the in-house SQL manager of Visual Studio is pretty good too. I am using it more and more for running quick query checks, and modifications to the database scheme.
我之前使用过Management Studio来完成所有的SQL工作,但是最近我发现Visual Studio的内部SQL管理器也很不错。我正在越来越多地使用它来运行快速查询检查和数据库方案的修改。
It's got a great feature of SQL indenting, and I've found it pretty helpful. In my view it beats SQL coloring of Management studio.
它有一个很好的SQL缩进功能,我发现它非常有用。在我看来,它击败了管理工作室的SQL着色。
#4
3
Visual Studio 2010 has made some pretty nice upgrades to the SQL Server projects and solutions. Read more here:
Visual Studio 2010对SQL Server项目和解决方案进行了一些非常好的升级。在这里阅读更多:
https://web.archive.org/web/20160407003056/http://leonardwoody.com/2011/08/27/introduction-to-visual-studio-database-management/
#5
2
That's a difficult question. I guess it would depend on exactly what you're doing. If you're building DALs and stuff, it would probably be easier to use VS, since there's some nice integration (drag-and-drop, etc.). VS is probably adequate for 95% of your daily db activity.
这是一个棘手的问题。我想这将取决于你正在做什么。如果你正在构建DAL和东西,那么使用VS可能会更容易,因为有一些很好的集成(拖放等)。 VS可能足以满足您日常数据库活动的95%。
But as someone already mentioned, you don't get the "Script As" helpers (which I use all of the time). You also won't get much (if anything) in the way of user management tools (logons, etc.). And as far as I know, there is no way to manage indexes via Visual Studio. You don't get anything with regard to importing/exporting data either.
但正如有人提到的那样,你没有得到“脚本为”的助手(我一直都在使用)。您也不会在用户管理工具(登录等)方面获得太多(如果有的话)。据我所知,没有办法通过Visual Studio管理索引。您也无法获得有关导入/导出数据的任何信息。
#6
1
For me Data Dude (aka Database Edition of Visual Studio 2008 Team System) has been a big game changer in terms of doing the very things your question addresses: keeping "track of procedure changes and other modifications to the database." Not only can your team as a whole keep track of changes between various shared-environments, but through source control each team member can track his or her own differences relative to all of the shared environments. This makes database code truly code, with all of the attendant benefits.
对我来说,Data Dude(即Visual Studio 2008 Team System的数据库版)在处理您的问题所解决的问题方面已经成为一个重大的改变者:保持“跟踪程序变化和对数据库的其他修改”。您的团队不仅可以跟踪各种共享环境之间的变化,而且通过源代码控制,每个团队成员都可以跟踪自己与所有共享环境相关的差异。这使得数据库代码真正具有代码,具有所有附带的好处。
Further, it's a snap to reconcile differences between databases and have the tool automatically generate the code that would reconcile those differences. Ideally database code would be released right out of source control, just as ASP.NET code would typically be done. Data Dude greatly lessens the effort to achieve this parity.
此外,它可以轻松协调数据库之间的差异,并让工具自动生成可以协调这些差异的代码。理想情况下,数据库代码将直接从源代码控制中发布,就像通常会执行ASP.NET代码一样。 Data Dude大大减少了实现这种平价的努力。
The one negative is the cost: Data Dude requires an upgrade to Team System for those on Visual Studio Pro. Fortunately, evidently Microsoft is going to roll this functionality into the "Developer" edition of Visual Studio 2010, which presumably will have similar pricing to Visual Studio 2008 Pro.
一个负面因素是成本:Data Dude需要为Visual Studio Pro上的人员升级到Team System。幸运的是,显然微软将把这个功能推广到Visual Studio 2010的“开发者”版本,它可能与Visual Studio 2008 Pro有相似的价格。
#1
9
My personal method is to use SQL MS for all the design-related stuff (schema design, diagrams, keys, indexes, etc.), but to craft all my stored procedures, functions and the like in Visual Studio in a "Database" project attached to my solution -- mainly because it lets me keep the procs better version-controlled that way (as I find they generally change more often than the schema), and I find it's particularly handy using the context menus in VS to run the procs on my test and staging machines directly, since I do that so often.
我个人的方法是将SQL MS用于所有与设计相关的东西(架构设计,图表,键,索引等),但是在“数据库”项目中在Visual Studio中制作我的所有存储过程,函数等附加到我的解决方案 - 主要是因为它让我保持procs更好的版本控制的方式(因为我发现它们通常比模式更改),我发现使用VS中的上下文菜单来运行procs特别方便直接在我的测试和登台机器上,因为我经常这样做。
#2
8
IMHO one big advantage to using the management studio is "script as". To my knowledge there is no equivalent in VS.
恕我直言,使用管理工作室的一大优势是“脚本为”。据我所知,在VS中没有相应的东西。
#3
3
I used Management Studio for all of the SQL work earlier, but of late I've found that the in-house SQL manager of Visual Studio is pretty good too. I am using it more and more for running quick query checks, and modifications to the database scheme.
我之前使用过Management Studio来完成所有的SQL工作,但是最近我发现Visual Studio的内部SQL管理器也很不错。我正在越来越多地使用它来运行快速查询检查和数据库方案的修改。
It's got a great feature of SQL indenting, and I've found it pretty helpful. In my view it beats SQL coloring of Management studio.
它有一个很好的SQL缩进功能,我发现它非常有用。在我看来,它击败了管理工作室的SQL着色。
#4
3
Visual Studio 2010 has made some pretty nice upgrades to the SQL Server projects and solutions. Read more here:
Visual Studio 2010对SQL Server项目和解决方案进行了一些非常好的升级。在这里阅读更多:
https://web.archive.org/web/20160407003056/http://leonardwoody.com/2011/08/27/introduction-to-visual-studio-database-management/
#5
2
That's a difficult question. I guess it would depend on exactly what you're doing. If you're building DALs and stuff, it would probably be easier to use VS, since there's some nice integration (drag-and-drop, etc.). VS is probably adequate for 95% of your daily db activity.
这是一个棘手的问题。我想这将取决于你正在做什么。如果你正在构建DAL和东西,那么使用VS可能会更容易,因为有一些很好的集成(拖放等)。 VS可能足以满足您日常数据库活动的95%。
But as someone already mentioned, you don't get the "Script As" helpers (which I use all of the time). You also won't get much (if anything) in the way of user management tools (logons, etc.). And as far as I know, there is no way to manage indexes via Visual Studio. You don't get anything with regard to importing/exporting data either.
但正如有人提到的那样,你没有得到“脚本为”的助手(我一直都在使用)。您也不会在用户管理工具(登录等)方面获得太多(如果有的话)。据我所知,没有办法通过Visual Studio管理索引。您也无法获得有关导入/导出数据的任何信息。
#6
1
For me Data Dude (aka Database Edition of Visual Studio 2008 Team System) has been a big game changer in terms of doing the very things your question addresses: keeping "track of procedure changes and other modifications to the database." Not only can your team as a whole keep track of changes between various shared-environments, but through source control each team member can track his or her own differences relative to all of the shared environments. This makes database code truly code, with all of the attendant benefits.
对我来说,Data Dude(即Visual Studio 2008 Team System的数据库版)在处理您的问题所解决的问题方面已经成为一个重大的改变者:保持“跟踪程序变化和对数据库的其他修改”。您的团队不仅可以跟踪各种共享环境之间的变化,而且通过源代码控制,每个团队成员都可以跟踪自己与所有共享环境相关的差异。这使得数据库代码真正具有代码,具有所有附带的好处。
Further, it's a snap to reconcile differences between databases and have the tool automatically generate the code that would reconcile those differences. Ideally database code would be released right out of source control, just as ASP.NET code would typically be done. Data Dude greatly lessens the effort to achieve this parity.
此外,它可以轻松协调数据库之间的差异,并让工具自动生成可以协调这些差异的代码。理想情况下,数据库代码将直接从源代码控制中发布,就像通常会执行ASP.NET代码一样。 Data Dude大大减少了实现这种平价的努力。
The one negative is the cost: Data Dude requires an upgrade to Team System for those on Visual Studio Pro. Fortunately, evidently Microsoft is going to roll this functionality into the "Developer" edition of Visual Studio 2010, which presumably will have similar pricing to Visual Studio 2008 Pro.
一个负面因素是成本:Data Dude需要为Visual Studio Pro上的人员升级到Team System。幸运的是,显然微软将把这个功能推广到Visual Studio 2010的“开发者”版本,它可能与Visual Studio 2008 Pro有相似的价格。