Skip to content

About

Topic-wise MySQL learning repository featuring explanations, practical queries, sample outputs, executable SQL scripts, database design notes, and interview practice.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Database

Complete Beginner-to-Advanced Learning Repository

Learn · Practise · Query · Revise · Prepare for Interviews

A topic-wise MySQL learning repository with explanations, practical queries, sample outputs, executable SQL scripts, relational database design notes, and interview practice.

Database Language Documentation Source Code Level

GitHub Stars GitHub Forks Last Commit Repository Size License


📌 About This Repository

This repository organizes MySQL learning material into numbered Markdown lessons and executable .sql files.

Each lesson explains the concept, syntax, practical use, and examples. Query exercises state the question first, followed by the MySQL query and a representative result.

The topic order follows the organization of the author's Oracle SQL repository while adapting syntax and behavior to MySQL. Oracle-specific differences are identified where they help learners transition between the two systems.

Repository Highlights

  • Topic-wise MySQL learning documentation.
  • Beginner-to-advanced SQL concepts.
  • Practical SQL queries and examples.
  • Executable MySQL scripts.
  • Query exercises with representative outputs.
  • Database design and relational model concepts.
  • ER diagrams and normalization.
  • Oracle SQL and MySQL syntax comparisons.
  • MySQL interview questions and answers.
  • Structured learning and revision resources.

📂 Repository Structure

Path Purpose
01-Introduction-to-MySQL.md Database history, DBMS, RDBMS, SQL and MySQL
02-MySQL-Data-Types.md Data type categories, ranges and examples
03-Retrieving-Data-SELECT-Statement.md SELECT, projection, filtering and DISTINCT
04-Case-Sensitivity-in-MySQL.md Identifier case, string comparisons and collations
05-Constraints-in-MySQL.md NOT NULL, UNIQUE, CHECK, DEFAULT, PK and FK
06-Tables-in-MySQL.md CREATE, ALTER, DESCRIBE, DROP and TRUNCATE
07-Operators-in-MySQL.md Arithmetic and relational operators
08-Column-Aliases-and-Concatenation.md Aliases, CONCAT and expressions
09-DUAL-Table-and-Expressions.md Literal expressions and Oracle DUAL differences
10-Keywords-as-Operators.md DISTINCT, BETWEEN, IN, IS NULL and related predicates
11-Like-Operator-and-Logical-Operators/ LIKE patterns and AND/OR/NOT
12-ORDER-BY-Clause.md Sorting query results
13-Functions/ Character, numeric, date, conversion and aggregate functions
14-GROUP-BY-Clause.md Grouping rows and aggregate calculations
15-HAVING-Clause.md Filtering groups
16-Subqueries-or-Nested-Queries.md Scalar, multi-row and correlated subqueries
17-Joins/ INNER, OUTER, CROSS and self joins
18-Commands/ DDL, DML, TCL, DCL and SELECT
19-Miscellaneous-Queries.md Mixed practice questions
20-Database-Objects/ Views, indexes, procedures, triggers, events
21-Difference-Between-Oracle-and-MySQL.md Practical syntax comparison
22-ER-Diagrams/ ER basics, case study and schema
23-Normalization.md 1NF, 2NF, 3NF and BCNF
24-Relational-Model-Assignment-Queries.md Relational model and SQL assignments
25-MySQL-Interview-Questions-and-Answers.md Interview revision
Source-Code/ Numbered, runnable MySQL scripts

🗺️ Recommended Learning Order

Follow this sequence to build your MySQL knowledge progressively.

  1. Read the numbered topic file.
  2. Open the related script in Source-Code/.
  3. Run the script in MySQL Workbench against a local MySQL Server.
  4. Compare the result with the expected output in the lesson.
  5. Try the practice questions without looking at the answers first.
  6. Revise the concepts before moving to the next topic.

🗃️ Sample Tables

The main practice schema uses the emp, dept, and j_grade tables from the supplied KodNest sample material.

Their MySQL definitions and INSERT statements are available in:

Source-Code/00-KodNest-Sample-Tables.sql

Additional tables such as student, station, city, and country are used only in lessons where the exercise needs them.


⚙️ MySQL Version Notes

  • Examples target modern MySQL 8.0.
  • CHECK constraints are enforced in MySQL 8.0.16 and later.
  • Window functions require MySQL 8.0 or later.
  • Some administrative statements require suitable database privileges.
  • Query behavior may vary depending on MySQL version, SQL mode, and database configuration.

🚀 Getting Started

Prerequisites

Before working with the examples, make sure you have:

  • MySQL Server installed.
  • MySQL Workbench or another MySQL-compatible SQL client.
  • Basic understanding of database concepts.
  • A system capable of running MySQL.

Clone the Repository

git clone https://github.com/smbashafsdev/9.01-MySQL-Database-Notes.git

Navigate to the Repository

cd 9.01-MySQL-Database-Notes

Open and Execute SQL Scripts

  1. Open MySQL Workbench.
  2. Connect to your local MySQL Server.
  3. Open the required .sql file from Source-Code/.
  4. Execute the SQL statements.
  5. Review the query results and understand the output.

🎯 Learning Objectives

This repository is designed to help learners:

  • Understand MySQL and relational database fundamentals.
  • Work with MySQL data types and constraints.
  • Retrieve and filter data using SELECT statements.
  • Apply SQL operators and expressions.
  • Work with character, numeric, date, conversion, and aggregate functions.
  • Group and sort query results.
  • Understand subqueries and nested queries.
  • Perform different types of SQL joins.
  • Work with DDL, DML, TCL, and DCL commands.
  • Create and manage database objects.
  • Understand relational database design.
  • Learn ER diagrams and normalization.
  • Compare Oracle SQL and MySQL.
  • Practice SQL interview questions.

💼 Interview Preparation

The repository includes MySQL interview questions and practical query exercises to support technical interview preparation.

Important preparation areas include:

  • SQL fundamentals and database concepts.
  • MySQL data types and constraints.
  • SELECT statements and filtering.
  • SQL operators and functions.
  • GROUP BY and HAVING clauses.
  • Joins and subqueries.
  • Database objects.
  • Transactions and database commands.
  • ER diagrams and normalization.
  • Practical SQL query writing.

Use the examples and exercises to strengthen both conceptual understanding and practical SQL skills.


🤝 Contributing

Contributions and suggestions are welcome!

You can contribute by:

  • Improving existing MySQL notes.
  • Adding practical SQL examples.
  • Correcting errors in queries or explanations.
  • Adding new practice questions.
  • Improving documentation.
  • Sharing useful database design examples.

Contribution Workflow

  1. Fork this repository.
  2. Clone your fork.
  3. Create a new branch.
  4. Make your changes.
  5. Commit your changes.
  6. Push your branch.
  7. Submit a Pull Request.

Example commands:

git checkout -b feature-name
git add .
git commit -m "docs: improve MySQL learning notes"
git push origin feature-name

📄 License

This project is licensed under the MIT License.

You are free to use, modify, and distribute the materials according to the terms of the license.

For additional information, refer to the LICENSE file included in this repository.


👨‍💻 Author

Shaik Mahaboob Basha

Java Full Stack Developer

Interested in Java programming, SQL, database management, and software development.

This repository is part of my learning and knowledge-sharing journey, with the goal of organizing database concepts into structured and practical learning materials.


🌐 Connect With Me


🙏 Acknowledgements

Special thanks to:

  • The MySQL Community for providing valuable learning resources.
  • Oracle and MySQL Documentation for technical references.
  • The SQL and database developer community.
  • Open-source contributors who share knowledge and support collaborative learning.
  • Developers and learners who continuously contribute to the programming community.

Learning becomes more meaningful when knowledge is shared.


🎯 Conclusion

MySQL is an essential technology for working with relational databases and building data-driven applications.

This repository provides a structured learning experience through topic-wise documentation, practical SQL queries, executable scripts, database design concepts, and interview preparation materials.

Whether you are a beginner learning SQL, a student strengthening your database fundamentals, or a developer preparing for technical interviews, these notes are designed to support your learning journey.

Consistent practice, experimentation, and revision are the keys to developing strong SQL and database management skills.


🚀 Learn SQL. Practise MySQL. Build Strong Database Skills!

Happy Learning and Keep Querying!

About

Topic-wise MySQL learning repository featuring explanations, practical queries, sample outputs, executable SQL scripts, database design notes, and interview practice.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages