Until about two years ago, I was completely ignorant about Visual Studio .NET's Database projects. That is, until my wife let me in on the secret. Actually it was kind of funny, she came home from work one day excited after she had learned about the Database project type in VS.NET and wanted to show me how to create/setup/use such a project. We were about to head out of the house, so I said, Later, and over the next few weeks she mentioned it occassionally, but there never was a good time.
Finally, we both had some free time and I asked her to show me the Database project. Since then I've been using them in every single data-driven ASP.NET Web application project I've created, and have immensely enjoyed the benefits. Many thanks, my dear.
I recently wrote an article on 4Guys about the advantages of Database projects and how to get started using them. I invite you to read this new article, Database Projects in Visual Studio .NET. Additionally, be sure to check out the Visual Studio .NET Database Projects sample chapter from Database Access with Visual Basic .NET.
To summarize the advantages of Database projects, I quote from my article on 4Guys:
-
Source control on database objects - if you are using source control (and you most definitely should be), the scripts managed through the Database project can be added to your source control provider. This means that any changes to your database objects will be recorded by your source control provider, thereby providing the myriad of advantages that source control affords (rolling back to older versions, a complete history of changes, etc.).
-
A centralized development experience - rather than having to poke through SQL Enterprise Manager you can manage your database-related objects through the same IDE that you are using to manage the pages and components in your ASP.NET application.
-
An improved text-editor - Visual Studio .NET's text-editor is head and shoulder's above SQL Enterprise Manager's built-in text-editing experience. Additionally, with SQL Enterprise Manager many of the dialog boxes that are used to create/edit database objects are modal, thereby making it impossible to examine other facets of the database when creating/editing a database object. Not so when doing it through Visual Studio .NET.
-
Ease of deployment - if you need to quickly replicate your database's structure having a Database project makes it as easy as right-clicking on the Database project's objects and selecting the 'Run' context-menu option.