Microsoft’s new development tool, “Visual Studio LightSwitch“, which was launched few months back. Microsoft Visual Studio LightSwitch is much like other Visual studio softwares but having the simple and fast creation of tables , their relations and using the screens(for interfaces) , which means you don’t have to code for you tables, for connecting databases and for making interfaces. Microsoft Visual Studio LightSwitch makes it all for you in some simple clicks. Now make your Business Applications yourself.

Our last post was related to making a table and defining its properties in Microsoft Visual Studio LightSwitch, that table wasn’t in relation with any other table. To make a relationship (one to one) or (one to many) between tables, click on the button “New Table” No#1.

relation

  • Another tables “No#2” appears  , name that table e.g. “Vehicle”.
  • -add some attributes. Name, type ,Model etc
  • -define their data types. String , Decimal ,Binary etc.
  • -decide requirement.
  • -Now click button  No#3 “Relationship”.

relation1

  • From No#1 of this figure. select the table name, its multiplicity &  behavior.
  • -the ER diagram has been made by itself, that shows (One to Many) relation. e.g. A person can have many cars.
  • -at No#2 the sentence shows the logical behavior of the relationships based upon the properties chosen  at “No#1” .
  • Click the OK button.

relmade

  • A relationship has been made between two tables named “Person”and ” Vehicle”, which is one to many relationship.

The above mentioned steps were the basic steps towards making the relationship between tables in Microsoft Visual Studio LightSwitch. In future I will also show further tutorials and settings for the properties.