Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

My table have many duplicated entries, is it dangerous if I don't fix this? My table is structured like this:

Music_id | Music_title      | Music_author | Music_link
1          Look at me now     Chris Brown    
2          Look at me now     Jay-z        

This is just an example, but that is the table I have. Look at the Music title. There's duplicate entries already. Sometimes the music_title will reach 10 duplicates

So I plan to make a look up Music table

Music
id | music_title
1    Look at me now

My table
id | music | music_author | Music_link
1     1      chris brown   
2     1      jay-z

But my concern is, the 1 in the music field is also duplicated. Which is better anyway? I'm confused.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

In this case, I would keep the single table and allow repeated song titles.

Lookup tables are used for finite sets (artist, status, city etc). Moving song titles to a lookup table will result in a lookup table nearly as large as the main table. If anything, artist should be a separate lookup table because this will be common attributes for several song entities.

A table will generally store an object or entity, in this case a song. The common attributes for a song can be moved to a lookup table, but song title isn't one of these common attributes. The same song title is usually a coincidence: you'd probably be better with "CoverOf" and "ReReleaseOf" columns to deal with these cases.

The fact of storing the same text in several rows isn't breaking any rules here because it isn't repeated text in the lookup sense

Also see: Proper Use of Lookup Tables

share|improve this answer
    
thanks for the answer and the link. it is very helpful. –  Kevin Lee Jan 2 '12 at 6:50
1  
I agree with all. The only reason (I can think of) for having lookup table for the music title is if you want to run (more efficiently) queries that group by the music title. For example, if you have a trivial questions database and want to find the 10 most common song titles in the history of music. –  ypercube Jan 2 '12 at 16:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.