Welcome back. In the last lesson, you learned the difference between data and information,
and why SQL Server sits at the center of business applications.
Now we are going to get practical. This lesson teaches you the building blocks of every relational system:
tables, rows, columns, and constraints.
If you master these concepts early, you will avoid the most common mistakes that cause broken reports, duplicates,
orphan records, and performance issues in production.
Lesson description: You will learn how SQL Server stores data in tables, how rows and columns represent
real-world entities, how to choose correct data types, how NULL works, and how constraints enforce correctness so
applications can trust the database. You will also learn the “DBA verification habit” (how to prove the database is
enforcing rules, not just hoping it is).
Relational databases store data in tables. A table represents one real-world thing (an entity).
Each row is one instance of that thing, and each column is a property (attribute).
dbo).DBA mindset: A database is not “random tables.” A database is a carefully designed model of a business.
The quality of that model determines how reliable and scalable the application becomes.
When a DBA reviews a table design, they immediately ask:
Your goal is to train this instinct early. It is exactly how job interviews and real DBA work feel.
Choosing the correct data type is not a cosmetic choice—it impacts storage, performance, correctness, indexing,
and how applications behave. Many production problems start with poor data type choices.
TINYINT, SMALLINT, INT, BIGINTDECIMAL(p,s) (recommended for money)FLOAT, REALDATE, DATETIME2 (modern standard), TIMEDATETIME2 over older DATETIME for better precision and rangeVARCHAR(n) / NVARCHAR(n)NVARCHAR: when you need full Unicode support (international characters)BIT (0/1)UNIQUEIDENTIFIER (GUID)DATE or DATETIME2.FLOAT. Use DECIMAL.In SQL Server, NULL means “unknown” or “not provided.” It does not mean zero and it does not mean empty text.
NULL can be useful, but uncontrolled NULL usage causes reporting mistakes and application bugs.
CreatedAt DATETIME2 NOT NULL DEFAULT SYSDATETIME()CreatedAt DATETIME2 NULL (later you find rows with no create date)A constraint is a rule enforced by SQL Server. DBAs rely on constraints because application code changes,
but database integrity must remain stable and trustworthy.
Professional DBAs do not assume rules are working—they verify.
Every time you add a constraint or modify a table, you should test it by attempting an invalid insert/update
(in a safe lab or test environment) and confirming SQL Server blocks it.
Quantity > 0).Quantity = 0).This habit is what makes you reliable in production—especially during audits or incidents.
Imagine a table called Booking. A job-ready DBA would expect:
DECIMAL and not negative (CHECK constraint).Notice what is happening: you are not memorizing terms—you are learning how to review database designs like a professional.
In the next lesson, we will go deeper into keys and constraints as a DBA would:
how to choose primary key strategies, how foreign keys enforce relationships,
and how to design UNIQUE and CHECK constraints that prevent duplicates, orphans, and invalid values in production.
Not a member yet? Register now
Are you a member? Login now