Q:

Make own like system for various content

There are three types of content in my database. They are Songs, Albums and Playlists. Albums and Playlists are just collections of songs. And I want to let the user put like for each of them. I made table with columns  
LikeId UserId SongId PlaylistId AlbumId

for storing likes. For example if user puts like to song, I put song's id into SongId column and user's id into UserId column. Other columns will be null. It's working good,but I don't like this solution because it's not normalized.
So I want to ask if there are better solutions for this.

A:

You should just create 3 tables - one for User paired with each of Playlist, Song, and Album. They'd look something like:
CREATE TABLE PlaylistLikes
(
    UserID INT NOT NULL, 
    PlaylistID INT NOT NULL, 
    PRIMARY KEY (UserID, PlaylistID), 
    FOREIGN KEY (UserID) REFERENCES Users (UserID), 
    FOREIGN KEY (PlaylistID) REFERENCES Playlists (PlaylistID)
);
CREATE TABLE SongLikes
(
    UserID INT NOT NULL, 
    SongID INT NOT NULL, 
    PRIMARY KEY (UserID, SongID), 
    FOREIGN KEY (UserID) REFERENCES Users (UserID), 
    FOREIGN KEY (SongID) REFERENCES Songs (SongID)
);
CREATE TABLE AlbumLikes
(
    UserID INT NOT NULL, 
    AlbumID INT NOT NULL, 
    PRIMARY KEY (UserID, AlbumID), 
    FOREIGN KEY (UserID) REFERENCES Users (UserID), 
    FOREIGN KEY (AlbumID) REFERENCES Albums (AlbumID)
);

Here, having both columns in the primary key prevents the user from liking the song/playlist/album more than once (unless you want that to be available - then remove it or maybe keep track of that in a 'number of likes' column). 
You should avoid putting all 3 different types of likes in the same table - different tables should be used to represent different things. You want to avoid "One True Lookup Table" - here's one answer detailing why: OTLT
If you want to query against all 3 tables, you can create a view which is the result of a UNION between the 3 tables. 

