SQL

Introduction to SQL

Structured Query Language (SQL) is the standard language for managing and manipulating relational databases. It is used to perform various operations on the data stored in these databases, such as querying, updating, inserting, and deleting data. SQL is essential for anyone working with data, whether in software development, data analysis, or database administration.

What You Will Learn
  • What SQL is and its significance
  • Basic SQL syntax
  • Setting up a database and running SQL commands
  • Writing basic SQL queries
What is SQL?

SQL stands for Structured Query Language. It is used to communicate with databases and perform tasks such as:

  • Creating and modifying database structures (tables, indexes, views, etc.)
  • Inserting, updating, and deleting data
  • Querying data to retrieve specific information
  • Controlling access to the database and its data

SQL is supported by all major relational database management systems (RDBMS), including MySQL, PostgreSQL, Oracle, Microsoft SQL Server, and SQLite.

Why Learn SQL?

SQL is a fundamental skill for many tech-related jobs. Here are a few reasons to learn SQL:

  • Data Analysis: Extract and analyze data from databases to make informed decisions.
  • Web Development: Manage data for web applications, such as user information and content.
  • Database Administration: Ensure the smooth operation of databases, including backups and performance tuning.
  • Business Intelligence: Generate reports and insights from business data.
Basic SQL Syntax

SQL syntax is composed of various statements that perform different tasks. Here are some fundamental SQL statements:

  • SELECT: Retrieves data from one or more tables.
  • INSERT: Adds new data into a table.
  • UPDATE: Modifies existing data within a table.
  • DELETE: Removes data from a table.
  • CREATE: Creates new tables or databases.
  • ALTER: Modifies the structure of an existing table.
  • DROP: Deletes tables or databases.
Setting Up a Database

For this lesson, we’ll use SQLite, a lightweight and easy-to-set-up database system that requires no server installation. We’ll use a simple SQLite database to practice SQL commands.

  1. Install SQLite: Follow the instructions on the SQLite download page to install SQLite on your system.
  2. Create a Database: Open a terminal or command prompt and create a new database file.bashCopy codesqlite3 mydatabase.db
Creating a Table and Inserting Data

Let’s start by creating a simple table and inserting some data into it.

Create a Table: Use the CREATE TABLE statement to define a new table called Employees.

CREATE TABLE Employees (
EmployeeID INT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
BirthDate DATE,
HireDate DATE
);

Insert Data: Use the INSERT INTO statement to add records to the Employees table.

INSERT INTO Employees (EmployeeID, FirstName, LastName, BirthDate, HireDate)
VALUES (1, 'John', 'Doe', '1980-01-15', '2005-03-10');

INSERT INTO Employees (EmployeeID, FirstName, LastName, BirthDate, HireDate)
VALUES (2, 'Jane', 'Smith', '1985-02-20', '2010-07-15');
Writing Basic SQL Queries

Now that we have some data in our table, let’s write a few basic SQL queries to retrieve and manipulate this data.

Select All Data: Use the SELECT statement to retrieve all data from the Employees table.

SELECT * FROM Employees;

Select Specific Columns: Retrieve only the first names and last names of all employees.

SELECT FirstName, LastName FROM Employees;

Filter Data: Use the WHERE clause to filter data. For example, retrieve employees hired after January 1, 2005.

SELECT * FROM Employees WHERE HireDate > '2005-01-01';

Order Data: Use the ORDER BY clause to sort the data by the last name in ascending order.

SELECT * FROM Employees ORDER BY LastName ASC;

Limit Results: Use the LIMIT clause to restrict the number of rows returned. For example, retrieve only the first record.

SELECT * FROM Employees LIMIT 1;

SQL Data Definition Language (DDL)

Overview

SQL Data Definition Language (DDL) is a crucial subset of SQL used to define and manage the structure of a database. Unlike Data Manipulation Language (DML), which deals with the data itself, DDL is concerned with the schema or the blueprint of the database. DDL statements allow database administrators and developers to create, alter, and delete database objects such as tables, indexes, views, and schemas.

Core Functions of DDL
  1. Creating Database Objects
  2. Modifying Database Objects
  3. Deleting Database Objects
  4. Defining and Managing Constraints
Creating Database Objects

The primary function of DDL is to create various database objects. This involves defining tables, columns, data types, indexes, views, and schemas. Here are some of the key objects you can create with DDL:

Creating Tables

Tables are fundamental structures in a relational database where data is stored. The CREATE TABLE statement defines a new table and its columns.

CREATE TABLE Employees (
EmployeeID INT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
BirthDate DATE,
HireDate DATE
);

In this example, a table named Employees is created with five columns: EmployeeID, FirstName, LastName, BirthDate, and HireDate. The EmployeeID column is defined as the primary key, ensuring each value is unique.

Creating Indexes

Indexes improve the speed of data retrieval operations on a table. The CREATE INDEX statement creates an index on one or more columns.

CREATE INDEX idx_lastname ON Employees (LastName);

This example creates an index on the LastName column of the Employees table, improving the performance of queries that search by last name.

Creating Views

Views are virtual tables representing the result of a query. They simplify complex queries and enhance security by restricting access to specific data.

CREATE VIEW EmployeeView AS
SELECT FirstName, LastName, HireDate
FROM Employees;

This view, EmployeeView, selects and presents specific columns from the Employees table.

Modifying Database Objects

As databases evolve, their structures often need to change. The ALTER statement in DDL is used to modify existing database objects without deleting them. This includes adding, deleting, or modifying columns, and adding or dropping constraints.

Adding a Column
ALTER TABLE Employees
ADD COLUMN Email VARCHAR(100);

This statement adds a new column Email to the Employees table.

Modifying a Column
ALTER TABLE Employees
MODIFY COLUMN Email VARCHAR(150);

This modifies the Email column to allow for longer email addresses.

Dropping a Column
ALTER TABLE Employees
DROP COLUMN Email;

This removes the Email column from the Employees table.

Deleting Database Objects

When a database object is no longer needed, DDL provides statements to remove it from the database. This includes tables, indexes, and views.

Dropping Tables

The DROP TABLE statement deletes a table and all of its data.

DROP TABLE Employees;

This statement removes the Employees table from the database.

Dropping Indexes
DROP INDEX idx_lastname;

This statement deletes the idx_lastname index.

Dropping Views
DROP VIEW EmployeeView;

This statement removes the EmployeeView view.

Defining and Managing Constraints

Constraints are rules applied to table columns to enforce data integrity. DDL allows you to define and manage these constraints.

Primary Key

A primary key uniquely identifies each row in a table.

CREATE TABLE Departments (
DepartmentID INT PRIMARY KEY,
DepartmentName VARCHAR(50) NOT NULL
);
Foreign Key

A foreign key ensures referential integrity by linking a column to the primary key of another table.

CREATE TABLE Employees (
EmployeeID INT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
DepartmentID INT,
CONSTRAINT fk_department FOREIGN KEY (DepartmentID) REFERENCES Departments(DepartmentID)
);
Unique Constraint

A unique constraint ensures all values in a column are unique.

CREATE TABLE Users (
UserID INT PRIMARY KEY,
Username VARCHAR(50) UNIQUE
);
Not Null Constraint

A NOT NULL constraint ensures a column cannot have a NULL value.

CREATE TABLE Products (
ProductID INT PRIMARY KEY,
ProductName VARCHAR(50) NOT NULL,
Price DECIMAL(10, 2) NOT NULL
);
Check Constraint

A check constraint ensures that all values in a column satisfy a specific condition.

CREATE TABLE Employees (
EmployeeID INT PRIMARY KEY,
Salary DECIMAL(10, 2),
CONSTRAINT chk_salary CHECK (Salary >= 0)
);
Conclusion

SQL Data Definition Language (DDL) is a critical component of SQL, used to define and manage the structure of relational databases. DDL statements allow you to create, modify, and delete database objects such as tables, indexes, and views, and to define constraints that enforce data integrity. Mastery of DDL is essential for database administrators and developers, as it provides the tools needed to design and maintain a robust and efficient database schema. In future lessons, we will explore more advanced DDL topics and best practices, such as schema design, normalization, and database migrations.

Data Manipulation Language (DML) in SQL

Overview

Data Manipulation Language (DML) is a subset of SQL (Structured Query Language) used for managing data within relational databases. DML allows users to retrieve, insert, update, and delete data from database tables. Understanding DML is essential for anyone working with databases, as it enables efficient data retrieval and manipulation.

Learning Objectives
  • Understand the role and importance of DML in SQL.
  • Learn the basic syntax and usage of key DML statements.
  • Practice writing and executing DML queries to retrieve, insert, update, and delete data.
What is DML?

Data Manipulation Language (DML) is used to retrieve, store, modify, delete, insert, and update data in a database. It is a core component of SQL and allows users to interact with the data stored in database tables.

Basic DML Statements
SELECT Statement

The SELECT statement retrieves data from one or more tables. It is used to query the database and retrieve specific information based on specified criteria.

SELECT column1, column2, ...
FROM table_name
WHERE condition;
Example:
SELECT * FROM Employees;

This query retrieves all columns (*) from the Employees table.

INSERT Statement

The INSERT statement adds new rows of data into a table.

INSERT INTO table_name (column1, column2, ...)
VALUES (value1, value2, ...);
Example:
INSERT INTO Employees (FirstName, LastName, HireDate)
VALUES ('John', 'Doe', '2022-06-01');

This inserts a new employee record into the Employees table with specific values for FirstName, LastName, and HireDate.

UPDATE Statement

The UPDATE statement modifies existing data in a table.

UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
Example:
UPDATE Employees
SET LastName = 'Smith'
WHERE EmployeeID = 1;

This updates the LastName of the employee with EmployeeID equal to 1 in the Employees table to ‘Smith’.

DELETE Statement

The DELETE statement removes one or more rows from a table.

DELETE FROM table_name
WHERE condition;
Example:
DELETE FROM Employees
WHERE EmployeeID = 1;

This deletes the employee with EmployeeID equal to 1 from the Employees table.

Advanced Data Manipulation with DML

Overview

Now, we will delve deeper into Data Manipulation Language (DML) by exploring advanced techniques for retrieving and manipulating data in SQL. We will cover complex queries, join operations, subqueries, and common table expressions (CTEs). By the end of this section, you will be able to perform sophisticated data manipulations to solve complex problems.

Learning Objectives
  • Understand and use various types of joins to combine data from multiple tables.
  • Learn how to write and use subqueries to enhance SQL queries.
  • Understand and implement Common Table Expressions (CTEs) for better query organization and readability.
  • Apply advanced techniques to practical examples.
Advanced SQL Joins

INNER JOIN

The INNER JOIN keyword selects records that have matching values in both tables.

SELECT Orders.OrderID, Customers.CustomerName
FROM Orders
INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID;

This query retrieves all orders along with the customer names for orders where there is a matching customer ID in both the Orders and Customers tables.

LEFT JOIN

The LEFT JOIN keyword returns all records from the left table (table1), and the matched records from the right table (table2). The result is NULL from the right side if there is no match.

SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID;

This query retrieves all customers and their corresponding orders, if any. If a customer has no orders, the OrderID will be NULL.

RIGHT JOIN

The RIGHT JOIN keyword returns all records from the right table (table2), and the matched records from the left table (table1). The result is NULL from the left side if there is no match.

SELECT Orders.OrderID, Customers.CustomerName
FROM Orders
RIGHT JOIN Customers ON Orders.CustomerID = Customers.CustomerID;

This query retrieves all orders and their corresponding customer names, including orders with no matching customer.

FULL JOIN

The FULL JOIN keyword returns all records when there is a match in either left (table1) or right (table2) table records. If there is no match, the result is NULL on the side that doesn’t have a match.

SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
FULL JOIN Orders ON Customers.CustomerID = Orders.CustomerID;

This query retrieves all customers and their orders, including customers with no orders and orders with no matching customers.

Subqueries

A subquery is a query nested inside another query. Subqueries can be used to perform operations that require multiple steps.

Subquery in SELECT

SELECT EmployeeID, 
(SELECT COUNT(*)
FROM Orders
WHERE Orders.EmployeeID = Employees.EmployeeID) AS OrderCount
FROM Employees;

This query retrieves each employee’s ID and the number of orders they have handled.

Subquery in WHERE

SELECT ProductName
FROM Products
WHERE ProductID IN (SELECT ProductID
FROM OrderDetails
WHERE Quantity > 100);

This query retrieves the names of products that have been ordered in quantities greater than 100.

Common Table Expressions (CTEs)

CTEs provide a way to create temporary result sets that can be referenced within a SELECT, INSERT, UPDATE, or DELETE statement. CTEs make complex queries easier to read and maintain.

Defining a CTE
WITH SalesCTE (SalesPersonID, TotalSales) AS (
SELECT SalesPersonID, SUM(Amount)
FROM Sales
GROUP BY SalesPersonID
)
SELECT SalesPersonID, TotalSales
FROM SalesCTE
WHERE TotalSales > 10000;

This query defines a CTE SalesCTE that calculates total sales per salesperson, and then retrieves salespersons with total sales greater than 10,000.

Practical Examples

Combining Joins and Subqueries

SELECT e.EmployeeID, e.FirstName, e.LastName, d.DepartmentName
FROM Employees e
INNER JOIN (SELECT DepartmentID, DepartmentName
FROM Departments
WHERE DepartmentName LIKE '%Sales%') d
ON e.DepartmentID = d.DepartmentID;

This query retrieves employees who work in departments with ‘Sales’ in their name.

Using CTEs for Recursive Queries

WITH RECURSIVE EmployeeHierarchy AS (
SELECT EmployeeID, ManagerID, 1 AS Level
FROM Employees
WHERE ManagerID IS NULL
UNION ALL
SELECT e.EmployeeID, e.ManagerID, eh.Level + 1
FROM Employees e
INNER JOIN EmployeeHierarchy eh ON e.ManagerID = eh.EmployeeID
)
SELECT EmployeeID, ManagerID, Level
FROM EmployeeHierarchy;

This query uses a recursive CTE to retrieve the hierarchy levels of employees based on their managers.

SQL Indexes and Performance Tuning

Overview

In this lesson, we will explore SQL indexes and performance tuning techniques. Indexes are crucial for optimizing database performance by speeding up data retrieval operations. Understanding how to use indexes effectively and applying performance tuning strategies will help ensure efficient query execution and overall database performance.

Learning Objectives
  • Understand the concept and importance of SQL indexes.
  • Learn how indexes improve query performance.
  • Explore different types of indexes and when to use them.
  • Implement performance tuning techniques to optimize SQL queries.
What are SQL Indexes?

SQL Indexes are data structures that improve the speed of data retrieval operations on database tables. An index is created on one or more columns of a table to facilitate quick access to rows that match a specific condition or criteria in a WHERE clause.

Types of Indexes

1. Single-Column Index

A single-column index is created on a single column of a table.

CREATE INDEX idx_lastname ON Employees(LastName);

This creates an index named idx_lastname on the LastName column of the Employees table.

2. Composite Index

A composite index is created on multiple columns of a table.

CREATE INDEX idx_name_department ON Employees(LastName, DepartmentID);

This creates an index named idx_name_department on the LastName and DepartmentID columns of the Employees table.

3. Unique Index

A unique index ensures that all values in the indexed columns are unique.

CREATE UNIQUE INDEX idx_email ON Employees(Email);

This creates a unique index named idx_email on the Email column of the Employees table, ensuring that no two employees can have the same email address.

How Indexes Improve Performance

Indexes improve query performance by reducing the number of data pages that need to be read from disk. When a query is executed that involves indexed columns, the database engine can quickly locate the rows that satisfy the query criteria based on the index, rather than scanning the entire table.

Performance Tuning Techniques

1. Use Indexes Wisely

  • Identify High-Use Queries: Analyze which queries are frequently executed and consider creating indexes on columns used in WHERE, JOIN, and ORDER BY clauses.
  • Avoid Over-Indexing: Too many indexes can degrade performance on data modification operations (INSERT, UPDATE, DELETE), as the database needs to maintain indexes during these operations.

2. Query Optimization

  • Use EXPLAIN: Analyze query execution plans using EXPLAIN to understand how the database engine executes a query and identify potential bottlenecks.
  • Optimize WHERE Clauses: Ensure that queries use indexed columns in WHERE clauses to maximize index utilization.

3. Normalize Database Structure

  • Reduce Redundancy: Normalize tables to reduce redundant data and improve query efficiency.

4. Monitor and Analyze Performance

  • Database Monitoring: Use database monitoring tools to track query performance, identify slow queries, and optimize them.
  • Index Maintenance: Regularly monitor and maintain indexes to ensure they remain effective as data changes.

Examples

Example 1: Creating an Index

CREATE INDEX idx_productname ON Products(ProductName);

This creates an index named idx_productname on the ProductName column of the Products table to speed up queries that filter by product name.

Example 2: Analyzing Query Execution Plan

EXPLAIN SELECT * FROM Orders WHERE CustomerID = 123;

Use EXPLAIN to analyze how the database engine will execute a query, identifying whether it will use an index and how.

Introduction to NoSQL

Overview

In this section, we will explore NoSQL databases, their characteristics, advantages, and typical use cases. NoSQL (Not Only SQL) databases have gained popularity for their flexibility, scalability, and ability to handle large volumes of unstructured and semi-structured data. Understanding NoSQL is essential for modern data engineers and developers working with diverse data types and distributed systems.

Learning Objectives
  • Understand the concept and principles of NoSQL databases.
  • Learn about different types of NoSQL databases and their characteristics.
  • Explore advantages and disadvantages of NoSQL compared to traditional SQL databases.
  • Discuss typical use cases for NoSQL databases.
What is NoSQL?

NoSQL databases are non-relational databases designed to handle large volumes of unstructured, semi-structured, and structured data. They offer flexibility in schema design and are optimized for horizontal scalability and high availability.

Types of NoSQL Databases

1. Document Stores

Document-oriented databases store data in flexible, semi-structured documents, typically using formats like JSON or BSON (Binary JSON).

  • Example: MongoDB
{
"_id": "12345",
"name": "John Doe",
"age": 30,
"email": "john.doe@example.com",
"address": {
"city": "New York",
"state": "NY",
"country": "USA"
}
}

2. Key-Value Stores

Key-value databases store data as a collection of key-value pairs, where each key is unique and maps to a value.

  • Example: Redis
SET user:12345 "John Doe"
GET user:12345

3. Column-Family Stores

Column-family databases organize data into columns grouped by column families, suitable for large-scale distributed data storage.

  • Example: Apache Cassandra
CREATE TABLE users (
user_id UUID PRIMARY KEY,
name TEXT,
email TEXT
);

4. Graph Databases

Graph databases model data as nodes, edges, and properties, suitable for representing and querying relationships between data entities.

  • Example: Neo4j
CREATE (Alice:Person {name: 'Alice'})
CREATE (Bob:Person {name: 'Bob'})
CREATE (Alice)-[:FRIENDS_WITH]->(Bob)
Advantages of NoSQL
  • Flexible Schema: NoSQL databases allow for dynamic and flexible schema designs, accommodating diverse data types and structures.
  • Scalability: Designed for horizontal scaling, NoSQL databases can handle large volumes of data and traffic across distributed environments.
  • Performance: Optimized for specific use cases, NoSQL databases often offer superior performance for read and write operations compared to traditional SQL databases.
Use Cases for NoSQL Databases
  • Big Data: Storing and processing large volumes of unstructured or semi-structured data, such as log files and sensor data.
  • Real-time Web Applications: Handling high volumes of concurrent user interactions and data updates.
  • Content Management Systems: Storing and serving variable content types with dynamic schemas.
  • IoT (Internet of Things): Capturing and analyzing sensor data streams from connected devices.
Comparing NoSQL with SQL Databases
  • Schema Flexibility: NoSQL databases offer schema flexibility, while SQL databases enforce a rigid schema.
  • Scalability: NoSQL databases excel in horizontal scaling, whereas SQL databases are traditionally vertically scaled.
  • Data Integrity: SQL databases ensure ACID (Atomicity, Consistency, Isolation, Durability) transactions, whereas NoSQL databases may prioritize availability and partition tolerance (CAP theorem).

NoSQL Concepts and Techniques

Overview

In this advanced lesson on NoSQL databases, we delve deeper into advanced concepts, techniques, and best practices for effectively using NoSQL databases in modern applications. We will explore advanced data modeling, querying, indexing, and scalability strategies that leverage the strengths of NoSQL databases to handle complex and high-volume data scenarios.

Learning Objectives
  • Understand advanced data modeling techniques in NoSQL.
  • Learn advanced querying capabilities and techniques.
  • Explore indexing strategies for performance optimization.
  • Discuss scalability and distribution strategies in NoSQL databases.
Advanced Data Modeling in NoSQL

1. Denormalization

Denormalization involves storing redundant data within a database to improve read performance by reducing the need for joins.

  • Example: Embedding related data within a document in a document store like MongoDB.
{
"_id": "12345",
"name": "John Doe",
"age": 30,
"email": "john.doe@example.com",
"address": {
"city": "New York",
"state": "NY",
"country": "USA"
},
"orders": [
{
"order_id": "O123",
"total_amount": 100.00
},
{
"order_id": "O124",
"total_amount": 150.00
}
]
}

2. Aggregation

Aggregation pipelines in NoSQL databases allow for complex transformations and computations directly within the database.

  • Example: Using aggregation pipelines in MongoDB to calculate averages, sums, or other aggregations across collections.
db.orders.aggregate([
{ $match: { status: "completed" } },
{ $group: { _id: "$customer_id", totalAmount: { $sum: "$amount" } } }
])
Advanced Querying Techniques

1. Range Queries

NoSQL databases support efficient range queries over sorted data.

  • Example: Performing range queries in Apache Cassandra to retrieve data based on time intervals or numerical ranges.
SELECT * FROM sensor_data WHERE sensor_id = 'S123' AND timestamp >= '2023-01-01' AND timestamp < '2023-01-31';

2. Full-Text Search

Some NoSQL databases offer full-text search capabilities for indexing and querying text-based data efficiently.

  • Example: Using full-text search in Elasticsearch to retrieve documents matching specific keywords or phrases.
GET /products/_search
{
"query": {
"match": {
"description": "powerful performance"
}
}
}
Indexing Strategies

1. Compound Indexes

Creating compound indexes across multiple fields can optimize queries involving multiple criteria.

  • Example: Creating a compound index in MongoDB for fields often used together in queries.
db.collection.createIndex({ "field1": 1, "field2": -1 });

2. Geospatial Indexing

NoSQL databases like MongoDB support geospatial indexing for efficient spatial queries.

  • Example: Indexing location data to perform proximity searches or spatial queries.
db.places.createIndex({ "location": "2dsphere" });
Scalability and Distribution

1. Sharding

Sharding involves partitioning data across multiple machines to distribute workload and achieve horizontal scalability.

  • Example: Sharding collections in MongoDB to distribute data based on a shard key across multiple servers.
sh.shardCollection("testDB.orders", { "order_id": "hashed" });

2. Replication

NoSQL databases use replication to ensure high availability and data redundancy by maintaining copies (replicas) of data across multiple servers.

  • Example: Configuring replica sets in MongoDB for automatic failover and data redundancy.
rs.initiate();
Best Practices
  • Understand Use Cases: Choose the appropriate NoSQL database type (document, key-value, column-family, graph) based on specific application requirements.
  • Monitor Performance: Utilize database monitoring tools to track query performance, index usage, and overall database health.
  • Regular Maintenance: Perform regular maintenance tasks such as index optimization, data compaction, and capacity planning to ensure optimal database performance and scalability.

Additional Free Resources for Learning SQL and NoSQL:

Relational Databases (SQL)

  1. SQLCourse.com
    • Website: SQLCourse.com
    • Details: Offers interactive SQL tutorials and exercises covering basic to advanced SQL topics.
  2. SQLZoo
    • Website: SQLZoo.net
    • Details: Provides interactive SQL tutorials with exercises that cover various SQL concepts and query exercises across different database platforms.
  3. W3Schools SQL Tutorial
    • Website: W3Schools SQL Tutorial
    • Details: Provides comprehensive SQL tutorials with examples, quizzes, and references for SQL syntax and queries.
  4. Mode Analytics SQL Tutorial
    • Website: Mode Analytics SQL Tutorial
    • Details: Offers a practical SQL tutorial that covers querying, aggregating data, joins, and advanced SQL concepts.
  5. Coursera – SQL for Data Science
    • Website: Coursera – SQL for Data Science
    • Details: Free SQL course offered by Coursera, covering SQL basics to advanced querying techniques for data science applications.

Non-Relational Databases (NoSQL)

  1. MongoDB University
    • Website: MongoDB University
    • Details: Offers free courses on MongoDB, including data modeling, querying, indexing, and administration.
  2. Cassandra University
    • Website: Cassandra University
    • Details: Provides free courses and resources for Apache Cassandra, covering data modeling, querying, and distributed database concepts.
  3. Redis University
    • Website: Redis University
    • Details: Offers free courses on Redis, covering data structures, advanced data types, clustering, and application development with Redis.
  4. Neo4j GraphAcademy
    • Website: Neo4j GraphAcademy
    • Details: Provides free courses on Neo4j, covering graph database modeling, querying with Cypher, and graph algorithms.
  5. Elasticsearch Learning Resources
    • Website: Elasticsearch Learning Resources
    • Details: Offers free courses and resources on Elasticsearch, including search fundamentals, data ingestion, querying, and performance tuning.