SQL Tutorial for Beginners: How to Retrieve Data from Databases

3.0M views
•
March 22, 2022
by
Kevin Stratvert
YouTube video player
SQL Tutorial for Beginners: How to Retrieve Data from Databases

TL;DR

To retrieve data from databases with SQL, install Microsoft SQL Server and SQL Server Management Studio, connect SSMS to your server, and restore the sample KCC database for practice. The tutorial introduces relational databases, explains how IDs connect tables, and prepares beginners to query four tables: Customers, Order Product, Orders, and Product. Read on for the setup steps and core concepts needed to begin working with SQL.

Transcript

Hi everyone, Kevin here. Today we are going to walk through step-by-step   how you can use SQL or ‘sequel’  for data reporting and analysis. I'm going to assume you have  absolutely no background in SQL,   and we're also going to use all free tools,  so there's really no barrier to learning. By the end of this video, my goal is that you  will know ... Read More

Key Insights

  • SQL stands for structured query language, a language used to interact with databases. It lets you retrieve, filter, sort, add, update, and remove data, and anyone can learn it without a computer science degree.
  • A database is a collection of tables that have relationships between them. Major websites like Facebook, Twitter, and LinkedIn are all powered by databases that store users, orders, and product information.
  • An RDBMS (relational database management system) is the software used to interface with a database. Popular options include Oracle, PostgreSQL, Microsoft SQL Server, and MySQL, and learning one makes picking up others easy.
  • Microsoft SQL Server is used in this tutorial because it is one of the most popular options and the tools are completely free while learning. The core SQL concepts carry over to other systems despite minor syntax differences.
  • SQL Server offers two free editions: Express, which allows business use but is limited to 10 gigabytes and 4 cores, and Developer, which has full functionality but is restricted to development and testing purposes only.
  • SQL Server Management Studio (SSMS) is a graphical front end that lets you write queries against your database. It connects to the server installed separately, and both tools are free to download from Microsoft.
  • Databases are split into separate tables to avoid repeating information. Instead of duplicating a customer's full details on every order, an orders table references a customer ID that points to a single customer record.
  • The sample KCC database for the Kevin Cookie Company contains four tables: Customers, Order Product, Orders, and Product. Restoring this backup lets learners practice on existing data instead of building from scratch.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: How can beginners start retrieving data from databases with SQL?

Install Microsoft SQL Server as the database engine and SQL Server Management Studio as the graphical tool for writing queries. Connect SSMS to the server on your PC, then restore the sample KCC database so you have existing tables and data to analyze.

Q: What does SQL stand for, and what can it do?

SQL stands for structured query language and is used to interact with databases. It can retrieve, filter, sort, add, update, and remove data, although this tutorial focuses on retrieving data for reporting and analysis.

Q: Do you need a computer science degree or prior SQL experience?

No computer science degree or SQL background is required. The tutorial assumes absolutely no prior SQL experience and uses free tools, making it suitable for beginners such as business analysts, product managers, and researchers.

Q: What is an RDBMS, and which one does this SQL tutorial use?

An RDBMS is a relational database management system used to interface with a database. Options mentioned include Oracle, PostgreSQL, Microsoft SQL Server, and MySQL; the tutorial uses Microsoft SQL Server because it is popular and its learning tools are free.

Q: Should you install SQL Server Express or Developer edition?

Either edition works for the tutorial. Express can be used for business purposes but limits a database to 10 gigabytes and supports 4 cores, while Developer provides full functionality but is restricted to development and testing.

Q: How do you confirm that Microsoft SQL Server is running?

Open the Start menu, go to all apps, find Microsoft SQL Server 2019, and launch Configuration Manager. It shows whether the SQL Server service is running and whether its start mode is automatic, which means the instance starts when the PC boots.

Q: What is SQL Server Management Studio, and how do you connect it?

SQL Server Management Studio, or SSMS, is a graphical front end for connecting to a server and writing database queries. Select your PC as the server name, leave Windows authentication selected, and click connect.

Q: Why do relational databases separate data into multiple tables?

Separate tables reduce repeated information and take up less space. For example, an Orders table can store customer 5 as an ID while a Customers table holds that customer’s contact details; using IDs to connect such tables creates their relationships and supports normalization.

Summary & Key Takeaways

  • SQL is a language for interacting with databases, letting you retrieve, filter, sort, add, update, and delete data. The video focuses on retrieving data, which suits business analysts, product managers, and researchers. It does not cover creating databases, adding tables, or modifying data.

  • To follow along for free, install Microsoft SQL Server (Developer or Express edition) and SQL Server Management Studio. The Configuration Manager confirms the server is running and set to start automatically, while SSMS provides a graphical interface to connect to the server.

  • Databases store data across related tables rather than one big file to avoid repeating customer and product information. Using IDs, an orders table can reference customer 5 and link to a separate table holding that customer's full contact details, which is the core idea behind relational databases.


Read in Other Languages (beta)

Share This Summary 📚

Explore More Summaries from Kevin Stratvert 📚