How would you approach the following issue:
I'm building a web page about an artist and im creating a database that compiles the entire discography over a period of 50 years in showbusiness. The database contains all the info about albums (by albums, i mean CD, CD/DVD, cassette, 8-track, vinyl, mini-disc, etc...) If i include all the albums开发者_如何学JAVA editions and the albums singles, there is around 750 albums in total... +/- 10....
That beeing said, I'm building the artwork model and i need suggestions.
I've came up with a model and i'm not sure if there are mistakes or if it could be improve. Please, feel free to say anything so i can make it even better.
In summary, my album artwork model is as following:
1 album contains 1 front cover, and contains multiple artwork (inlay cover, disc cover, booklet images, back cover, etc...)
1 front cover only relates to 1 album. 1 artwork could relate to many albums
album: album_id, title, description, cover_id, ...
artworktype: type_id, type
artwork: artwork_id, name, description, type_id, filename
album_artwork: album_id, artwork_id, display_order
The album front cover is represented by the foreing key cover_id that relates to artwork_id in the table artwork
The rest of the artwork for the album are found in the table album_artwork. The display_order exist simply to show the rest of the artwork in a particular order in the web page.
Can this model be improve and/or is sufficient for what i'm trying to do ?
Thanks in advance
The model looks fine to me.
a few minor points:
I would keep the primary keys consistantly named so type_id would be artworktype_id
The column that holds the name of the art work type could be more descriptive perhaps description
I always try (it is not possible 100% of the time) to keep the foreign & primary keys named the same, so I would change cover_id to album_artwork_id
精彩评论