Relational Databases
Primary Keys and Foreign Keys
Constraints
Database normalization
PostgreSQL setup
Joins
Java and databases
Practice
Assignment
Back end Track
Content
Letβs get practical
π Primary Keys and Foreign Keys β exercises
Exercise: Identify the Primary Key
Exercise: Relationships and Foreign Keys
π Constraints β exercises
Exercise: Choose the right constraint
Exercise: Spot the constraint violations (data audit)
Exercise: Design constraints for a mini schema
πΎ Database normalization β exercises
Exercise: Spot repeating groups + anomalies
Exercise: Normalize to 1NF (atomic values)
Exercise: Normalize to 2NF + 3NF (decompose)
Exercise: Functional dependencies (quick check)
π« Joins β exercises
Exercise: Album, track, and artist names
Exercise: Labels and albums
Exercise: Looking for friends
π§βπ» Java and Databases β exercises
Exercise: Set up JDBC and test the connection
Exercise: CRUD with PreparedStatement
Exercise: Mapping rows to objects (1:N)
Exercise: SQL injection awareness
Submission / self-check
- [ ] I can explain my schema design choices
- [ ] I can create a database and all its tables in PostgreSQL
- [ ] I can collect results from multiple tables in a single query via joins
- [ ] I can connect Java to Postgres and run parameterized queries
The HackYourFuture curriculum is licensed underΒ CC BY-NC-SA 4.0
*https://hackyourfuture.net/*

Built with β€οΈ by the HackYourFuture community Β· Thank you, contributors
Found a mistake or have a suggestion? Let us know in the feedback form.