This project demonstrates end-to-end database administration (DBA) skills across three major database systems — PostgreSQL, MySQL, and Datasette.
It covers provisioning, configuration, restoration, indexing, storage engine management, automation, and performance optimization.
This repository is structured into 3 major parts, each aligned with real-world DBA responsibilities.
This section covers:
- Created a database (
tolldata) - Restored schemas/tables using
setup.sql - Imported CSV data into PostgreSQL
- Created a user (
backup_operator) and a role (backup) - Granted privileges:
CONNECTon databaseSELECTon all tables in schema
- Performed backup using pgAdmin, exported as
tolldatabackup.tar
| File | Description |
|---|---|
postgres-setup.sh |
Script to download data and bootstrap PostgreSQL |
user-management.sql |
Role, user creation, privilege grants |
backup-commands.txt |
Commands used to perform PostgreSQL backups |
notes.md |
Detailed explanations about Part 1 tasks |
This section simulates a DBA recovering a MySQL server from a previous backup and optimizing performance.
- Restored
billingdata.sqlinto a newbillingdatabase - Calculated table data size using
information_schema.TABLES - Ran baseline performance tests
- Created an index on
billedamountto optimize queries - Verified supported storage engines (e.g., MyISAM, InnoDB)
- Wrote an automated backup script:
- Dumps all databases
- Creates dated folders under
/tmp/mysqldumps/YYYYMMDD/ - Moves the dump file inside the correct folder
| File | Description |
|---|---|
billingdata.sql |
Dataset restored into MySQL |
indexing.sql |
SQL statements for performance optimization |
storage-engines.sql |
Statements to identify MySQL storage engines |
table-size.sql |
SQL to compute table size |
mybackup.sh |
Automated MySQL full-instance backup script |
notes.md |
Documentation and explanations |
This part shifts focus to lightweight analysis tools using SQLite + Datasette, commonly used for analytics dashboards and static exploratory data tools.
- Imported
billing.csvinto SQLite (billingtable) - Verified number of rows imported
- Created a simplified view:
basicbilldetails - Ran a performance benchmark using timestamps
- Created an index on
billedamount - Re-tested performance after indexing
| File | Description |
|---|---|
billing.csv |
Raw dataset |
create-view.sql |
SQL for basicbilldetails view |
create-index.sql |
Index to speed up exact-match queries |
performance-test.sql |
Timestamp-based performance test |
notes.md |
Documentation and explanations |
This project showcases practical DBA skills:
- Role management
- Database security
- Importing structured/unstructured data
- Backup & recovery (pgAdmin / CLI)
- SQL-based data recovery
- Indexing for performance tuning
- Table size evaluation
- Storage engine management
- Bash scripting & automation (
mysqldump)
- CSV-to-table restoration
- Index creation
- Query profiling
- View creation
- PostgreSQL 13+
- MySQL Server 8+
- SQLite 3
- Datasette
- pgAdmin
- Bash scripting
- Linux CLI