2

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.

gbn
  • 70,237
  • 8
  • 167
  • 244
Kevin Lee
  • 123
  • 2

1 Answers1

6

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

gbn
  • 70,237
  • 8
  • 167
  • 244