Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
The SQL Workshop
The SQL Workshop

The SQL Workshop: Learn to create, manipulate and secure data and manage relational databases with SQL

Arrow left icon
Profile Icon Frank Solomon Profile Icon Awni Al Saqqa Profile Icon Prashanth Jayaram
Arrow right icon
€8.99 €19.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8 (14 Ratings)
eBook Dec 2019 288 pages 1st Edition
eBook
€8.99 €19.99
Paperback
€24.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Frank Solomon Profile Icon Awni Al Saqqa Profile Icon Prashanth Jayaram
Arrow right icon
€8.99 €19.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8 (14 Ratings)
eBook Dec 2019 288 pages 1st Edition
eBook
€8.99 €19.99
Paperback
€24.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €19.99
Paperback
€24.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

The SQL Workshop

1. SQL Basics

Overview

This chapter covers the very basic concepts of SQL that will get you started with writing simple commands. By the end of this chapter, you will be able to identify the difference between structured and unstructured data, explain the basic SQL concepts, create tables using the CREATE statement, and insert values into tables using SQL commands.

Introduction

The vast majority of companies today work with large amounts of data. This could be product information, customer data, client details, employee data, and so on. Most people who are new to working with data will do so using spreadsheets. Software such as Microsoft Excel has many tools for manipulating and analyzing data, but as the volume and complexity of the data you're working with increases, these tools may become inefficient.

A more powerful and controlled way of working with data is to store it in a database and use SQL to access and manipulate it. SQL works extremely well for organized data and can be used very effectively to insert, retrieve, and manipulate data with just a few lines of code. In this chapter, we'll get an introduction to SQL and see how to create databases and tables, as well as how to insert values into them.

Understanding Data

For most companies, storing and retrieving data is a day-to-day activity. Based on how data is stored, we can broadly classify data as structured or unstructured. Unstructured data, simply put, is data that is not well-organized. Documents, PDFs, and videos fall into this category—they contain a mixture of different data types (text, images, audio, video, and so on) that have no consistent relationship between them. Media and publishing are examples of industries that deal with unstructured data such as this.

In this book, our focus will be on structured data. Structured data is organized according to a consistent structure. As such, structured data can be easily organized into tables. Thanks to its consistent organization, working with structured data is easier, and it can be processed more effectively. Tables are collections of entities or tuples (rows) and attributes (columns).

For example, consider the following table:

Figure 1.1: An example student’s database table

Figure 1.1: An example student's database table

For each row, there is a clear relationship; a given student takes a particular subject and achieves a specific score in that subject. The columns are also known as fields, while the rows are known as records.

Data that is presented in tabular form can be stored in a relational database. Relational databases, as the name suggests, store data that has a certain relationship with another piece of data. A Relational Database Management System (RDBMS) is a system that's used to manage relational data. SQL works very well with relational data. Popular RDBMSs include Microsoft SQL Server, MySQL, and Oracle. Throughout this book, we will be working with MySQL. We can use various SQL commands to work with data in relational databases. We'll have a brief look at them in the next section.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Understand the features and syntax of SQL and use them to query databases
  • Learn how to create databases and tables and manipulate the data within them
  • Create advanced queries and apply them on realistic databases with hands-on activities

Description

Many software applications are backed by powerful relational database systems, meaning that the skills to be able to maintain a SQL database and reliably retrieve data are in high demand. With its simple syntax and effective data manipulation capabilities, SQL enables you to manage relational databases with ease. The SQL Workshop will help you progress from basic to advanced-level SQL queries in order to create and manage databases successfully. This Workshop begins with an introduction to basic CRUD commands and gives you an overview of the different data types in SQL. You'll use commands for narrowing down the search results within a database and learn about data retrieval from single and multiple tables in a single query. As you advance, you'll use aggregate functions to perform calculations on a set of values, and implement process automation using stored procedures, functions, and triggers. Finally, you'll secure your database against potential threats and use access control to keep your data safe. Throughout this Workshop, you'll use your skills on a realistic database for an online shop, preparing you for solving data problems in the real world. By the end of this book, you'll have built the knowledge, skills and confidence to creatively solve real-world data problems with SQL.

Who is this book for?

This Workshop is suitable for anyone who wants to learn how to use SQL to work with databases. No prior SQL or database experience is necessary. Whether you're an aspiring software developer, database engineer, data scientist, or systems administrator, this Workshop will quickly get you up and running.

What you will learn

  • Create databases and insert data into them
  • Use SQL queries to create, read, update, and delete data
  • Maintain data integrity and consistency through normalization
  • Customize your basic SQL queries to get the desired output
  • Refine your database search using the WHERE and HAVING clauses
  • Use joins to fetch data from multiple tables and create custom reports
  • Improve web application performance by automating processes
  • Secure a database with GRANT and REVOKE privileges

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 30, 2019
Length: 288 pages
Edition : 1st
Language : English
ISBN-13 : 9781838649081
Category :
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Dec 30, 2019
Length: 288 pages
Edition : 1st
Language : English
ISBN-13 : 9781838649081
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 105.97
The Python Workshop
€47.99
The SQL Workshop
€24.99
The JavaScript Workshop
€32.99
Total 105.97 Stars icon
Banner background image

Table of Contents

11 Chapters
1. SQL Basics Chevron down icon Chevron up icon
2. Manipulating Data Chevron down icon Chevron up icon
3. Normalization Chevron down icon Chevron up icon
4. The SELECT Statement Chevron down icon Chevron up icon
5. Shaping Data with the WHERE Clause Chevron down icon Chevron up icon
6. JOINS Chevron down icon Chevron up icon
7. Subqueries, Cases, and Views Chevron down icon Chevron up icon
8. SQL Programming Chevron down icon Chevron up icon
9. Security Chevron down icon Chevron up icon
10. Aggregate Functions Chevron down icon Chevron up icon
11. Advanced SQL Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8
(14 Ratings)
5 star 78.6%
4 star 21.4%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




D Jun 21, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I use this as a reference for my work which is very SQL heavy. I've learned a few new things and it has been a great resource to use to review materials. Definitely recommend.
Amazon Verified review Amazon
Habtish Jun 23, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I enjoyed reading the book and as I am updating myself, the book is a great summary in the area of SQL programming and very handy.
Amazon Verified review Amazon
Wm.Brutzman Jul 26, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I like this book. That this book works as a hands-on with abundant and meaningful exercises.This book is perhaps the best book for those diving-in to SQL for the first time _ and for intermediate users. The book would be a good choice for a one semester “SQL-101” course. The book is clearly written, well-written, understandable and enjoyable.Many SQL books are overly complex. This book finds the sweet spot in explaining key principles of SQL.The book well covers the fundamentals of SQL via MySQL. The book is a useful reference.A person who grasps the things in this book will be in demand _ able to land _ and keep a good job _ with many companies.Working the angles…Because find Oracle’s installation of MySQL to be challenging _ with too many advanced options _ installing the open-source _ MariaDB _ is a good alternative. MariaDB is a version of MySQL _ written by the engineers who were the original designers of MySQL. The install of MariaDB is painless.Likewise, I like using the open-source tool “Heidi SQL”. Heidi has a GUI (graphical user interface).With MariaDB and Heidi _ it is possible to work through many of the exercises _ faster.A good choice for an additional chapter in the forthcoming 2nd edition would be _ Temp Tables. I consider SQL to be “brittle” in that many examples of data are programmatically tricky. Another factor is database speed when attempting complex joins. Temp tables go a long way to simplify number crunching and grabbing only the minimum data necessary.Although there is much buzz with NoSQL databases _ I have found that the schema-less _ free-form nature of NoSQL_ is not the best choice for large projects with many tables and many programmers. Likewise, NoSQL is a challenge for newbies to grasp. MySQL is forever.Also _ there are many YouTube and other SQL video resources available. While I am a big fan of video learning _ the book The SQL WorkShop _ is a better, stronger, faster _ perhaps the best and fastest _way to get up-to-speed on SQL.
Amazon Verified review Amazon
Hemant Jun 21, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
this book will take you from beginners to advanced level to learn all the concepts of T-SQL-Siddharth Poddar
Amazon Verified review Amazon
Charles Tucker Jun 03, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
SQL is an essential tool for data analytics and data engineering, and this book does a good job of covering the basics and introducing more advanced topics. The title is fitting, as you use MySQL to gets hands-on experience with the concepts in the book.The book starts with the basics of introducing SQL, DDL, and DML, covers creating databases/tables, querying, joins, case statements, subqueries, stored procedures, built-in functions, triggers, access control, aggregate functions, and window functions.I would recommend this book to anyone who is looking to get started with SQL or has a basic knowledge and would like to become more proficient.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.