0
CREATE TABLE pacotes
(
id INT IDENTITY(1,1) PRIMARY KEY NOT NULL,
nome VARCHAR(100),
valor FLOAT,
percentual_max_desconto TINYINT,
);
CREATE TABLE pontos_turisticos
(
id INT IDENTITY(1,1) PRIMARY KEY NOT NULL,
id_endereco INT,
nome VARCHAR(100) NOT NULL,
FOREIGN KEY (id_endereco) REFERENCES enderecos(id)
);
CREATE TABLE pacotes_pontos_turisticos
(
id INT IDENTITY(1,1) PRIMARY KEY NOT NULL,
id_ponto_turistico INT,
id_pacote INT ,
FOREIGN KEY (id_ponto_turistico) REFERENCES pontos_turisticos(id),
FOREIGN KEY (id_pacote) REFERENCES pacotes(id),
);
I need to do the INSERT
but I don’t know how.
what would be "nxn"? cardinality "n.. n", is that it? by the way, is it
mysql
orsql-server
?– Ricardo Pontual
n for n second my teacher more I managed to tidy up I needed to make a select within another select.
– Junior Zeh
include sights; include packages; establish the relationship between packages and sights when including lines in
pacotes_pontos_turisticos
– José Diz