The best way would be to perform join at the database, the classical way is when we have two tables that we can bring together by making placing a join component between them. Alternately we can write a query to make the join at the level of a database. The advantage is that only one hit is sent to the database instead of two (the classical method). This makes a real difference in improving performance.