Cadernos de Questões

Provas Favoritas

Filtros Salvos

Foram encontradas 70 questões.
#1610915

Considere o seguinte diagrama E-R:


Imagem associada para resolução da questão

Foi criado um conjunto de tabelas relacionais, a partir do modelo E-R acima. Uma vez que as regras de transformações de entidades e relações para tabelas relacionais independem dos tipos de dados dos atributos, todos os atributos do modelo E-R acima foram tratados como itens de dados do tipo cadeia de caracteres (TEXT).

As tabelas resultantes são as seguintes:


CREATE TABLE TX (

        X1              TEXT                NOT NULL,

       X2               TEXT                NOT NULL,

       X3               TEXT                NOT NULL,

       PRIMARY KEY (X1));


CREATE TABLE EY (

       Y1            TEXT        NOT NULL,

       Y2            TEXT        NOT NULL,

PRIMARY KEY (Y1));



Qual transformação da relação Rel irá preservar a semântica do diagrama E-R apresentado?

  • CREATE TABLE REL (X1           TEXT         NOT NULL,Y1           TEXT         NOT NULL,R1           TEXT         NOT NULL,R2           TEXT         NOT NULL,PRIMARY KEY (X1, Y1),FOREIGN KEY (X1)REFERENCES TX (X1),FOREIGN KEY (Y1)REFERENCES EY (Y1));
  • CREATE TABLE REL (X1           TEXT           NOT NULL,Y1           TEXT           NOT NULL,R1           TEXT           NOT NULL,R2           TEXT           NOT NULL,PRIMARY KEY (X1, R1),FOREIGN KEY (X1)REFERENCES TX (X1),FOREIGN KEY (Y1)REFERENCES EY (Y1));
  • CREATE TABLE REL (X1                 TEXT            NOT NULL,Y1                 TEXT            NOT NULL,R1                TEXT             NOT NULL,R2                TEXT             NOT NULL,PRIMARY KEY (Y1, R1),FOREIGN KEY (X1)REFERENCES TX (X1),FOREIGN KEY (Y1)REFERENCES EY (Y1));
  • CREATE TABLE REL (X1              TEXT            NOT NULL,Y1              TEXT            NOT NULL,R1              TEXT            NOT NULL,R2              TEXT            NOT NULL,PRIMARY KEY (X1, Y1, R1),FOREIGN KEY (X1)REFERENCES TX (X1),FOREIGN KEY (Y1)REFERENCES EY (Y1));
  • CREATE TABLE REL (X1                TEXT             NOT NULL,Y1                TEXT              NOT NULL,R1                TEXT              NOT NULL,R2               TEXT               NOT NULL,PRIMARY KEY (R1),FOREIGN KEY (X1)REFERENCES TX (X1),FOREIGN KEY (Y1)REFERENCES EY (Y1));
Fale com IAgo
IAgo - Assistente IAProva
IA
Olá! Sou o IAgo, seu assistente aqui no IAProvatec 😊
Veja como posso te ajudar:
Agora