Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

sql-primer

Sql

Uploaded by

rvponcloud
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

sql-primer

Sql

Uploaded by

rvponcloud
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

SQL Primer

Guide
INTRODUCTION

Many businesses use relational databases,


which is making a basic understanding of
databases and SQL a great (and desirable)
skill for almost everyone.

This SQL 101 guide gives you an overview of


what relational databases are, what SQL is,
and how you can start learning them.

Introduction.........................................1
Relational databases.............................2
SQL......................................................3
Tables..................................................4
SQL Queries..........................................5
How to Learn SQL..................................6

LearnSQL.com is owned by Vertabelo SA


vertabelo.com | CC BY-NC-ND Vertabelo SA
RELATIONAL DATABASES

A database is a computer program that stores various kinds of


data. It allows multiple users to access and modify data at the
same time. It can efficiently search, sort, and perform
computations on data to create various reports. It can validate
information’s correctness and completeness. Databases can
handle a large volume of data, even into petabytes!

There are various types of databases. One of the most common


is the relational database – a very frequent choice in IT. There
are quite a few relational database vendors: Oracle, MySQL,
PostgreSQL, Microsoft SQL Server, and many others.

Relational databases are used in many industries. They are


essential to any business that collects and handles large
amounts of data. In traditional and online stores, databases
maintain product and sales information; in banks, they store
customer, account, and transaction information. They are used
in financial institutions, insurance agencies, social media, web
and mobile applications, taxi companies, and a whole lot more.

Start your SQL course now! LearnSQL.com © 2023


SQL
Structured Query Language (SQL) is the standard language for
dealing with relational databases. Its name is pronounced either
“S-Q-L” or “See-Quel”.

SQL is used to insert, modify, delete, and retrieve data from


a database. It allows you to search for specific records, sort
the data, prepare complex reports, and generate statistics.

All relational databases understand SQL, but each of


them has a slightly different dialect. Many other data
processing technologies, like NoSQL databases and Big
Data technologies, also understand SQL.

SQL is a universal language for data processing. Because of this


versatility, it is used in multiple roles, including technical (e.g.
so ware engineer, data engineer) and analytical roles (e.g. data
analyst, data scientist). Even traditionally non-technical roles,
like product managers or marketers, can take advantage of
SQL.

Start your SQL course now! LearnSQL.com © 2023


TABLES
Every relational database stores information in tables; there can be
many tables in one database. Each table has a name describing its
contents and holds data that refers to similar objects. For example,
a university database would include a table named student that
holds all data regarding students. It might also have another table
called subject that stores information about the subjects taught at
the university.

student Table name


id name year_born graduation_year Table columns
1 Kyle Lawson 1998 2018

2 Santiago Knox 1999 2019


Table's rows
3 Arian Sheppard 2001 2017
with data
4 Samuel Foster 1997 2014

5 Hayden Smith 2003 2020

Database tables are made up of columns and rows. Columns


have names that identify the kind of information stored in
them.
Each row stores information about one object. In the student
table above, you can see that the column names reflect the
information that they contain: the name column has student
names, the graduation_year stores that student’s year of
graduation, etc. In this table, each row holds the data of exactly
one student.

Start your SQL course now! LearnSQL.com © 2023


SQL QUERIES
SQL instructions that select data from a database are called
queries. Queries are questions that we ask with the goal of
finding out some information about the data stored in the
database.

SQL was created with beginners in mind, so its queries resemble


an English sentence. Here’s a query that means “Find the names
of students who were born a er the year 2000.” Take a look:

SQL queries usually start with the word The name of the column
SELECT. This informs the database we want to see.
that we’re asking a question.

The name of the table


We’re looking for students born a er the SELECT name where the data is stored.
year 2000. FROM student
WHERE year_born > 2000;

For the student table, the query would return:


id name year_born graduation_year

3 Arian Sheppard 2001 2017

5 Hayden Smith 2003 2020

Queries can do amazing things – they not only return the data
you ask for, but they also can actually do advanced
calculations using that data.

Start your SQL course now! LearnSQL.com © 2023


HOW TO LEARN
SQL
▶ The best way to learn SQL is through practice. To learn the
foundations of SQL, we recommend the SQL Basics course at
LearnSQL.com. It is hands-on, 100% online, and completely
interactive. All you need is a web browser and an internet
connection. No additional software is required.

▶ Afer SQL Basics, we recommend the additional courses SQL


JOINs and SQL Practice Set to consolidate your knowledge.

▶ Here are some additional helpful resources:


5 Tips for Learning SQL for Beginners
How to Keep Focused While Learning SQL
SQL Books for Beginners
The History of SQL – How It All Began

▶ If you prefer to watch videos, see our list of SQL tutorials


on YouTube.

▶ No matter the learning method you choose, you can always


join the SQL learning group for beginners or follow our
Linkedin page.

Start your SQL course now! LearnSQL.com © 2023


If you found the material worthy to be shared, please tag
LearnSQL.com as a gesture of appreciation

Learn it all at LearnSQL.com

LearnSQL.com is owned by Vertabelo SA


vertabelo.com | CC BY-NC-ND Vertabelo SA

You might also like