https://github.com/tom474/learn_sql_rmit
[RMIT 2023A] ISYS3414 - Practical Database Concepts - Learning Resources
https://github.com/tom474/learn_sql_rmit
database mysql
Last synced: over 1 year ago
JSON representation
[RMIT 2023A] ISYS3414 - Practical Database Concepts - Learning Resources
- Host: GitHub
- URL: https://github.com/tom474/learn_sql_rmit
- Owner: tom474
- Created: 2024-07-03T06:11:25.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-29T08:50:01.000Z (over 1 year ago)
- Last Synced: 2025-01-29T09:38:26.560Z (over 1 year ago)
- Topics: database, mysql
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Learn SQL from RMIT
This repository is designed for learning **SQL** using **MySQL**. It contains structured SQL scripts to help beginners and intermediate learners understand database creation, data manipulation, queries, and best practices.
## Tech Stack
- MySQL
## Content
This repository provides hands-on practice with SQL concepts through real-world database examples. Below are the key topics you will learn:
### 1. **Database Creation & Table Management**
- How to create databases and tables (`CREATE TABLE`).
- Setting **primary keys** and **foreign keys**.
- Using constraints (`UNIQUE`, `NOT NULL`, `CHECK`, etc.).
- Modifying tables using `ALTER TABLE`.
### 2. **Data Insertion, Modification & Deletion**
- Inserting records (`INSERT INTO`).
- Updating existing data (`UPDATE`).
- Deleting records (`DELETE`).
### 3. **Querying Data with SELECT**
- Retrieving all data (`SELECT * FROM table`).
- Filtering with `WHERE`, `BETWEEN`, `IN`, `LIKE`.
- Sorting results using `ORDER BY`.
- Limiting results with `LIMIT`.
### 4. **Aggregate Functions & Grouping**
- Using `SUM()`, `AVG()`, `COUNT()`, `MIN()`, `MAX()`.
- Grouping data with `GROUP BY`.
- Filtering groups using `HAVING`.
### 5. **Joins & Relationships**
- **INNER JOIN** to combine related tables.
- **LEFT JOIN** & **RIGHT JOIN** for partial data retrieval.
- **SELF JOIN** for hierarchical data relationships.
### 6. **Subqueries & Nested Queries**
- Writing subqueries in `SELECT`, `FROM`, `WHERE` clauses.
- Using correlated subqueries for advanced filtering.
### 7. **Views & Indexing**
- Creating **views** for simplified querying (`CREATE VIEW`).
- Implementing **indexes** to optimize query performance.
### 8. **Stored Procedures & Transactions**
- Automating SQL tasks using **stored procedures**.
- Ensuring data consistency with **transactions**.
### 9. **Handling Integrity Constraints**
- Understanding `FOREIGN KEY` dependencies.
- Preventing duplicate data with `UNIQUE`.
- Managing **ON DELETE CASCADE** & **ON UPDATE CASCADE**.
### 10. **Practical Case Studies**
- **Cinema Database**: Learn how to store and analyze movie reviews.
- **Companies Database**: Understand salaries, departments, and promotions.
- **Schools Database**: Track students, courses, and enrollments.
- **Supermarket Database**: Manage customers, orders, and inventory.