Gabarito disponível
Texto-base:
A figura a seguir representa um projeto de banco de dados para a análise de gastos em saúde por município e por hospital.

A partir dessas informações, julgue os próximos itens.
O código a seguir cria a tabela gastos, de acordo com os relacionamentos com as outras tabelas.
CREATE TABLE gastos (
id_gasto INTEGER,
id_tipo_gasto_saude INTEGER NOT NULL,
id_hospital INTEGER NOT NULL,
ano INTEGER NOT NULL,
mes INTEGER NOT NULL,
valor_gasto DECIMAL(15,2) NOT NULL,
id_municipio INTEGER NOT NULL,
CONSTRAINT pk_gastos PRIMARY KEY (id_gasto),
CONSTRAINT fk_gastos_tipo_gasto FOREIGN KEY
(id_tipo_gasto_saude) REFERENCES
tipo_gasto_saude(id_tipo_gasto_saude),CONSTRA
INT fk_gastos_hospital FOREIGN KEY
(id_hospital) REFERENCES
hospital(id_hospital))
A figura a seguir representa um projeto de banco de dados para a análise de gastos em saúde por município e por hospital.
A partir dessas informações, julgue os próximos itens.
O código a seguir cria a tabela gastos, de acordo com os relacionamentos com as outras tabelas.
CREATE TABLE gastos (
id_gasto INTEGER,
id_tipo_gasto_saude INTEGER NOT NULL,
id_hospital INTEGER NOT NULL,
ano INTEGER NOT NULL,
mes INTEGER NOT NULL,
valor_gasto DECIMAL(15,2) NOT NULL,
id_municipio INTEGER NOT NULL,
CONSTRAINT pk_gastos PRIMARY KEY (id_gasto),
CONSTRAINT fk_gastos_tipo_gasto FOREIGN KEY
(id_tipo_gasto_saude) REFERENCES
tipo_gasto_saude(id_tipo_gasto_saude),CONSTRA
INT fk_gastos_hospital FOREIGN KEY
(id_hospital) REFERENCES
hospital(id_hospital))