T-SQL 101: #6 What are SQL Server databases?

You might be wondering what databases are.

A database is just a collection of information. Let's take a look at an example:

On this system, I have a number of user databases (AdventureWorks, PopkornKraze, and others). There are also some system databases:

These are ones that are provided by SQL server itself, and mostly are used to hold SQL Server's own configuration.

Now if we look inside any of the databases, we'll see a list of tables, views, and programmable objects like stored procedures, and functions. Tables are where most of the information lives. In PopkornKraze, you can see the tables that are present:

I have tables about cinemas and employees and orders and so on. Each table holds details about one specific type of thing. A database is a collection of relevant tables.

Inside each table, we then have columns that are used to determine the type of information held about the thing (cinema, employee, etc.) If I right-click the table, I can choose to select some rows from the tables. That can help me see what's in it.

Now the reason that we often break up databases rather than just having all of our information in a single database is that we might need different people to administer them and we might also be trying to reduce the complexity. So instead of having one big very complicated database, we might instead have a series of smaller databases such as human resource is and sales and so on.

And database then is a collection of related information.

Learning T-SQL

It's worth your while becoming proficient in SQL. If you'd like to learn a lot about T-SQL in a hurry, our Writing Queries for SQL Server course is online, on-demand, and low cost.

Leave a Reply

Your email address will not be published. Required fields are marked *