.NET Zone is brought to you in partnership with:

Located in Raleigh, NC, Imaginovation is a premium web development and design company with a passion for the online capability. Founded in 2011, Imaginovation's educated and experienced team utilizes the latest technologies combined with well-developed strategies to provide its customers with quality marketing and communications products that are both accomplishing and affordable. Imaginovation have mastered their capabilities in research and analysis, marketing, design, development, programming and maintenance, which are carefully combined and applied uniquely to each business. With cutting edge technologies and the passion and motivation to continue to update and innovate, the Imaginovation team offer websites, applications and other online solutions that guarantee affordability, quality and results. Michael has posted 22 posts at DZone. You can read more from them at their website. View Full User Profile

Create a Database Project in Visual Studio

02.06.2013
| 14102 views |
  • submit to reddit

Introduction: All software development involves databases. It is very difficult to manage and maintain databases when multiple developers are working on it. Visual studio provides a feature where we can create a database project, where it makes easier to maintain databases.

Below are the steps to create database project in visual studio 2010.

1.  Open Visual Studio 2010. Click on File -> New -> Project

2.  Select database -> SQL server and choose SQL Server 2008 Database Project.

3.  Database project will get created.

4.  Now we are ready to compare database project with actual database in SQL server

Click on Data -> Schema Compare -> New Schema Comparison

Source schema is a database/project used to update target database/schema.

5.  Schema Comparison can be done using 4 different types.

a.  SQL Database to VS database project

Select Source Schema as a Database and Target Schema as a Project.

b.  VS database project to SQL database

Select Source Schema as a project and Target Schema as a Database.

c.  SQL database to SQL database

Select Source Schema and Target Schema as a Database.

d.  VS database project to VS database project

Select Source Schema and Target Schema as a Project.

6.  Here is detailed comparison for SQL Database to VS database project

Select database and project and click OK.

Next window will appear.

We will need to use following buttons from toolbar.

7.  Click on filter icon and select Non Skip Objects.


8.  Click on Refresh Update Script.

9.  Then click on Write Updates. Finally click on Refresh icon.

This will update SQL Database to VS database Project.

Conclusion: Visual Studio database project helps developer to manage and maintain database easily. It also makes easier to update databases on the server. 

This article was written by the Imaginovation team.  They are a Raleigh web design and software development company who uses .NET, PHP, HTML5, JavaScript, and jQuery technologies.

This article was written by the Imaginovation team.  They are a Raleigh web design and software development company who uses .NET, PHP, HTML5, JavaScript, and jQuery technologies.

Published at DZone with permission of its author, Michael Georgiou.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)