Home Blog Page 3

Learn Microsoft SQL Server-Introduction-Section1

0
learn-microsoft-sql-server

Learn sql server online free.How to learn sql server? In this section it will be discussing about the following topics: we’ll briefly discuss what a database is. Is how to install Microsoft SQL Server specifically the developer version what the SQL Server Management Studio or SSMS environment looks like. We’ll see how to use some of important shortcuts.

In a SSMS, how to create a data is using SSMS shortcuts functionality as well as writing SQL Also discuss how to create a sample database that is used in this course. Which came from a CIA or a Central Intelligence Agency. We will see how to use drag and drop functionality in SSMS, how to select a table without even writing a query, how to change it database context in a multi database environment. We’ll see how to create as well as why we need comments in SQL.

What is a database?

This article we’ll discuss what a database is. A database is an organized collection of data that is used for the purposes of modeling some type of organization or organization on process.What we can understand from this is as long as there is an organized collection of data that we use to model some sort of an organization or a company different entities in that organization and different relationships we can be able to assume there is a database.

And a software package that we can use to manage these organized set of data or database is called a DBMS means or database management system. Relational databases such as SQL Server, MySQL, PostgreSQL and Oracle they use SQL as a language in order to be able to create different objects such as tables, views and stored procedures as well as to extract some data insert data. In this course we’ll be using SQL Serve as a data management system and we’ll discuss different aspects of this SQL language in the coming sections and movies.

learn-sql-server-online-free

What is the difference between different Editions of SQL Server?

In the previous article we’ve discussed different editions of course so we also decided to use a developer edition as it’s free and it also comes with all features of Enterprise Edition. In this article we’ll see how to download and install a developer version of SQL Server.

To do this go to your favorite web browser and type SQL Server Developer Edition latest installer. Once you’re in this page go ahead and download a developer edition save or run it. We have three basic options for this dialog box. A basic, custom and downloaded media. Let’s go with customer since we don’t need everything you can’t accept the default location where your extract file will get expanded.

https://www.microsoft.com/en-us/sql-server/sql-server-2017

Click install. This is going to take some time. Once it’s finished downloading it will extract the files to install. go to “Installation” this will be installing a sequence of standalone version. And add feature next. The installer will check if there is any installation rules are violated, you might see some warning like. The firewall is not disabled. It’s normal ok, so you can ignore these warning message click next.

We will be installing a new SQL Server and go ahead and select perform news SQL Server 2017 installation and click next. It is going to ask you to add a product key. A developer edition is free.  Just simply select a free developer edition. Click next. You have to accept the license terms. Next, it’s going to ask you to select features to installed. Simply select a database engine and click next. You will have an option to pick a default instance which is Or you can give it your name. It is common to use a default instance in the next dialog.

It’s going to ask you to do a server configuration in a normal production environment. You’re going to have to create a series accounting and use those services accounts you but for us. You can accept the default values and click next.  You can pick your authentication mode. You can leave it to a default. Windows authentication select select a mixed mode authentication.

Which is nothing but SQL Server authentication plus a Windows authentication for us to see how how the SQL authentication works let us select that one and give it a strong password that you will not forget. Specify a SQL Server administrator in a normal production environment. You’ll specify a services account here but for us add your account by clicking this button so that you will have a full admin privilege in that SQL Server that you are installing.

Next, you’ll see a summary of the configuration you made previously. If you see everything is good. Click to install. This is going to take some time. We’ll come back once this is done. After completing a sequence of developer edition installation the next thing to do is Tinas still see SQL Server Management Studio which is an IDE to write any SQL statement. As well as we can be able to use the GUI. Open your favorite browser and type SQL Server Management Studio installer Go to the first Microsoft Web site.

Then if you scroll down, you will see a tool section. Download SQL Server Management Studio SSMS. Click on that, wait for the installer to finish downloading install finished downloading click run then click install, follow the on screen dialog box and finish installing sql server management studio and I’ll be back once this is done.

Create a table in SQL Server Management Studio (SSMS)

0
create-a-table-SQL-Server

In this lesson, we will learn how to create a table in SQL Server Management Studio (SSMS).

Hello, and welcome to this introduction about SQL Server. I’ll be taking you through this course. So, what we’re going to do.First of all we’re going to find and download and instal a free version of SQL Server so you can play with it on your own computer.We’re going to open up a programme called SSMS, that’s Management Services and we’re going to create a database,create a table,insert some dataand retrieve that data.

We’re then going to look at the individual components of SQL Server. T-SQL, Database Administration, or DBA,SSIS, that’s SQL Server Integration Services,SSAS, that’s Analysis Services,and SSRS, that’s Reporting Services. And we’re going to have a look at some resources that can help you learn it.Books, videos and practise tests. We’ll also have a look at the official Microsoft website. So, let’s start.

Right, so the next thing we’re going to do,is we’re going to create a table.So a table stores data.So what sort of table am I going to create? Well, what I’m going to do, I’ve got some previously created data here,and this is a purchase system.So in my purchase number one,I bought four of product number one at a cost of $50.26, totaling $201.04. My purchase order two, then I bought three numbers;359, and three of 360’s and so forth.So it is a perfectly ordinary transaction table.So I’m going to create it.I’m going to leave it on screen,so we can have a look at it while we create the table.

So to create the table, I’m going to right and click on tables and go New >Table. Again, there’s an awful lot of details that we can look at, but we’re just going to look at very simplistic, very easy to create things. So click new table, and here it says,well what columns are you going to create? So I want a column called purchase order ID, and I want another one called order quantity. I want product ID,unit price,and line total.

create-a-table-SQL-Server create-table-SQL

Now there is another thing that we have to specify at the same time. What type of column is it? Or more accurately, what sort of data do you want to store in the column? Now you can see that we got various choices,including,dates,time,text, though in reality, the one that I use the most of the time is called varchar, A variable character. And then we got things like integer.

Integers are whole numbers like one, two, three,instead of 1 1/2.So this is when we really need to look at the data that we got and decide what sort of column we want. And hopefully you can see that the first three columns can all be integers. They’re all whole numbers.  So let’s change them to ints, I-N-T.Now these last two contain–well money, essentially.  And so what I’m going to do is, Int would not be good enough, because if I put $50.26 into an int column, then it will truncate it to $50.

So I would have a certain lack of accuracy. So instead, what I’m going to do, with all of these, is I’m going to put it into the money data type. Though many other different types I could use, but just for now we’re going to use Int for integers and Money for–floating point numbers.  So now I’ve created it, I’ll press– Well what do I do? Well, I can press the Save Table here, or I can close this window.

So let’s click Save, either way we’ll get this choose a name. So what name am I going to call this?I’m going to call this, Transactions.So click okay, and close this, and we’ll go back to our object explorer,and you can see that the Transactions table is, where, exactly?Now, one of the things about object explorer,is that it doesn’t automatically update after you have created a new object. The only exception for this is a database that you have created or attached.

create-table-SQL

So, if you’ve created a new object,be it a table, a view, a procedure, or anything else,and you want it to appear,they would need to click on the Refresh icon. So now we can see that we have our Transactions table. D-B-O, Databaseowner.Transactions.Every table with have something before this dot, and that is called a schema. But, in this case, it doesn’t really matter what the schema is. So, in the next video, we’re going to populate it, we’re going to add some data to this table, and then we’re going to retrieve it.

Opening SQL Server Management Studio (SSMS)

0
connect-sql-azure

In this lesson, we will show you how to open SQL Server Management Studio (SSMS).

Now We’ve Got Our SQL Server İnstalled,Let’s Start Using İt.Now, İf I Go To Start And I Have A Look Through.Microsoft SQL Server, Whichever Version You İnstalled,You Will Notice Quite Quite A Lot Of Programmes.You Might Be Going,”Oh, Which One Do I Actually Start With?”. Well, What We Need To Start With İs A Programme Called.SQL Server Management Studio.And You Can See The Quickest Way. That I Found İt On My System

Is Just Typing SSMS.So, İf I Now Run This Programme,So, Here Comes SQL Server Management Studio,This İs Where You Do A Lot Of Work With TSQL,Which İs Your Standard SQL Server.Called The Select Statement,Which İs What We’ll Be Looking At İn The Next Few Videos.

This İs Also Where We Do DBA:Database Administration.So, First Of All,We Have İt Connect To A Server.Now, Your Server Name Will Be Completely Different,But What’s İmportant İs İt Says Server Type,Database Engine.Server Name, Whatever The Server Name That You’ve İnstalled,And Authentication, Windows Authentication.

And I Just Click Connect.I İgnore All The Other Options.So, Hopefully You’ve Now Found On Your Computer.SQL Server Management Studio.You Might Have To Search For İt,Especially İf You’ve Got An Older Version Of Windows. Now, Just İn Case You Got To This Screen.You Click Connect, And Maybe Server Name Was Blank.

If Server Name İs Blank,Then My Suggestion İs To Put A Period,A Full Stop, A Dot As Your Server Name.And That Will Allow You To Connect To Your Local Server.But Generally, Just Accept Whatever Was There.As Your Default.Obviously, İf You’re Connecting To A Corporate Machine,Then Some Server That’s Already Been İnstalled,That’s Worth Tens Of Thousands Of Dollars,Then Use Whatever Credentials You Were Given.By Your System Administrator.

So, This İs SSMS,SQL Server Management Studios.And Let’s Just Have A Look Around İt. First Of All, We Have An Object Explorer. Now, İf You Don’t See This Object Explorer,İf İt’s Disappeared, Then Go To View, And Object Explorer.Now, This Contains All Of The Objects. That We Are Going To Be Using İn This TSQL and İn The DBA Section Of This Course.

So, We Start Off With Databases. And İf I Expand That,Then We Have System Databases and Any Databases That May Have Previously Been İnstalled. You Can See That I’ve Got A Few Databases İnstalled.But, We’re Going To İgnore All Of My Existing Databases and oncentrate On A New Database.

First Of All, What İs A Database? A Database İs A Object,A Container That Can Hold Other Objects. It Can Hold Data, İt Can Hold Queries,İt Can Hold Procedures and İn This Course We’re Going To Make All Of Those. So, First Of All, We Need A Database Container.So, What I’m Going To Do İs Right-Hand Click On The Word Databases And Go To New Database. Now, We Can Call This Database Almost Anything We Want, Within Reason.

So, I’m Going To Call İt My First Database,Without Any Spaces.So, I’m Going To Leave Everything Else As İt İs.This İs Just A Test Environment.I Don’t Need To Concentrate On Any Of These Tabs Or Other Options That Get Really Complicated Very Quickly.So, Let’s Just İgnore That And Just Click OK.

So, Once We’ve Done This, İn The Object Explorer,The Phrase My First Database Has Appeared, İt’s Right Here. Now, İf I Expand This New Database,We’ve Got Tables, Views, Which Hold Queries and İn Programmability We’ve Got Stored Procedures. And We’ll Be Concentrating On These Later. Within Tables, We Have Got System Tables.Within Views, We’ve Got System Views.

And There’s Actually Quite A Lot Of Them, To Be Honest.So, All Of This İs Just The Outline Of Our Database, İt Doesn’t Actually Contain Any Data.So, İn The Next Video,We Are Going To Create A Table And We’re Going To Populate İt.We’re Going To Add Some Data İnto İt.

How To Generate Er Diagram Using Sql Server Management Studio?

0
How To Generate Er Diagram Using Sql Server Management Studio

In this article, we will answer the question of How To Generate Er Diagram Using Sql Server Management Studio.

  1. The SQL Server Management Studio program opens.
  2. Open and expand your Object Explorer panelHow To Generate Er Diagram Using Sql Server Management Studio
  3. Then, select and expand your database.
  4. Then, right-click on “Database Diagrams” under your Database and select “New Database Diagram”.how-to-generate-er-diagram-using-sql-server-management-studio-2
  5. A new window opens. We select the tables to be included in the ER Diagram.
  6. Click Add.how-to-generate-er-diagram-using-sql-server-management-studio-3
    how-to-generate-er-diagram-using-sql-server-management-studio-4
  7. We expect it to be completed.
  8. Close

how-to-generate-er-diagram-using-sql-server-management-studio-5

9. Result