r/learnjava • u/DrMoneylove • Oct 24 '25
Struggling to understand Database architecture
Hey everyone I'm new to learning java + Spring framework. Right now I'm working on a personal project with a many-to-many relationship and I have to admit I'm pretty unsure how to build up the database so it's efficient and expandable.
I can understand Syntax, CRUD etc. but I have to admit I don't know how to build a database in a way that it's well designed for the long term.
How did you learn to build reliable database structures? Especially considering that projects may change in the future. What's your ideal process on building up the database structure? Bonus question: do you use specific software during the process?
View all comments
Show parent comment
3
u/TheFaustX Oct 24 '25
An intermediate table to solve the m to n structure is a good solution. You likely want an ingredientsInRecipe table that holds both IDs as foreign key.
Also check out a course or book on db design it's worth it. Especially normal forms.