Week 5 Presentation

Database Design and Integration Part 2

Week 5 Presentation

Database Design and Integration Part 2

A presentation deck for Week 5 that explains the repository layer, application properties, table relationships, and integration testing in a Spring-based database application.

  • Covers the four Week 5 topics in an expanded slide deck.
  • Designed for teaching, revision, and database integration discussion.
  • Use arrow keys, buttons, or slide dots to navigate.
Slide 1 of 11 Slide deck for Week 5 delivery and revision

Focus

Week 5 Presentation

Use

Teach this page live or review it before class.

Overview

What this week is about

Week 5 is about connecting schema design to code, configuration, and testing.

  • 4.6 Repository Layer
  • 4.7 Application properties
  • 4.8 Table Relationships
  • 4.9 Testing Integration
Slide 2 of 11 Slide deck for Week 5 delivery and revision

Focus

Overview

Use

Teach this page live or review it before class.

4.6 Repository Layer

Repositories isolate persistence logic

Repositories keep data access separate from controllers and services so the application stays organized.

  • Repositories expose persistence operations as a contract.
  • Services call repositories rather than embedding SQL.
  • Spring Data JPA can generate much of the implementation.
Slide 3 of 11 Slide deck for Week 5 delivery and revision

Focus

4.6 Repository Layer

Use

Teach this page live or review it before class.

4.6 Layering

Layered architecture improves maintainability

When responsibilities are separated, each layer is easier to understand, change, and test.

  • Controllers handle HTTP requests.
  • Services handle business rules.
  • Repositories handle database access.
Slide 4 of 11 Slide deck for Week 5 delivery and revision

Focus

4.6 Layering

Use

Teach this page live or review it before class.

4.7 Application properties

Configuration lives outside the code

Application properties store database and JPA settings so environments can be changed without rewriting source code.

  • Database URLs, usernames, and passwords belong in configuration.
  • Profiles separate development, test, and production values.
  • JPA and Hibernate options can be tuned per environment.
Slide 5 of 11 Slide deck for Week 5 delivery and revision

Focus

4.7 Application properties

Use

Teach this page live or review it before class.

4.7 Environments

Profiles make deployments predictable

Different profiles let the same code run against different databases and settings safely.

  • Development can use a local database.
  • Test can use an isolated test database.
  • Production can use secure deployed settings.
Slide 6 of 11 Slide deck for Week 5 delivery and revision

Focus

4.7 Environments

Use

Teach this page live or review it before class.

4.8 Table Relationships

Relationships connect tables correctly

One-to-one, one-to-many, and many-to-many relationships define how data is linked across the schema.

  • Foreign keys connect related records.
  • Many-to-many relationships usually need a join table.
  • Good relationship design reduces duplication.
Slide 7 of 11 Slide deck for Week 5 delivery and revision

Focus

4.8 Table Relationships

Use

Teach this page live or review it before class.

4.8 Mapping

Relationship mapping shapes queries

Schema relationships should match how the application reads and writes connected data.

  • One-to-many is common for parent and child records.
  • Join tables support many-to-many links.
  • Mappings should stay consistent with the ER model.
Slide 8 of 11 Slide deck for Week 5 delivery and revision

Focus

4.8 Mapping

Use

Teach this page live or review it before class.

4.9 Testing Integration

Integration tests verify the whole path

Integration testing checks that repository, configuration, and database pieces work together as a complete flow.

  • Use test context or test database support.
  • Check real persistence behavior rather than only mocks.
  • Catch schema and query problems before release.
Slide 9 of 11 Slide deck for Week 5 delivery and revision

Focus

4.9 Testing Integration

Use

Teach this page live or review it before class.

4.9 Confidence

Testing gives safer change

When the data layer is covered by integration tests, teams can refactor with more confidence.

  • Repository tests validate the data access path.
  • Application changes stay safer after schema updates.
  • Regression risks are lower when tests are realistic.
Slide 10 of 11 Slide deck for Week 5 delivery and revision

Focus

4.9 Confidence

Use

Teach this page live or review it before class.

Recap

What students should remember

Week 5 is about the application layer around the database and how to keep it testable and maintainable.

  • Repositories isolate persistence.
  • Properties control configuration.
  • Relationships and tests keep the database layer reliable.
Slide 11 of 11 Slide deck for Week 5 delivery and revision

Focus

Recap

Use

Teach this page live or review it before class.