‫In this chapter, we are going to work with databases and therefore we need the right tools to do so.
‫Visual Studio by itself is not going to be enough.
‫We will need to use Microsoft SQL Server.
‫So let's go ahead and search for SQL Server, Windows and Google and then choose the one from your country
‫or your language, or at least the language that you have installed on your system.
‫In my case, I have an English system installed or an English windows, so I will need a SQL server
‫with the English version here n minus us here you can simply download the developer edition, so click
‫here on download now and simply download the exe file.
‫Once you open up the Excel file, you'll find this window here.
‫Select an installation type and either just use custom here, then you need to specify the location
‫onto which you want to install your SQL Server.
‫And I'm just going to press install.
‫And that will take quite a while because it needs to download all the files and then it will finally
‫do the installation.
‫Once that is done, the SQL Server Installation Center will open up.
‫And if that doesn't happen, then you simply need to open it up.
‫If you wonder where to find it, simply open up the folder to onto which you have installed your SQL
‫Server.
‫There you'll find the developer and you folder and there you'll find the setup exa.
‫Once you open it up, you will open this window here.
‫This server SQL or SQL Server Installation Center.
‫Once you're here, you need to press the new SQL or SQL Server standalone installation or add features
‫to an existing installation.
‫And here you see the different rules that are required in my case.
‫It needs to restart my computer.
‫So in my case, it failed.
‫What I need to do now is, of course, to restart my computer and then I'll be back in your case.
‫A restart might not be required.
‫Next, we are the Microsoft update.
‫Well, it can check for updates.
‫I will not check that mark.
‫Then I click next.
‫And it's going to install the set up files once all of that is done.
‫We can see that there is only one warning and that's the Windows firewall, but we can ignore that.
‫Then we click next again and in here we can go ahead and perform a new installation of SQL Server 2017.
‫As you can see, I have an installation here already.
‫Now I'm going to perform a new one I click on next.
‫Here you can specify a free edition or you can go ahead and check another one and enter the product
‫key if you have bought one.
‫But the developer edition is totally fine as we are using the free edition.
‫Then click next and here you need to read through and accept the license terms and I'm going to accept
‫them and click next again.
‫Next, you can decide which features you would like to install.
‫And there are plenty of instance features, shared features and redistributable features that you can
‫install.
‫The one that's interesting for us is this database engine services because that's the one that we are
‫actually going to require.
‫Once you have that checked, click next again and now you can name an instance.
‫So you can go ahead and create a named instance or you can use a default instance which will get an
‫instance ID of RMS SQL Server.
‫But I'm just going to create a new named instance.
‫I'm going to call it Pan Tutorials,
‫SQL.
‫But that name down, you might need it later on.
‫And you also want to change the instance ID once you click on it.
‫It will be named like the named instance.
‫Then we click next again.
‫You can simply click next again.
‫And we are at the database engine configuration where you can enter the note authentication mode.
‫And we're going to use the mixed mode here, which is the SQL Server authentication and the Windows
‫authentication.
‫So I'm going to enter a password and you should also enter your password and remember what that was.
‫Then press add current user.
‫And that will take a little while.
‫And there we are.
‫So as you can see, this is the name of my computer and then I can go ahead and click next again.
‫Once you're here, you can simply go ahead and click on install and that will go ahead and do all the
‫installation process.
‫Once that is done, you will find the install successful details here and then all is good so you can
‫go ahead and close that.
‫Now you need to install the SQL Server management tools, so simply press on that link here and then
‫this page comes up and you need to install the SQL Server Management Studio and in my case it's 17.6.
‫So I'm going to select that and download the S RMS setup exa and if you want to make sure that you get
‫the right version here, you can find a SQL Server management studio with the right country code.
‫So in my case, I need to install the English one and I'm going to save that.
‫And once a year you can simply press the install key and or the button.
‫In my case I only have the repair button here, so I'm just going to press on that just for you to see
‫how it looks.
‫So in there you can see that this is Microsoft SQL Server Management Tool and it will simply go ahead
‫and install the packages and install everything else that is required for us to go on.
‫And in my case, another restart is required.
‫It can be that in your case it's not required, but I'm just going to press restart it once again and
‫restart my machine and I'll be back in a second.
‫Now that it's installed, you can simply press the Windows key and enter SQL and then you'll find Microsoft
‫SQL Server Management Studio.
‫So there we are and we need to connect to a server and thereby we can either choose what is given here.
‫In my case, there are two servers given which are the same, and I can even browse for more.
‫Therefore I open database engine and here I find the one that I have set up which was trials SQL.
‫And I'm going to use that.
‫I'm going to open it up server name here.
‫I'm going to choose the SQL Server authentication, which we set up ourselves and as the login it is
‫as a standing for server admin and the password was the one that we have entered.
‫So I'm going to enter that here.
‫I'm going to set remember password and connect to the server.
‫Now that I'm connected to the server, we can go ahead and open up Visual Studio.
‫So I'm going to open up Visual Studio right now that we are, and I'll connect to Visual Studio on the
‫left hand side I can see the server explorer, otherwise you can also open it up from here.
‫View Server Explorer.
‫So control alt as would be the shortcut.
‫And we are we're connected to a database that I have set up before and I can create a new database connection.
‫So here add connection and I choose Microsoft SQL Server.
‫Next I continue and I select server name.
‫In my case, it doesn't show anything and you can simply open up your Microsoft SQL Server Management
‫Studio once again and take that name here.
‫So I'm going to go to properties here.
‫And copy the name from here.
‫Now we can close that and use the name here.
‫I choose SQL Server authentication again as a was the username and then I had my password in here.
‫I'm going to save my password and I will select or enter a database name which I'm going to create myself
‫and I'm going to call that one pun, you Torrijos.
‫DB And then if your database was not there yet, or if it doesn't exist yet, you want to create it.
‫So would you like to attempt to create it?
‫I'm going to say yes, and there we are.
‫It has created my connection.
‫And as you can see, I had a connection before.
‫So I'm going to delete that or actually I'm going to leave it open for now.
‫I'm going to delete it later.
‫But as you can see, we have a database here now.
‫We have a data connection and a database which is our DB dot db file database object.
‫As you can see, if I open up tables, there is nothing there yet, but for now we have everything set
‫up so we can go ahead and start with our database projects in the next video.
‫So see you there.