REST API with Spring guide

Simple guide to help you on your web-dev journey

View the Project on GitHub KeaCluster/bookstoreAPI-spring-guide

Part 2 Database

This section will focus on:

Design

The database design for our library system revolves around three key entities:

These entities encapsulate the basic details required by our system. Relationships are structured to ensure data integrity, querying and manipulation.

According to our system’s requirements, the design will be as follows:

Entities and Relationships

Pivot tables

In addition to the previous tables, we’ll need to implement a pivot table in order to manage M:N relationshps:

ER Diagram

The ER-Diagram will help us visualize the relationship between entities in our database. In our bookstore system the ER-Diagram will look something similar to the following:

bookstoreER

Normalization

Normalization is performed to minimize redundancy and dependency. All in order to ensure a good structure and organization or the data.

There are three main steps to Normalization:

SQL Scripts

You can write (or generate) the SQL script through any tool you prefer. Stick to the previously mentioned relationships and attributes for better results.

If you’re using this as a resource, more than a guide, just remember to double check your requirements.