I’d do it the way that you’re thinking of, so that’s most likely the right way of thinking.
As for the relation between the two, there’s a few ways of doing it, but there main two that I use are:
1 – Direct one-to-one relation Best if the artworks will only ever have a single artist associated with them. The way that I do it, which isn’t stirctly the WordPress way, is to set the post_parent of the artwork to the ID of the artist.
2 – One-to-many – To do this I’d add a new table into the database with the articst ID and the artwork ID as columns. That way you can add in any combinations that are needed, so an artist can work on multiple artworks, and an artwork can be related to multiple artists.
As a note, both of these methods use custom work. There’s probably some plugins out there that could help, but I’ve just done it mysel fin the pst.
anonymized-15380454
(@anonymized-15380454)
How about:
1. Create a custom post type “artwork”.
2. Create a custom taxonomy “artwork_artist” and attach/assign the “artwork” posts to this custom taxonomy.
Example structure:
Leonardo da Vinci (a term/category in the "artwork_artist" taxonomy)
Mona Lisa ("artwork" post)
The Last Supper ("artwork" post)
Pablo Picasso (a term/category in the "artwork_artist" taxonomy)
Asleep ("artwork" post)
Bathers ("artwork" post)
For each artist, create a standard Page, and use a plugin (or write your own custom functions) to display the corresponding “artwork” posts. For example, if the Page is for “Pablo Picasso”, then display only posts in the “Pablo Picasso” term/category (refer to the above example structure).