CREATE TABLE t_videogame (
  idVideogame int(11) NOT NULL AUTO_INCREMENT,
  vidName varchar(20) NOT NULL,
  PRIMARY KEY (idVideogame)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE t_pseudo (
  idPseudo int(11) NOT NULL AUTO_INCREMENT,
  pseNickname varchar(100) NOT NULL,
  pseGender char(1) NOT NULL,
  pseOrigin text NOT NULL,
  psoDate date NOT NULL,
  PRIMARY KEY (idPseudo)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `pseudo_videogame_mm` (
	`fkPseudo` int(11) NOT NULL,
	`fkVideogame` int(11) NOT NULL,
	PRIMARY KEY (`fkPseudo`,`fkVideogame`),
	FOREIGN KEY (`fkPseudo`) REFERENCES `t_pseudo`(`idPseudo`),
	FOREIGN KEY (`fkVideogame`) REFERENCES `t_videogame`(`idVideogame`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE t_user (
  idUser int(11) NOT NULL AUTO_INCREMENT,
  useLogin varchar(20) NOT NULL,
  usePassword varchar(255) NOT NULL,
  useAdministrator int(2) NOT NULL,
  PRIMARY KEY (idUser)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
