SQL for Beginners Part-2: Database

 Make sure you have gone through SQL for Beginners Part-1 before you go through this. 
My approach to gain knowledge in SQL is by doing it, simply learning theory would be like mugging up several commands.  So to get this done, you will need some softwares installed on your system. You need the most basic software used widely for Software Project developments - Visual Studio. Alternatively you can try working on the commands here. The latest version is Visual Studio 2010, and I recommend you to use it.
Tip: Don't turn back after scrolling down and taking a look at the number of steps. If you are going to an IT industry, you have to be used to this. Visual Basic is the most basic software you need to know. Please do give a try.
  •  After installing it, double click on the icon to open the Visual Studio 2010, which would look like this-
    (Click to Zoom) Open the Server Explorer tab, seen on the left side in the above image. You can open the Window from View->Server Explorer. There you can see the list of Databases in your server. 
  •  Next step you have to create a Database Connection. Right click on Database Connection in the Server Explorer window and Click on Create New SQL server Database.
  • On clicking Create New SQL Server Database you will get the following pop up. I'm creating a database for Student Details mentioned in Part-1.

    Give the Server Name as '.' which indicates your system, and name of the Database as Student_details.
  • Now you will notice that a Database namely Student Details is displayed in the Server Explorer. Click it to expand it, remember that a Database is a collection of Tables, you will find a sub-folder called Tables. Right click on this folder and click on Add New Table.
  • You will get a window in which you have to enter the Attributes(Refer Part 1) and their data type. For those who don't know what a Data Type is, it is the type of Data the Attribute takes in. For example, Marks takes in Integer Type, and Name takes in Varchar(Variable Character) type. Then save the table.

    So we have successfully created a database!
That would be enough for this Part!

You learned in this Part
  • Install Visual Studio
  • How to create a Database in Visual Studio
In the Alternative I mentioned w3schools.com, you won't be able to work on your Databases, w3schools provide a nice tutorial to SQL though, give a try if you are too lazy to get used to the future!



SQL Tutorials