1. Server Initialization & Core Theory
Server Initialization & Core Theory
We are not going to start with abstract theory. You cannot learn to fly a jet by reading a manual — you have to turn on the engine. Your first objective in this module is to download, install, and execute a command on a live Microsoft SQL Server database. Once you prove you can establish a connection, we will explain the theory of the machine you just booted up.
What Existed Before Databases
Before modern databases, organisations stored data in flat files — essentially spreadsheets and paper folders. Imagine a university where the Finance Office has one spreadsheet for students, the Registrar has another, and the Library keeps a third. A student changes their phone number. The Registrar updates it. But Finance and the Library still have the old number. Three systems, three different versions of the same fact. This is called data inconsistency.
Now imagine two administrators trying to edit the same student record at the same time on a shared file. One person's changes overwrite the other's — a concurrency problem. And if the computer crashes while saving, the file is left half-written and corrupted — a persistence problem.
These three problems — inconsistency, concurrency, and persistence — are exactly what a Database Management System was designed to eliminate permanently.
⚙️ Step 1 — Download & Install SQL Server
For this track, you will use Microsoft SQL Server Developer Edition — a free, fully-featured enterprise engine built specifically for learning and development.
Open your browser and navigate to the official Microsoft SQL Server download page. You will see three installation options. Choose Basic. This automatically installs everything you need without requiring any configuration decisions.
Click Accept on the licence agreement, choose your installation folder (the default is fine), and click Install. This takes between 5 and 15 minutes depending on your connection speed. When installation completes, a screen will show your instance name — something like MSSQLSERVER or SQLEXPRESS. Write this down.
⚙️ Step 2 — Install SSMS
The database engine runs invisibly in the background as a Windows service. To actually write SQL code and see your tables, you need a graphical interface: SQL Server Management Studio (SSMS).
On the same SQL Server installation completion screen, click the button labelled Install SSMS. Your browser will open the official SSMS download page. Download the installer (named something like SSMS-Setup-ENU.exe), run it, accept the terms, and click Install. When it finishes, click Launch — or find SSMS in your Start Menu under Microsoft SQL Server Tools.
Think of SQL Server as the engine of a car, and SSMS as the steering wheel and dashboard. You need both.
🔌 Step 3 — Connect to Your Server
When SSMS opens for the first time, a Connect to Server dialog appears. Fill it in exactly as follows.
For Server Type, select Database Engine.
For Server Name, type localhost. If that does not connect, try .\SQLEXPRESS or the instance name you wrote down during installation.
Authentication: Select Windows Authentication. This uses your existing Windows login credentials to identify you to SQL Server. You do not need a separate username or password.
Check the box labelled Trust Server Certificate if it appears. Click Connect. If the Object Explorer panel on the left side of SSMS populates with folders — Databases, Security, Server Objects — SQL Server is running and you are connected.
🖥️ Step 4 — Execute Your First Query
Click the New Query button at the top of SSMS. A blank editor window opens. Type the following command exactly as written:
SELECT @@VERSION;
This command asks SQL Server to return its own version information. The double-at symbol @@ is how SQL Server marks built-in system variables.
Press F5 on your keyboard, or click the Execute button in the toolbar. A results panel appears at the bottom of SSMS displaying one row of text — something like: Microsoft SQL Server 2022 (RTM) - 16.0.1000.6... on Windows...
That single line of output confirms your installation is complete and your connection is verified. You are now officially a database operator.
🗄️ What Just Happened? — Understanding the DBMS
A Database Management System (DBMS) is software that sits between your data and the people or applications that need it. Think of it as a highly trained librarian managing a warehouse of millions of records. You never go into the warehouse yourself. You ask the librarian a question in a standard language, and the librarian retrieves exactly the right answer — safely, consistently, and fast.
Here are the four guarantees a DBMS provides:
Abstraction. You just typed SELECT. You never had to tell the computer which magnetic sector of the SSD to scan. The DBMS handled all of that internally.
Concurrency. Thousands of users can read and write data at the same moment. The DBMS uses an internal locking system to ensure no two users accidentally overwrite each other's work.
Persistence and Recovery. If the server loses power mid-save, the DBMS uses a transaction log to safely complete or undo the operation when power returns. Your data is never left in a corrupted half-written state.
Security. The DBMS controls precisely who can see what. A student can see their own grades. A lecturer can see their class list. An administrator can see everything. A stranger sees nothing.
🔄 What Happens When You Press F5
The result appears almost instantly, but four distinct stages happen inside the engine before you see anything.
Stage 1: The Parser reads your SQL text character by character and checks for syntax errors. If you typed SELCT instead of SELECT, the Parser catches it immediately and returns an error message. The query goes no further.
Stage 2: The Algebrizer verifies that everything you referenced actually exists. If you wrote SELECT Name FROM Students but your table is named Student without the S, the Algebrizer rejects the query with an object-not-found error.
Stage 3: The Optimizer calculates the most efficient way to retrieve your data. It considers how many rows are in the table, which indexes exist, and what joins are required — then picks the fastest execution path. This invisible step is the reason a well-written query on a million-row table takes milliseconds instead of minutes.
Stage 4: The Execution Engine carries out the Optimizer's chosen plan, reads the data from storage into memory, and returns the result to your screen.
Knowledge Check
Ready to test your understanding of 1. Server Initialization & Core Theory?