Saturday 5 June 2010

Creating a Table Relationship using SQL Server 2008 Management Studio

Most of the time we used to create table relationship using SQL Query Analyzer by writing the SQL Scripts, but today I thought why not to use Management Studio, guess what it took me more then 30 min to find out how, sounds silly!

Anyways if you too get stuck somewhere in this, I am giving you the steps how to do that.

I have created a Database called AddressBook, and added few tables named, Person, Address, Phone, etc. Now I want to create the relationship between Person and Address table, where PersonId from Person table will be the FK in Address table and Phone table.

1. First obviously open the SQL Server Management Studio

2. Right click the table you want to edit and select Design.

image

3. Now Select the Relationship by clicking anywhere in the table design or from the menu

image

4. Once the Foreign Key Relationship windows open, select Add button to add a new relationship and then select the ellipse button just next to the Tables and Column Specifications button in the right side of the pane.

image

5. This opens the Table and Columns windows where you can create a new relationship.

image

This is simple, I hope this help you !!!

Share:

Friday 4 June 2010

Visual Studio 2010 Theme Support

Personally I loved the VS2008 theme, so when I switched to VS2010 I saw the looks was vastly changed. It took sometime for me to get used to this for my eyes. Before I came to know this is just a default theme and we can customize this however we want.

Yes you can download the Free Theme Editor by Matthew Johnson and customize the Visual Studio themes, after you installed you might be looking from where you can do that, so don’t get surprised, you will get a new menu very next to your View Menu and you are ready to go.

image

By Default you will get the following themes

  1. Windows XP Silver
  2. Windows Classic
  3. Windows XP Emerald
  4. Windows XP Autumn
  5. Windows XP Olive
  6. Windows XP Blue
  7. Windows Aero
  8. Windows XP Blue
  9. Default Visual Studio 2010 Theme

But you can go ahead and customize, make your own themes and export and import them and also you can download lots of other themes too from here

http://studiostyles.info/

Share: