Category Archives MySQL

There are a lot of articles about Hibernate associations in the internet and particularly on my blog. But JPA provides numerous combinations of associations, so it's not strange that we still see new posts about this or that kind of association. Today I want to examine situation with the @JoinTable annotation and intermediary table. For the tutorial I'll use MySQL, Hibernate as implementation of JPA and Maven.

One of goals the in programming is representation of models from the real world. Very often an application needs to model some relationship between entities. In the last article about Hibernate associations I described the rules of setting up a "one to one" relationship. Today I'm going to show you how to setup a bidirectional "one to many" and "many to one" association. This example will be based on previous Hibernate tutorials.

When I talk about SQL databases, I always mean a set of tables with some relations between them. Relations in the databases are possible due to foreign keys. In the post I'm going to make a quick overview of the set up of foreign keys in MySQL using Toad MySQL. MySQL has strict standards, so Toad MySQL shouldn't create many restrictions for porting the steps to any other MySQL development tool.