drop database if exists band;
create database band;
use band;

create table tags(id INT NOT NULL AUTO_INCREMENT ,name VARCHAR(100),PRIMARY KEY (id));
create table tracks(id INT NOT NULL AUTO_INCREMENT,name VARCHAR(100), album_id INT,PRIMARY KEY (id));
create table albums(id INT NOT NULL AUTO_INCREMENT,name VARCHAR(100), band_id INT, date YEAR,PRIMARY KEY (id));
create table bands(id INT NOT NULL AUTO_INCREMENT,name VARCHAR(100),description VARCHAR(2000), picurl VARCHAR(200),PRIMARY KEY (id));
create table tagged(band_id INT,tag_id INT);
create table forumposts(id INT NOT NULL AUTO_INCREMENT, name VARCHAR(100), post VARCHAR(600), band_id INT, date DATE, time TIME, PRIMARY KEY (id));
create table news(id INT NOT NULL AUTO_INCREMENT, name VARCHAR(100), news VARCHAR(600), date DATE, time TIME, PRIMARY KEY (id));

insert into bands (id,name,description,picurl) VALUES (1,'Mayhem','Mayhem (often called \'The True Mayhem\') is a black metal band, formed in 1984 in Oslo, Norway. <br> The band name is taken from the Venom song, Mayhem with Mercy. <br> Much controversy has followed the various murders, suicides and other forms of violence that surrounded the band in the early years. <br> Mayhem is considered one of the most controversial bands in modern musical history, especially due to the vast number of urban legends and myths surrounding their early years, and the controversies have often overshadowed the music, especially in recent years due in part to the Internet and magazine articles. <br> Over time Mayhem has evolved through a variety of black metal styles, delving at times into areas of dark avant-garde industrial and electronica. <br> Highly influential, the group is widely considered to be one of the cornerstones of the black metal movement.', 'http://upload.wikimedia.org/wikipedia/en/7/7a/Mayhem_Logo.png');
insert into bands (id,name,description,picurl) VALUES (2,'Velcra','Velcra is a Finnish hard rock music group established 1999. Their music features female vocals (both clean and distorted) on a background of heavily distorted guitars and marching beats with heavy use of sample loops and could be defined as industrial metal or rap-metal.','http://img.mp3sugar.com/artist/artist_918.jpg');
insert into bands (id,name,description,picurl) VALUES (3,'Deicide','Deicide is an American death metal band. The word "deicide" means "the killing of deities" or, in the Christian era "the killing of God or Jesus Christ". The word can also mean "one who kills God". The band has sold close to 500,000 releases (taking into consideration both CD and VHS sales) in the USA since the SoundScan era, making them one of the best selling death metal bands of all time. Their albums Deicide and Legion are also ranked second and third place in best-selling death metal albums of that era.','http://www.headbanger.hu/be/htdocs/updir/deicide.jpg');
insert into bands (id,name,description,picurl) VALUES (4,'Marduk','Marduk is a Swedish black metal band, who are based in Norrköping. <br> Marduk\'s predominant lyrical topics are Satanism, anti-Christianity, Biblical tales, Nazism and World War II. The latter two are a later addition to their lyrical / conceptual themes, stemming from their 1999 release Panzer Division Marduk; quickly growing among their fans\' favorites.','http://www.bibleetnombres.online.fr/images6/marduk.gif');
insert into bands (id,name,description,picurl) VALUES (5,'Immortal','Immortal is a pioneer black metal band from Bergen, Norway. The band was formed from the remnants of Amputation, a death metal band from 1989.','http://upload.wikimedia.org/wikipedia/en/3/39/Immortal.png');

insert into tags(id,name) VALUES (1,'black metal');
insert into tags(id,name) VALUES (2,'industrial');
insert into tags(id,name) VALUES (3,'death metal');
insert into tags(id,name) VALUES (4,'satanism');
insert into tags(id,name) VALUES (5,'norway');
insert into tags(id,name) VALUES (6,'usa');
insert into tags(id,name) VALUES (7,'finnish');
insert into tags(id,name) VALUES (8,'sweden');

/**************
insert into tags(id,name) VALUES (10,'xyz0');
insert into tags(id,name) VALUES (11,'xyz1');
insert into tags(id,name) VALUES (12,'xyz2');
insert into tags(id,name) VALUES (13,'xyz3');
insert into tags(id,name) VALUES (14,'xyz4');
insert into tags(id,name) VALUES (15,'xyz5');
insert into tags(id,name) VALUES (16,'xyz6');
insert into tags(id,name) VALUES (17,'xyz7');
insert into tags(id,name) VALUES (18,'xyz8');
insert into tags(id,name) VALUES (19,'xyz9');
insert into tags(id,name) VALUES (20,'xyz10');
insert into tags(id,name) VALUES (21,'xyz11');
insert into tags(id,name) VALUES (22,'xyz12');
insert into tags(id,name) VALUES (23,'xyz13');
insert into tags(id,name) VALUES (24,'xyz14');
insert into tags(id,name) VALUES (25,'xyz15');

insert into tagged(band_id,tag_id) VALUES (-1,10);
insert into tagged(band_id,tag_id) VALUES (-1,10);
insert into tagged(band_id,tag_id) VALUES (-1,10);
insert into tagged(band_id,tag_id) VALUES (-1,10);
insert into tagged(band_id,tag_id) VALUES (-1,10);
insert into tagged(band_id,tag_id) VALUES (-1,10);
insert into tagged(band_id,tag_id) VALUES (-1,11);
insert into tagged(band_id,tag_id) VALUES (-1,12);
insert into tagged(band_id,tag_id) VALUES (-1,13);
insert into tagged(band_id,tag_id) VALUES (-1,14);
insert into tagged(band_id,tag_id) VALUES (-1,14);
insert into tagged(band_id,tag_id) VALUES (-1,14);
insert into tagged(band_id,tag_id) VALUES (-1,14);
insert into tagged(band_id,tag_id) VALUES (-1,14);
insert into tagged(band_id,tag_id) VALUES (-1,14);
insert into tagged(band_id,tag_id) VALUES (-1,15);
insert into tagged(band_id,tag_id) VALUES (-1,16);
insert into tagged(band_id,tag_id) VALUES (-1,17);
insert into tagged(band_id,tag_id) VALUES (-1,18);
insert into tagged(band_id,tag_id) VALUES (-1,18);
insert into tagged(band_id,tag_id) VALUES (-1,18);
insert into tagged(band_id,tag_id) VALUES (-1,18);
insert into tagged(band_id,tag_id) VALUES (-1,18);
insert into tagged(band_id,tag_id) VALUES (-1,18);
insert into tagged(band_id,tag_id) VALUES (-1,18);
insert into tagged(band_id,tag_id) VALUES (-1,18);
insert into tagged(band_id,tag_id) VALUES (-1,18);
insert into tagged(band_id,tag_id) VALUES (-1,18);
insert into tagged(band_id,tag_id) VALUES (-1,19);
insert into tagged(band_id,tag_id) VALUES (-1,20);
insert into tagged(band_id,tag_id) VALUES (-1,21);
insert into tagged(band_id,tag_id) VALUES (-1,22);
insert into tagged(band_id,tag_id) VALUES (-1,23);
insert into tagged(band_id,tag_id) VALUES (-1,24);

**************/


insert into tagged(band_id,tag_id) VALUES (1,1);
insert into tagged(band_id,tag_id) VALUES (1,4);
insert into tagged(band_id,tag_id) VALUES (1,5);
insert into tagged(band_id,tag_id) VALUES (2,2);
insert into tagged(band_id,tag_id) VALUES (2,7);
insert into tagged(band_id,tag_id) VALUES (3,3);
insert into tagged(band_id,tag_id) VALUES (3,6);
insert into tagged(band_id,tag_id) VALUES (3,4);
insert into tagged(band_id,tag_id) VALUES (4,1);
insert into tagged(band_id,tag_id) VALUES (5,1);
insert into tagged(band_id,tag_id) VALUES (5,5);
insert into tagged(band_id,tag_id) VALUES (4,8);


insert into albums(id, name, band_id, date) VALUES (1,'Deathcrush',1,1987);
insert into albums(id, name, band_id, date) VALUES (2,'Live in Leipzig',1,1991);
insert into albums(id, name, band_id, date) VALUES (3,'De Mysteriis...',1,1994);
insert into albums(id, name, band_id, date) VALUES (4,'Ordo Ad Chao',1,2007);
insert into albums(id, name, band_id, date) VALUES (5,'Consequences of Disobedience',2,2002);
insert into albums(id, name, band_id, date) VALUES (6,'Once upon the cross',3,1995);
insert into albums(id, name, band_id, date) VALUES (7,'Serpents of the Light',3,1997);
insert into albums(id, name, band_id, date) VALUES (10,'The Stench of Redemption',3,2006);

insert into tracks(id, name, album_id) VALUES (1,'Not of This Earth',10);
insert into tracks(id, name, album_id) VALUES (2,'Desecration',10);
insert into tracks(id, name, album_id) VALUES (3,'Never to Be Seen Again',10);
insert into tracks(id, name, album_id) VALUES (4,'Not of This Earth',4);
insert into tracks(id, name, album_id) VALUES (5,'A Wise Birthgiver',4);
insert into tracks(id, name, album_id) VALUES (6,'Illuminate Eliminate',4);
insert into tracks(id, name, album_id) VALUES (7,'Key to the Storms',4);
insert into tracks(id, name, album_id) VALUES (8,'Anti',4);
insert into tracks(id, name, album_id) VALUES (88,'Wall of Water',4);

insert into tracks(name, album_id) VALUES ('Silvester Anfang',1);
insert into tracks(name, album_id) VALUES ('Deathcrush',1);
insert into tracks(name, album_id) VALUES ('Chainsaw Gutsfuck',1);
insert into tracks(name, album_id) VALUES ('Necrolust',1);
insert into tracks(name, album_id) VALUES ('(Weird) Manheim',1);
insert into tracks(name, album_id) VALUES ('Pure Fucking Armageddon',1);

insert into tracks(name, album_id) VALUES ('Deathcrush',2);
insert into tracks(name, album_id) VALUES ('Necrolust',2);
insert into tracks(name, album_id) VALUES ('Funeral Fog',2);
insert into tracks(name, album_id) VALUES ('The Freezing Moon',2);
insert into tracks(name, album_id) VALUES ('Carnage',2);
insert into tracks(name, album_id) VALUES ('Buried by Time and Dust',2);
insert into tracks(name, album_id) VALUES ('Pagan Fears',2);
insert into tracks(name, album_id) VALUES ('Chainsaw Gutsfuck',2);
insert into tracks(name, album_id) VALUES ('Pure Fucking Armageddon',2);

insert into tracks(name, album_id) VALUES ('Funeral Fog',3);
insert into tracks(name, album_id) VALUES ('Freezing Moon',3);
insert into tracks(name, album_id) VALUES ('Cursed in Eternity',3);
insert into tracks(name, album_id) VALUES ('Pagan Fears',3);
insert into tracks(name, album_id) VALUES ('Life Eternal',3);
insert into tracks(name, album_id) VALUES ('From the Dark Past',3);
insert into tracks(name, album_id) VALUES ('Buried By Time and Dust',3);
insert into tracks(name, album_id) VALUES ('De Mysteriis Dom Sathanas',3);


insert into forumposts(name, post, band_id, date, time) VALUES ('Joe','owning! this band kickass man, i love them!', 4,CURDATE(),CURTIME());
insert into forumposts(name, post, band_id, date, time) VALUES ('a','owning! this band kickass man, i love them!', 3,CURDATE(),CURTIME());
insert into forumposts(name, post, band_id, date, time) VALUES ('b','owning! this band kickass man, i love them!', 3,CURDATE(),CURTIME());
insert into forumposts(name, post, band_id, date, time) VALUES ('b','owning! this band kickass man, i love them!', 3,CURDATE(),CURTIME());
insert into forumposts(name, post, band_id, date, time) VALUES ('b','owning! this band kickass man, i love them!', 3,CURDATE(),CURTIME());
insert into forumposts(name, post, band_id, date, time) VALUES ('b','owning! this band kickass man, i love them!', 3,CURDATE(),CURTIME());
insert into forumposts(name, post, band_id, date, time) VALUES ('b','owning! this band kickass man, i love them!', 3,CURDATE(),CURTIME());
insert into forumposts(name, post, band_id, date, time) VALUES ('b','owning! this band kickass man, i love them!', 3,CURDATE(),CURTIME());
insert into forumposts(name, post, band_id, date, time) VALUES ('b','owning! this band kickass man, i love them!', 3,CURDATE(),CURTIME());
insert into forumposts(name, post, band_id, date, time) VALUES ('b','owning! this band kickass man, i love them!', 3,CURDATE(),CURTIME());

insert into news(name, news, date, time) VALUES ('started to develop','development of the site is started', CURDATE(),CURTIME()); 
insert into news(name, news, date, time) VALUES ('added news','added news feature to site', CURDATE(),CURTIME()); 
insert into news(name, news, date, time) VALUES ('added bands','added bands feature to site', CURDATE(),CURTIME()); 
insert into news(name, news, date, time) VALUES ('added albums','added albums feature to site', CURDATE(),CURTIME()); 
insert into news(name, news, date, time) VALUES ('added tracks','added tracks feature to site', CURDATE(),CURTIME()); 
insert into news(name, news, date, time) VALUES ('added tags','added tags feature to site', CURDATE(),CURTIME()); 
insert into news(name, news, date, time) VALUES ('RSS test started','started testing the RSS feature', CURDATE(),CURTIME()); 

