To answer your questions in reverse order:
"what is the actually database used by C# programming"
There isn't one, in the sense you mean. You do not have to use a database of any form in your program, although you can use any you have a valid connection to and the appropriate classes. Visual Studio itself does keep some database information to help it with processing your code, and this is stored in an SQL database.
"how do we connect the C# programming using Visual Studio and the database"
There are a number of ways, you can create a Connection, and a Command, and then use a Reader, or you could use a DataAdapter and DataTables with DataBinding.
The easier way to do it is probably with a Connection and a Command:
using (SqlConnection con = new SqlConnection(strConnect))
{
con.Open();
using (SqlCommand com = new SqlCommand("SELECT iD, description FROM myTable", con))
{
using (SqlDataReader reader = com.ExecuteReader())
{
while (reader.Read())
{
int id = (int) reader["iD"];
string desc = (string) reader["description"];
Console.WriteLine("ID: {0}\n {1}", iD, desc);
}
}
}
}
To work out the connection string, try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.