CREATE DATABASE Continentes;

/******** CLASE *************/
CREATE TABLE CONTINENTE(
c_id int NOT NULL AUTO_INCREMENT,
c_nombre VARCHAR (20) NOT NULL,
PRIMARY KEY (c_id)
);
CREATE TABLE PAIS(
p_id int NOT NULL AUTO_INCREMENT,
c_id int, 
p_nombre VARCHAR (20) NOT NULL,
PRIMARY KEY (p_id),
FOREIGN KEY (c_id) REFERENCES CONTINENTE(c_id)
);

SET SQL_SAFE_UPDATES = 0;
DELETE FROM CONTINENTE;
DELETE FROM PAIS;

INSERT INTO CONTINENTE (c_nombre)VALUES('Africa');
INSERT INTO CONTINENTE (c_nombre)VALUES('América');
INSERT INTO CONTINENTE (c_nombre)VALUES('Oceanía');
INSERT INTO CONTINENTE (c_nombre)VALUES('Europa');
INSERT INTO CONTINENTE (c_nombre)VALUES('Asia');

INSERT INTO PAIS (c_id,p_nombre)VALUES(1,'SUDAN');
INSERT INTO PAIS (c_id,p_nombre)VALUES(1,'EGIPTO');
INSERT INTO PAIS (c_id,p_nombre)VALUES(1,'LIBIA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(1,'CONGO');
INSERT INTO PAIS (c_id,p_nombre)VALUES(2,'ECUADOR');
INSERT INTO PAIS (c_id,p_nombre)VALUES(2,'CHILE');
INSERT INTO PAIS (c_id,p_nombre)VALUES(2,'COLOMBIA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(2,'ARGENTINA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(2,'PERU');
INSERT INTO PAIS (c_id,p_nombre)VALUES(2,'MEXICO');
INSERT INTO PAIS (c_id,p_nombre)VALUES(2,'VENEZUELA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(3,'AUSTRALIA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(3,'FIYI');
INSERT INTO PAIS (c_id,p_nombre)VALUES(3,'KIRIBATI');
INSERT INTO PAIS (c_id,p_nombre)VALUES(3,'ISLAS MARSHALL');
INSERT INTO PAIS (c_id,p_nombre)VALUES(3,'NUEVA ZELANDA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(3,'SAMOA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(4,'ALBANIA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(4,'ALEMANIA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(4,'AUSTRIA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(4,'ESPAÑA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(4,'HOLANDA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(4,'ITALIA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(5,'AFGANISTÁN');
INSERT INTO PAIS (c_id,p_nombre)VALUES(5,'CHINA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(5,'INDIA');
INSERT INTO PAIS (c_id,p_nombre)VALUES(5,'IRÁN');
INSERT INTO PAIS (c_id,p_nombre)VALUES(5,'LÍBANO');
INSERT INTO PAIS (c_id,p_nombre)VALUES(5,'NEPAL');