Back
Database Structure
Database Structure
Database Access
Forward


Step 2: Creating the database structure

We want to store:

  • The user name
  • The song title
  • The interpret
  • The album
  • The ID tag

1
2
3
4
5
6
7
8
9
10
11
12
13
14
CREATE TABLE mopple_songs ( song_id INT NOT NULL, song_owner VARCHAR(255) NOT NULL, song_title VARCHAR(255), song_interpret VARCHAR(255), song_album VARCHAR(255), song_idtag TEXT, PRIMARY KEY (song_id) ); CREATE INDEX song_title_idx ON mopple_songs (song_title); CREATE INDEX song_interpret_idx ON mopple_songs (song_interpret);