How do I remove redundancy from this database layout's 1:M relationship and still be able to excerpt the data needed?
问题 The database looks like this: CREATE TABLE artists ( artist_id SERIAL PRIMARY KEY, artist TEXT UNIQUE NOT NULL ); CREATE TABLE artistalias ( artistalias_id SERIAL PRIMARY KEY, artist_id SERIAL REFERENCES artists (artist_id), alias TEXT UNIQUE NOT NULL ); CREATE TABLE songs ( song_id SERIAL PRIMARY KEY, song TEXT NOT NULL, artist_id SERIAL REFERENCES artists (artist_id) ); one artist can have zero, one or many aliases one alias belongs to exactly one artist one song has one artist one artist