You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Database Table Name, RESTful API Endpoint, and Entity Class Name
Jason Yang edited this page Oct 6, 2023
·
3 revisions
When building applications, especially using ORM (Object-Relational Mapping) frameworks like Hibernate/JPA in Spring Boot, it's common to follow certain naming conventions.
Database Table Name
Typically, table names are plural (e.g., users). This is because a table holds multiple records of that entity.
RESTful API Endpoint
RESTful resource names are typically plural. This is because the resource usually represents a collection of entities. For example:
GET /users: Retrieves a list of users.
GET /users/{id}: Retrieves a specific user by ID.
Entity Class Name
Entity class names are typically singular because an instance of the class represents a single entity.