Accounts Artists Table

The final table required for the application is the accounts_artists table. This table allows users to add more than one artist to their account without repeating data in the database. It also enables each artist to have many fans. In other words, this table facilitates a many-to-many relationship between users and artists.

Take a look at Figure 2-13. The table is simple; only six columns (see Figure 2-13):

• created_date: Timestamp for when the entry was created

• rating: Rating of this artist

• is_fav: Flag that indicates whether this artist is on the user's favorite list

Figure 2-13. Accounts_artists table

Finally let's take a look at the complete entity relationship diagram (ERD), which shows how all the tables fit into the large picture of the application (see Figure 2-14).

Figure 2-14. Complete application ERD

Was this article helpful?

0 0

Post a comment