Sample Header Ad - 728x90

Does putting foreign keys in another strong entity equal bad design and what is that table?

0 votes
2 answers
166 views
I see so many tables designed like this: https://www.quackit.com/sql_server/sql_server_2016/tutorial/create_a_relationship_in_sql_server_2016.cfm enter image description here Where the foreign key is dropped into another table which in my mind is a strong entity in itself. Artists (**ArtistId**, ArtistName) Albums (**AlbumId**, AlbumName, ReleaseDate, ArtistId, GenreId) Genres (**GenreId**, Genre) This design is convenient but what is the Albums table? Is it strong, weak or a linking table? Rather I would've thought a good design is this: Artists (**ArtistId**, ArtistName) Albums (**AlbumId**, AlbumName, ReleaseDate) Genres (**GenreId**, Genre) ArtistCreatedAlbum (**ArtistId**, **AlbumId**) AlbumHasGenre (**AlbumId**, **GenreId**) Strong Entity (Artists, Albums, Genres) Linking Table (ArtistCreatedAlbum, AlbumIsGenre) Even if this example doesn't make sense. So many designs drop foreign keys into a strongish entity because its convenient. e.g Person (id, name, email, car_id, house_id, school_id) and in my mind that shouldn't be done.
Asked by tickmeister (1 rep)
Apr 18, 2024, 09:40 AM
Last activity: Jul 17, 2025, 08:00 AM