This repository contains SQL scripts for creating and managing databases, tables, and performing various operations on them. The project focuses on working with bands, albums, and songs, as well as exploring SQL commands and queries.
This script includes:
- Creation of
Bands
andAlbums
tables. - Insertion of sample data for bands and albums.
- Queries to retrieve, update, and delete data.
- Examples of SQL joins, aggregate functions, and filtering.
- Demonstrates database creation and deletion.
This script expands on the Bands
and Albums
database by:
- Adding a
Songs
table with relationships to albums. - Inserting detailed data for bands, albums, and songs.
- Advanced queries, including joins, grouping, and aggregate functions.
- Examples of filtering, ordering, and handling NULL values.
This script demonstrates:
- Creation of a
TestTable
and altering its structure. - Creation of a modified
Albums
table with arelease_year
as a date. - Insertion of sample data for bands, including superhero-themed names.
- Queries using
LIKE
for pattern matching and ordering results.
This script includes:
- Creation of a
DEMO
table with sample data. - Insertion, updating, and deletion of records.
- Demonstrates the use of
SHOW TABLES
,DROP TABLE
, andDELETE
commands.
- Database Management: Scripts to create, use, and drop databases.
- Table Operations: Create, alter, and drop tables.
- Data Manipulation: Insert, update, and delete records.
- Advanced Queries: Joins, grouping, ordering, and filtering.
- Sample Data: Predefined data for bands, albums, and songs.
- Open any SQL client (e.g., MySQL Workbench, phpMyAdmin).
- Copy and execute the scripts in the desired order.
- Explore the queries and modify them as needed.
This project is open-source and available for educational purposes.