Top Tweets for #JoinTAB
Completed the Third Module by Coding Shuttle @sudoanuj which is based on the Relationship mapping between the tables, how JDBC and Spring Data JPA helps to map the POJO with the database. Learned Cascading and many other important concepts like pagination and projection. The homework assignment was heavily focused on the relationship mappings.
The first homework assignment was related to subject, student, department, admission record and professor which is basically a college management system where the ERD diagram was provided by @sudoanuj which made things easier. The tables have different relationships with each other. Some tables have OneToOne relationship and some have ManyToMany.
Let's Understand the annotations with examples:
1. OneToOne: A Student can have only one Admission record. So that's why a OneToOne relationship is established between these two tables.
2. OneToMany: A Professor can teach more than one subject. So there's a OneToMany relationship established between these two tables and vice versa for ManyToOne.
3. ManyToMany: Many students can be taught by many professors.
mappedBy is used to define the non-owning (inverse) side of a bidirectional entity relationship. It is present on the inverse side of the relationship, telling JPA that the other side owns the foreign key.
JsonIgnore is a Jackson library annotation used to prevent specific entity fields or relationships from being serialized into JSON. It is commonly used to hide sensitive data like passwords or to break infinite recursion loops caused by bidirectional database relationships. Heavily used in ManyToMany relationships.
JoinTable with JoinColumn defines the owning side of a ManyToMany relationship in JPA. It explicitly defines the intermediate join table and the foreign key columns used to establish the relationship between two database tables.
The second homework project was an Author and Book management system where we had to map authors and the books they published. There are only two tables in this project with a ManyToMany relationship between authors and books — because one author can write many books and one book can have many authors.
The main challenge was implementing all these APIs:
Create a new book and author
Retrieve a list of all books and authors
Retrieve a single book or author by ID
Update book and author details
Delete a book or author
Find books by title
Find books published after a certain date
Find authors by name
Find all books by a specific author
Some APIs required custom query methods in the Repository layer using Spring Data JPA's method naming conventions.
Definitely a solid project! Learned a lot in this module. Will dive more in-depth into topics like Cascading and N+1 query optimization.
#Java #SpringBoot #SpringDataJPA #BackendDevelopment #LearningInPublic #JavaDeveloper #CodingJourney
Last Seen Hashtags on Sotwe
Most Popular Users

Elon Musk 
@elonmusk
239.5M followers

Barack Obama 
@barackobama
118.5M followers

Cristiano Ronaldo 
@cristiano
114.3M followers

Donald J. Trump 
@realdonaldtrump
111.7M followers

Narendra Modi 
@narendramodi
106.9M followers

Rihanna 
@rihanna
98.6M followers

NASA 
@nasa
92M followers

Justin Bieber 
@justinbieber
91.7M followers

KATY PERRY 
@katyperry
89.9M followers

Taylor Swift 
@taylorswift13
83.9M followers

Lady Gaga 
@ladygaga
75.4M followers

Virat Kohli 
@imvkohli
73.3M followers

Kim Kardashian 
@kimkardashian
70.8M followers

YouTube 
@youtube
68.6M followers

Neymar Jr 
@neymarjr
66.3M followers

Bill Gates 
@billgates
65.1M followers

Selena Gomez 
@selenagomez
63M followers

The Ellen Show
@theellenshow
62.1M followers

CNN 
@cnn
61.6M followers

X 
@x
60.6M followers
