I have the doubt if it is valid to create rest tnego this table:
CREATE TABLE EQUIPO(
id_equipo int not null,
nombre varchar(45),
encargado varchar (45),
tel_encargado varchar(8),
PRIMARY KEY (id_equipo)
);
and I need to create this other table:
CREATE TABLE PARTIDO(
id_partido int,
equipo_vis int,
equipo_loc int,
gol_visitante int,
gol_local int,
id_cancha int,
PRIMARY KEY (id_partido),
FOREIGN KEY (equipo_vis,equipo_loc) REFERENCES EQUIPO(id_equipo),
FOREIGN KEY (id_cancha) REFERENCES EQUIPO(id_cancha)
);
where "equipo_vis" and "equipo_loc" refer to "team_id" of the Team table, this is valid or how it can be restructured.