Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Mastering MySQL: From Basics to Advanced
Rating: 4.9 out of 5(4 ratings)
28 students

Mastering MySQL: From Basics to Advanced

Learn structured data management, performance tuning, and real-world applications
Created byVimal Daga
Last updated 9/2025
English
English [Auto],

What you'll learn

  • Design and implement a normalized relational database schema from scratch using Primary and Foreign Keys
  • Write foundational SQL queries to create, read, update, and delete data (CRUD) with DDL and DML commands.
  • Master complex queries using multi-table JOINs to retrieve combined, meaningful data from a relational database.
  • Leverage subqueries and aggregate functions (GROUP BY, COUNT) for advanced data analysis and reporting.
  • Perform essential database administration tasks, including user management, permissions (GRANT/REVOKE), and backups.
  • Set up and secure a MySQL server on a real-world Linux cloud environment.
  • Understand and apply database normalization principles (1NF) to prevent data redundancy and ensure data integrity.
  • Recover a lost root password and perform database migrations using the mysqldump utility.

Course content

1 section • 25 lectures • 9h 55m total length
  • Introduction to the DBMS Course and Instructor2:59

    In this session, the DBMS and RDBMS foundation program is officially kicked off. The instructor, Vimal Daga, introduces the course, which will center on MySQL version 8 and MariaDB. To build confidence in the course content, he shares his extensive 20-year background in a wide array of database technologies, including both SQL (Oracle, PostgreSQL) and NoSQL (MongoDB, Cassandra), highlighting the depth of experience he brings to the training.

    Key topics covered include:

    • Course welcome and introduction to the DBMS/RDBMS program.

    • Overview of technologies to be covered: MySQL 8 and MariaDB.

    • Instructor's background and expertise in various database technologies.

    • The importance of a strong database foundation in a modern tech career.

    By the end of this introductory segment, participants will be familiar with the instructor's credentials and the scope of the course, understanding that it will provide a solid, practical foundation in RDBMS using industry-relevant tools.


  • Course Agenda, Prerequisites, and the Importance of a Strong RDBMS Foundation25:53

    This session details the course's structure and philosophy, emphasizing its 100% practical, project-based approach with no prerequisites. The instructor explains why a solid understanding of RDBMS is a critical foundation for any tech career, including roles in NoSQL, full-stack development, and data science. A high-level agenda is presented, covering core concepts like database design, normalization, relationships, and ACID compliance, illustrating their importance with real-world examples like LinkedIn.

    Key topics covered include:

    • Course philosophy: 100% practical, zero prerequisites, and industry-focused.

    • The universal need for RDBMS knowledge across tech roles (Developers, Data Engineers, DBAs).

    • Why RDBMS concepts (normalization, modeling, indexes) are vital for mastering NoSQL databases.

    • High-level overview of key topics: database design, normalization forms, relationships, constraints, and ACID properties.

    • The role of databases in powering everyday applications like social media.

    Upon completing this segment, learners will grasp the course's practical nature and the critical importance of mastering RDBMS fundamentals, regardless of their specific career path in technology. They will have a clear roadmap of the essential concepts that will be covered.


  • Fundamentals of Data Storage and the Need for Structure21:31

    This session delves into the basics of data storage, contrasting temporary storage in memory (RAM) with permanent storage on a hard disk. It establishes that permanent data must reside in files within directories. Through a practical example, the instructor illustrates the chaos of unstructured data in a file and methodically builds a structured, table-like format using headers, rows, and delimiters to bring order. This process highlights the limitations of manual data organization, where a lack of standardization makes querying and analysis difficult.

    Key topics covered include:

    • The difference between memory (RAM) and storage (hard disk).

    • The necessity of files and directories for permanent data storage.

    • Illustrating the problem with unstructured vs. structured data.

    • Defining key terms: columns (fields) and rows (records/tuples).

    • The challenge of non-standardized data formats in manual systems.

    By the end of this session, participants will understand why simply storing data in a file is insufficient for real-world applications and will recognize the fundamental need for a standardized, structured system to ensure data is organized, manageable, and useful.


  • From Manual Files to a Standardized DBMS and SQL22:17

    This session bridges the gap between manual data organization and professional database management. It explains that relying on custom code for every query is inefficient and non-standardized. The session introduces the Database Management System (DBMS) as the standardized solution and SQL (Structured Query Language) as the universal language for querying data without programming. Key analogies are drawn: a database table is like a file, and a database itself is like a directory. The session also introduces the 2-tier client-server architecture, explaining how clients connect to a database server over a network.

    Key topics covered include:

    • The limitations of custom programming for data queries.

    • The need for a standardized system (DBMS) and a standard query language (SQL).

    • Mapping concepts: table to file, database to directory.

    • Introduction to client-server architecture in databases.

    • Understanding IP addresses and port numbers (e.g., MySQL's default port 3306).

    After this session, learners will understand why a DBMS is the industry standard for data management, appreciate the power of SQL for querying, and grasp the fundamental client-server architecture that enables database interactions.

  • Practical Guide to Installing MySQL Server and Workbench23:25

    This session provides a detailed, step-by-step walkthrough of setting up a complete MySQL development environment on a Windows machine. The instructor guides users through downloading the MySQL Community Installer, selecting the necessary components (MySQL Server and MySQL Workbench), and configuring the server. Key configuration steps, such as setting the root password and network port, are clearly explained. The session concludes by launching the MySQL Workbench client and successfully establishing a connection to the newly installed database server.

    Key topics covered include:

    • Downloading the MySQL Installer from the official website.

    • Customizing the installation to include MySQL Server and MySQL Workbench.

    • Step-by-step configuration of the MySQL Server.

    • Understanding the role of the 'root' user and setting its password.

    • Launching MySQL Workbench and creating a new server connection.

    By following this session, participants will have a fully functional MySQL server and client tool installed on their local machine, making them ready to start creating databases, tables, and running SQL queries in the subsequent sessions.

  • Writing Your First SQL Queries: DDL and DML Basics30:27

    In this hands-on session, participants write their first SQL queries using MySQL Workbench. The session covers the essential commands from both Data Definition Language (DDL) and Data Manipulation Language (DML). The instructor demonstrates how to create and manage databases and tables, define columns with appropriate data types (INTEGER, CHAR), and insert data. Key commands like CREATE, USE, SHOW, INSERT, and SELECT are explained and executed, providing a practical introduction to interacting with a relational database.

    Key topics covered include:

    • DDL: Creating a database (CREATE DATABASE), selecting it (USE), and creating a table (CREATE TABLE).

    • Defining table schema: specifying column names and data types.

    • DML: Inserting data into a table (INSERT INTO) and retrieving it (SELECT * FROM).

    • Understanding SQL syntax, including the use of semicolons and quoting strings.

    • Viewing table structure with the DESCRIBE command.

    • How the database enforces data type and size constraints during insertion.

    After this session, learners will have practical experience with the most fundamental SQL commands. They will be able to create a database, define a table structure, insert data, and retrieve that data, forming a solid foundation for more advanced database operations.


  • Database Planning, Schema Design, and SQL Language Categories12:32

    This session emphasizes the critical role of planning in database design. The concept of a schema is introduced as the blueprint for the entire database, dictating how data is organized and stored. The instructor explains how thoughtful schema design prevents future issues with performance and data integrity. The session also formally categorizes SQL commands into DDL (for defining structure) and DML (for manipulating data) and distinguishes between 2-tier and 3-tier application architectures. Finally, the commands for deleting database objects (DROP) are demonstrated.

    Key topics covered include:

    • The importance of planning and designing a database schema.

    • Distinguishing between 2-tier and 3-tier architectures.

    • Formal classification of SQL: DDL (CREATE, DROP) vs. DML (INSERT, SELECT).

    • Deleting database objects using DROP TABLE and DROP DATABASE.

    • Understanding that a good schema is crucial for the long-term health of an application.

    By the end of this session, participants will understand that creating a database is more than just writing CREATE TABLE commands. They will appreciate the importance of strategic planning (schema design) and will be able to categorize SQL commands based on their function, providing a more structured understanding of the language.


  • Designing a Database and a First Look at Normalization20:03

    This session transitions to the core topic of effective database design by tackling a real-world scenario: managing student course registrations. A single table is created to store all related information, introducing new data types like ENUM and DECIMAL. However, this initial design is immediately used to demonstrate common pitfalls, such as data redundancy and the risk of inconsistencies. This practical example serves as the foundation for explaining why normalization is a crucial process for creating efficient and reliable databases.

    Key topics covered include:

    • Introduction to the concept of database design.

    • Practical example: creating a single table for students and their course purchases.

    • Using new data types: ENUM for predefined choices and DECIMAL for currency.

    • Identifying the problems with a single-table approach: redundancy and update anomalies.

    • Setting the stage for normalization as the solution.

    After this session, learners will recognize the inherent flaws in a naive, single-table database design. They will understand the practical problems that arise from data redundancy and be prepared to learn about normalization as the systematic approach to solving these issues.


  • Exposing Design Flaws with SQL Queries and Analysis21:40

    This session uses practical SELECT queries with WHERE clauses to expose the severe consequences of a poor database design. By filtering and aggregating data from the single students table, the instructor demonstrates how data duplication, inconsistent entries, and update anomalies lead to factually incorrect analytical results. These failed queries serve as powerful evidence that simply having data in a table is not enough; the data must be organized efficiently to ensure integrity and provide reliable business intelligence.

    Key topics covered include:

    • Advanced SELECT queries with filtering using the WHERE clause.

    • Performing aggregations like COUNT() and SUM().

    • Demonstrating how data duplication leads to incorrect analytical reports.

    • Showing how inconsistent data entry breaks queries.

    • Illustrating storage inefficiency due to redundant data.

    • Reinforcing the need for a better design to ensure data integrity.

    By the end of this session, participants will have witnessed firsthand how a poorly designed database can produce misleading and incorrect information. They will understand the critical importance of data integrity and be motivated to learn the principles of normalization to build robust and reliable database systems.


  • Introduction to Normalization and Ensuring Record Uniqueness27:29

    This session formally introduces normalization as the solution to the database design flaws discussed previously. The primary focus is on tackling data duplication. The instructor explores using a UNIQUE constraint as a potential solution but demonstrates its limitations in a real-world scenario. This leads to a foundational principle of database design: every single record must be uniquely identifiable. The session concludes by proposing the addition of an "Order ID" column with auto-incrementing, unique values to solve this problem, paving the way for the concept of a primary key.

    Key topics covered include:

    • Defining normalization as a process for efficient data organization.

    • The goal: eliminating redundancy and improving data integrity.

    • Attempting to solve duplication with the UNIQUE constraint and understanding its shortcomings.

    • The critical need for a unique identifier for every row in a table.

    • Introducing the concept of an auto-incrementing ID column (AUTO_INCREMENT).

    After this session, learners will understand the first major goal of normalization—eliminating record duplication. They will grasp the importance of having a unique identifier for every row and see how an auto-incrementing ID column serves as a robust mechanism to achieve this.


  • Relational Design: Decomposing Tables with Primary and Foreign Keys11:42

    This session introduces the core principle of relational database design: decomposition. To solve the remaining issue of data redundancy within columns, the instructor proposes breaking the single, monolithic table into smaller, specialized tables for courses and students. This introduces two of the most important concepts in RDBMS: the Primary Key, which uniquely identifies a record within its own table, and the Foreign Key, which links a record in one table to a record in another. This structure ensures data is stored centrally and consistently.

    Key topics covered include:

    • The concept of decomposition: splitting one large table into multiple smaller ones.

    • Defining the Primary Key as the unique identifier for a row in a table.

    • Defining the Foreign Key as a field that references a primary key in another table, creating a relationship.

    • How this design solves data redundancy and update anomalies.

    • The principle of storing a piece of information in only one place.

    By the end of this session, participants will understand the fundamental mechanics of a relational database. They will be able to define primary and foreign keys and explain how decomposing a large table into smaller, linked tables creates an efficient, reliable, and scalable database structure.


  • Designing a Three-Table Relational Schema (RDBMS)20:28

    This session brings the relational theory into practice by designing a complete, normalized three-table schema consisting of students, courses, and orders. The orders table acts as a crucial link, using foreign keys to connect students to the courses they purchase. The instructor explains how this structure separates concerns, making the database highly efficient for different types of queries. This design, with its interconnected tables, is presented as the definitive example of a Relational Database Management System (RDBMS).

    Key topics covered include:

    • Designing a normalized schema with three tables: students, courses, and orders.

    • Understanding the role of an association/junction table (orders).

    • Implementing primary keys in each table for unique identification.

    • Using foreign keys in the orders table to establish relationships.

    • Defining RDBMS as a system built on these inter-table relationships.

    After this session, learners will have a clear mental model of a properly designed relational database. They will understand how to separate data into logical tables and use primary and foreign keys to connect them, forming the foundational knowledge for building any robust RDBMS application.


  • Defining and Understanding the First Normal Form (1NF)10:43

    This session provides a formal definition and practical explanation of the First Normal Form (1NF), the foundational rule of database normalization. The instructor breaks down the two essential requirements for 1NF: every table must have a primary key, and every column must contain atomic (single) values. He uses a clear example to show why storing multiple values in a single cell (e.g., "ML, DevOps") breaks queries and leads to incorrect analytics, reinforcing the need to store each piece of information in its own row.

    Key topics covered include:

    • Formal definition of First Normal Form (1NF).

    • Rule 1: The necessity of a primary key to eliminate duplicate rows.

    • Rule 2: The requirement for atomic values in each column.

    • Demonstrating how non-atomic values lead to incorrect query results.

    • Emphasizing that normalization is about logical design rather than academic rule-following.

    By the end of this session, participants will be able to clearly define the First Normal Form and apply its principles. They will understand why ensuring unique rows and atomic values is the first and most critical step toward building a reliable and analyzable database.


  • Practical Implementation of a Normalized RDBMS Schema in SQL40:13

    This final session brings everything together with a complete, hands-on implementation of the normalized three-table schema in MySQL. The instructor meticulously writes the CREATE TABLE statements for the students, courses, and orders tables, demonstrating the syntax for PRIMARY KEY, FOREIGN KEY, AUTO_INCREMENT, NOT NULL, and UNIQUE constraints. After creating the structure, sample data is inserted to populate the database. The session concludes with a look at the resulting clean, efficient data structure, setting the stage for learning how to query across these related tables using joins.

    Key topics covered include:

    • Writing CREATE TABLE statements with PRIMARY KEY and AUTO_INCREMENT.

    • Understanding the difference between VARCHAR and CHAR data types.

    • The complete SQL syntax for creating FOREIGN KEY relationships between tables.

    • Using the DATETIME data type for timestamps.

    • Inserting data into a multi-table, relational database.

    • Recapping the concept of a database schema as the final implemented plan.

    Upon completing this session, participants will have successfully built a fully normalized, relational database from scratch. They will have practical experience with the SQL syntax for creating tables and defining the primary and foreign key relationships that form the backbone of an RDBMS.


  • Setting Up MySQL on a Linux Cloud Server26:12

    In this session, the instructor demonstrates how to set up a MySQL database server on a Red Hat Linux operating system hosted on the AWS cloud. The rationale for this environment is explained, emphasizing its prevalence in real-world applications and the need to understand remote connectivity over the internet. The process covers launching a cloud instance, installing the MySQL server software, starting the service, and performing an initial local connection using the command-line client to run basic SQL commands.

    Key topics covered include:

    • Launching a Red Hat Linux instance on AWS EC2.

    • Connecting to the Linux server using SSH.

    • Installing the MySQL server package using the yum command.

    • Starting and checking the status of the MySQL service.

    • Connecting to the database locally as the root user.

    • Running fundamental SQL commands like CREATE DATABASE, CREATE TABLE, INSERT, and SELECT.

    • Understanding the physical file location for MySQL data on a Linux system (/var/lib/mysql).

    By the end of this session, learners will be able to provision a Linux server in a cloud environment, install and run a MySQL database on it, and connect locally to perform basic database operations, providing a foundation for real-world server management.


  • Initial MySQL Security and Remote Configuration27:57

    This session focuses on the essential first steps of securing a new MySQL installation and enabling remote connections. The instructor illustrates how default settings prevent remote access by attempting to connect from MySQL Workbench, which fails. The session then introduces the mysql_secure_installation script, a command-line utility used to set a root password, remove insecure default settings like anonymous users and test databases, and disallow remote root login.

    Key topics covered include:

    • Demonstrating the default restriction on remote database connections.

    • The importance of creating dedicated users instead of using the administrative root account.

    • Running the mysql_secure_installation utility for initial hardening.

    • Setting a strong password for the root user.

    • Removing anonymous user accounts to prevent unauthenticated access.

    • Disabling remote login for the root account as a security best practice.

    • Understanding the concept of two-tier architecture where a client connects directly to the database.

    Upon completing this segment, participants will know how to perform a basic security audit and lockdown of a fresh MySQL server, securing the root account and preparing the environment for creating less-privileged users for applications and remote access.


  • User Management and Permissions26:40

    This session provides a comprehensive guide to user and permission management in MySQL. The instructor explains how MySQL stores user credentials and privileges, emphasizing the importance of the host setting for controlling access from specific IP addresses. The session walks through creating a new user, granting them specific permissions on a database using the GRANT command, and later revoking those permissions with REVOKE. This is demonstrated by successfully connecting remotely from MySQL Workbench with the newly created user.

    Key topics covered include:

    • Querying the internal mysql.user table to view existing users and their host permissions.

    • Creating new users with the CREATE USER command, specifying the username and allowed host ('user'@'localhost' or 'user'@'ip_address').

    • Assigning specific privileges like SELECT and INSERT using the GRANT statement.

    • Granting comprehensive access with GRANT ALL PRIVILEGES.

    • Removing user permissions with the REVOKE command.

    • Verifying a user's current permissions with SHOW GRANTS.

    • Successfully establishing a remote connection using the newly configured user account.

    After this session, learners will be able to create and manage user accounts effectively, implement access control based on network location, and assign granular permissions, which are critical skills for maintaining a secure, multi-user database environment


  • Designing and Populating the Database Schema for Joins34:22

    This session focuses on preparing the database schema required to demonstrate and practice SQL joins. The instructor recreates the three-table model: students, courses, and orders. Detailed explanations are given for creating tables with appropriate constraints like PRIMARY KEY, NOT NULL, UNIQUE, and AUTO_INCREMENT. The session concludes by populating the tables with sample data and explaining how foreign keys in the orders table establish crucial relationships with the students and courses tables.

    Key topics covered include:

    • An overview of Data Control Language (DCL) commands like GRANT and REVOKE.

    • Recreating the students and courses tables with various constraints.

    • Inserting sample data into the primary tables.

    • Using the DISTINCT keyword to retrieve unique values from a column.

    • Creating the orders table and defining FOREIGN KEY constraints to link to other tables.

    • Using the NOW() function to insert the current timestamp into a record.

    • A detailed explanation of how foreign keys create a relational link between tables.

    By completing this session, participants will have a fully functional, populated, and relational database schema. They will understand the structure and the relationships between the tables, providing the necessary context to learn about advanced queries and joins in the following sessions.


  • Basic Data Retrieval, Filtering, and Ordering33:36

    In this session, the instructor demonstrates how to query the populated orders table using various retrieval, sorting, and filtering techniques, with a special focus on date and time manipulation. The concept of a one-to-many relationship is reinforced by adding multiple orders for a single course. Learners are taught how to control the presentation of query results using clauses like ORDER BY for sorting, LIMIT for restricting the number of rows, and OFFSET for pagination.

    Key topics covered include:

    • Inserting records to demonstrate a one-to-many relationship.

    • Sorting query results in ascending or descending order with ORDER BY.

    • Using LIMIT to fetch the top N records.

    • Implementing pagination by combining LIMIT and OFFSET.

    • Extracting specific parts of a timestamp using DATE(), MONTH(), and YEAR() functions.

    • Filtering records based on a date range with the BETWEEN operator.

    • Highlighting the challenge of getting human-readable data (e.g., student names) from the orders table, setting the stage for joins.

    After this session, learners will be proficient in ordering, limiting, and paginating query results. They will be able to perform sophisticated filtering based on date and time values and will clearly understand the practical problem that SQL joins are designed to solve.


  • Mastering the INNER JOIN11:27

    This session provides a detailed, practical introduction to the INNER JOIN, the most common type of join in SQL. The instructor begins by showing the result of a meaningless cross join (joining without a condition) and then contrasts it with a proper INNER JOIN that connects the orders and courses tables based on their shared course_id. The focus is on using the ON clause to specify the relationship and selecting specific columns from both tables to create a unified, meaningful report.

    Key topics covered include:

    • Understanding the syntax and purpose of INNER JOIN (or JOIN).

    • Using the ON clause to define the matching condition between two tables.

    • Observing how INNER JOIN returns only the records that have a match in both tables.

    • Selecting specific columns from each table using the table_name.column_name syntax.

    • Combining JOIN with WHERE clauses to apply additional filters to the result set.

    • Applying aggregate functions like SUM() and COUNT() to analyze the joined data.

    • Building a complex query to answer a business question, such as calculating revenue for a specific course in a given year.

    Upon completing this session, participants will have mastered the INNER JOIN and will be able to confidently combine data from multiple tables, select relevant information, and perform further analysis to generate powerful insights and reports.


  • Modifying Tables and Data (ALTER, UPDATE, DELETE)27:54

    This session covers essential commands for modifying a database's structure and its data. The instructor demonstrates how to use ALTER TABLE to add or remove columns from an existing table. The session then shifts to data manipulation, explaining how to use the UPDATE and DELETE commands. A strong emphasis is placed on the critical importance of the WHERE clause to prevent accidental data loss, and MySQL's "safe update mode" is explained as a protective feature. Finally, the difference between DELETE and TRUNCATE is clarified.

    Key topics covered include:

    • Adding and dropping columns from a table using ALTER TABLE.

    • Updating records with the UPDATE ... SET command.

    • Understanding MySQL's "safe update mode" to prevent updates/deletes without a WHERE clause.

    • Deleting specific rows using DELETE FROM ... WHERE.

    • The function of TRUNCATE TABLE to quickly remove all rows from a table.

    • A comparison of DELETE (slower, transactional, row-by-row) versus TRUNCATE (faster, non-transactional, resets auto-increment).

    • Revisiting how a normalized design allows for centralized updates (e.g., changing a course name in one table).

    By the end of this session, learners will be skilled in altering table structures and safely manipulating data using UPDATE, DELETE, and TRUNCATE. They will understand crucial safety mechanisms and the distinct use cases for different data removal commands.


  • Conceptual Overview of Different Join Types32:01

    This session provides a high-level, conceptual explanation of the different types of SQL joins, moving beyond the INNER JOIN. Using Venn diagrams as a visual aid, the instructor clarifies the logical differences between INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN. The importance of database normalization for creating an efficient and reliable relational structure is also reinforced. The session introduces practical techniques like table aliases to make complex join queries more readable.

    Key topics covered include:

    • The benefits of normalization in database design.

    • A conceptual breakdown of join types using Venn diagrams:

      • INNER JOIN: The intersection, showing only matching records.

      • LEFT JOIN: All records from the left table, plus any matches from the right.

      • RIGHT JOIN: All records from the right table, plus any matches from the left.

      • FULL JOIN: A complete union of all records from both tables.


    • Using table aliases (e.g., FROM orders AS o) to simplify query syntax.

    • A demonstration of writing an inner join query with aliases and additional WHERE and ORDER BY clauses.

    After completing this session, participants will have a solid conceptual framework for understanding the various types of SQL joins. They will be able to choose the correct join for different data retrieval scenarios and write cleaner, more maintainable queries using table aliases.


  • Multi-Table Joins and Introduction to Subqueries30:00

    This session advances the topic of joins by demonstrating how to connect three tables (orders, courses, and students) in a single query to build a comprehensive report. This technique allows for the retrieval of related information from across the database. The session then introduces powerful filtering methods, including the IN operator and the LIKE operator for pattern matching. Finally, it introduces the concept of subqueries (or nested queries), where the output of one query is used as a dynamic filter for another.

    Key topics covered include:

    • Joining three tables by chaining multiple JOIN clauses.

    • Selecting columns from all joined tables to create a detailed, human-readable output.

    • Filtering with the IN operator to match values against a list.

    • Performing pattern matching on strings using the LIKE operator with wildcards (%, _).

    • Defining and using subqueries within a WHERE clause.

    • Constructing a practical query to find students who purchased courses that meet a dynamically determined criteria (e.g., price above a certain value).

    By the end of this session, learners will be able to construct complex queries joining three or more tables. They will also understand and be able to implement subqueries to solve advanced data retrieval problems that require multi-step logic.


  • Data Aggregation and Advanced Querying24:09

    This session delves into data aggregation and summarization using the GROUP BY clause. The instructor demonstrates how to group rows that have the same values in specified columns into summary rows, and then perform calculations on them using aggregate functions like COUNT(). The HAVING clause is introduced as a way to filter these aggregated results. The session also covers the use of aliases for calculated columns and touches on common string and utility functions to manipulate data within a query.

    Key topics covered include:

    • Reinforcing the use of non-correlated subqueries for dynamic filtering.

    • Summarizing data with the GROUP BY clause.

    • Using COUNT() and other aggregate functions to perform calculations on grouped data.

    • The difference between WHERE (filters before grouping) and HAVING (filters after grouping).

    • Assigning custom names to output columns using aliases (AS).

    • Manipulating string data with functions like SUBSTRING() and UPPER().

    • An introduction to the mysqldump command-line utility for database backups.

    After this session, participants will master data aggregation techniques with GROUP BY and HAVING, enabling them to generate summary reports and analytics. They will also be familiar with common SQL functions and the fundamental administrative task of creating database backups.


  • Database Administration: Backups, Restores, and Password Recovery29:50

    This final technical session focuses on essential database administration tasks. The instructor provides a practical, command-line demonstration of using the mysqldump utility to export (backup) a database and the mysql client to import (restore) it. Various mysqldump options are explored to perform different types of backups, such as schema-only or data-only. The session concludes with a critical recovery procedure: how to reset a lost root user password by starting the MySQL server in a special mode that bypasses permission checks.

    Key topics covered include:

    • Exporting a full database backup to a .sql file with mysqldump.

    • Restoring a database from a .sql file.

    • Using mysqldump options for selective backups (--all-databases, --no-data, --no-create-info).

    • Changing a user password with ALTER USER when logged in.

    • The complete process for resetting a lost root password:

      1. Stop the MySQL service.

      2. Modify the configuration file to start with --skip-grant-tables.

      3. Restart the service and connect without a password.

      4. Manually update the user table to set a new password.

      5. Revert the configuration changes and restart the service normally.

    By the end of this session, learners will be equipped with vital DBA skills, including how to reliably back up and restore their databases and how to perform a critical password recovery operation, ensuring they can manage and protect their database environments.


Requirements

  • No prior database or SQL knowledge is required. This course is designed for absolute beginners.

Description

In today's data-driven world, mastering databases isn't just a skill—it's a necessity for any tech professional. But where do you start? The world of databases can seem complex, with concepts like normalization, keys, and joins feeling intimidating.

This course is your complete, step-by-step guide to mastering MySQL and the principles of Relational Database Management Systems (RDBMS) from scratch. Designed with a 100% practical, hands-on approach, this course requires absolutely no prior experience. We start with the absolute basics: understanding why we need databases and how to set up your own professional development environment on both Windows and a real-world Linux cloud server.

Then, you'll dive deep into the art of database design—the most critical skill for building scalable and reliable applications. You will learn how to identify design flaws, apply normalization principles to eliminate data redundancy, and build a clean, efficient schema using primary and foreign keys.

Once your foundation is solid, you'll write your first SQL queries and progress to advanced topics. The course then accelerates into complex queries, teaching you how to use multi-table JOINs, subqueries, and data aggregation to extract powerful business insights.

Finally, you'll step into the shoes of a Database Administrator (DBA), learning to manage users, set permissions, perform critical backups and restores with mysqldump, and even recover a lost root password.

By the end of this course, you won't just know SQL commands; you'll understand how to think like a database professional, capable of designing, managing, and querying robust database systems for any application.


Who this course is for:

  • Aspiring software developers, backend engineers, and full-stack developers who need to understand how to design and interact with databases.
  • Data analysts and business intelligence professionals looking to build a strong SQL foundation for data extraction and reporting.
  • IT students and professionals who are transitioning into a data-centric or development role.
  • DevOps engineers and system administrators who need to manage and secure database servers.
  • Anyone who wants to learn the fundamentals of relational databases and SQL from the ground up to build robust, scalable applications.