Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2012 Database Designer - Has the functionality changed?

I recently installed Visual Studio and SQL Server 2012. I'm wondering if I'm missing something because the Database Designer doesn't seem anywhere as friendly as the old version.

In Visual Studio 2010 when I created a SQL User Instance (.mdf) in the App_Data directory, I was able to create tables using a nice interface that was quite similar to SQL Server Management Studio. I'd click save and everything was updated.

In the new version:

1) It seems to create .sql scripts instead of automatically saving my changes

2) I have to update certain things in the TSQL window instead of the Properties area (certain things like Table Name are greyed out in Properties)

3) Creating things like Foreign Keys and Indexes is nowhere near as trivial as it used to be.

Am I missing something from my installation? Or is this the "new way" of doing things? If so, why has it been made, in my humble opinion, more complex?

like image 271
Sam Avatar asked Sep 01 '12 17:09

Sam


1 Answers

The SQL User Instance designers have been replaced with SQL Server Data Tools (SSDT) designers.

Where this is going is that Microsoft is encouraging developers to move towards using a separate Visual Studio project for the database, rather than having it stored as an asset within your application project.

This project system works by synchronizing a set of Offline database object declarations (written in T-SQL) with a physical database during project build.

The replacement designers seem a bit peculiar because they inherit much of their behaviour from those designers used in the offline database projects.

You can read more about SSDT here: http://msdn.microsoft.com/en-us/library/hh272686(v=vs.103).aspx

Of course, there's no reason why you can't use those Online designers to edit your database: instead of clicking Save when you make changes to an object, click Update. This will apply changes directly to your .mdf asset.

Or perhaps do what I do and simply use SSMS to edit your databases instead :)

like image 149
Dan Nolan Avatar answered Sep 21 '22 18:09

Dan Nolan