title: Database Design Primay Key, ID vs String
body: <p>I am currently planning to develop a music streaming application. And i am wondering what would be better as a primary key in my tables on the server. An ID int or a Unique String.</p>
  
  <blockquote>
    <p>Methods 1:</p>
  </blockquote>
  
  <p>Songs Table:
  <strong>SongID</strong>(int), Title(string), *Artist**(string), Length(int), *Album**(string)</p>
  
  <p>Genre Table
  <strong>Genre</strong>(string), Name(string)</p>
  
  <p>SongGenre:
  ***SongID****(int), ***Genre****(string)</p>
  
  <blockquote>
    <p>Method 2</p>
  </blockquote>
  
  <p>Songs Table:
  <strong>SongID</strong>(int), Title(string), *ArtistID**(int), Length(int), *AlbumID**(int)</p>
  
  <p>Genre Table
  <strong>GenreID</strong>(int), Name(string)</p>
  
  <p>SongGenre:
  ***SongID****(int), ***GenreID****(int)</p>
  
  <p>Key: <strong>Bold</strong> = Primary Key, *Field** = Foreign Key</p>
  
  <p>I'm currently designing using method 2 as I believe it will speed up lookup performance and use less space as an int takes a lot less space then a string.</p>
  
  <p>Is there any reason this isn't a good idea? Is there anything I should be aware of?</p>