Tarefa: Dados Iniciais: A tabela inicial contém todas as informações em uma única aba chamada "Dados Iniciais". Aba "Dados Iniciais": id_projeto | nome_projeto | data_inicio | id_tarefa | descricao_tarefa | data_entrega
1 | Projeto Alpha | 2023-01-01 | 1 | Tarefa 1 do Alpha | 2023-01-15 1 | Projeto Alpha | 2023-01-01 | 2 | Tarefa 2 do Alpha | 2023-01-20 2 | Projeto Beta | 2023-02-01 | 3 | Tarefa 1 do Beta | 2023-02-15 2 | Projeto Beta | 2023-02-01 | 4 | Tarefa 2 do Beta | 2023-02-20 Copiar código Entidades e Atributos: Projetos: id_projeto (PK), nome_projeto, data_inicio Tarefas: id_tarefa (PK), id_projeto (FK), descricao_tarefa, data_entrega Suas Tarefas: Criação de abas Projetos e Tarefas na planilha. Preenchimento das abas com os dados extraídos da aba inicial "Dados Iniciais". Verificação da correspondência entre id_projeto na aba Tarefas e id_projeto na aba Projetos.
RESPOSTA EM FORMATO SQL: -- Criação da tabela Projetos CREATE TABLE Projetos ( id_projeto INT PRIMARY KEY, nome_projeto VARCHAR(255), data_inicio DATE );
-- Inserção de dados na tabela Projetos INSERT INTO Projetos (id_projeto, nome_projeto, data_inicio) VALUES (1, 'Projeto Alpha', '2023-01-01'), (2, 'Projeto Beta', '2023-02-01');
-- Criação da tabela Tarefas CREATE TABLE Tarefas ( id_tarefa INT PRIMARY KEY, id_projeto INT, descricao_tarefa VARCHAR(255), data_entrega DATE, FOREIGN KEY (id_projeto) REFERENCES Projetos(id_projeto) );
-- Inserção de dados na tabela Tarefas INSERT INTO Tarefas (id_tarefa, id_projeto, descricao_tarefa, data_entrega) VALUES (1, 1, 'Tarefa 1 do Alpha', '2023-01-15'), (2, 1, 'Tarefa 2 do Alpha', '2023-01-20'), (3, 2, 'Tarefa 1 do Beta', '2023-02-15'), (4, 2, 'Tarefa 2 do Beta', '2023-02-20');
RESPOSTA EM FORMATO JSON: { "id_projeto": 1, "nome_projeto": "Projeto Alpha", "data_inicio": "2023-01-01", "tarefas": [ { "id_tarefa": 1, "descricao_tarefa": "Tarefa 1 do Alpha", "data_entrega": "2023-01-15" }, { "id_tarefa": 2, "descricao_tarefa": "Tarefa 2 do Alpha", "data_entrega": "2023-01-20" } ] }, { "id_projeto": 2, "nome_projeto": "Projeto Beta", "data_inicio": "2023-02-01", "tarefas": [ { "id_tarefa": 3, "descricao_tarefa": "Tarefa 1 do Beta", "data_entrega": "2023-02-15" }, { "id_tarefa": 4, "descricao_tarefa": "Tarefa 2 do Beta", "data_entrega": "2023-02-20" } ] } ] RESPOSTA EM FORMATO MARKDOWN:
Projetos e Tarefas
Tabela: Projetos
id_projeto | nome_projeto | data_inicio |
---|---|---|
1 | Projeto Alpha | 2023-01-01 |
2 | Projeto Beta | 2023-02-01 |
Tabela: Tarefas
id_tarefa | id_projeto | descricao_tarefa | data_entrega |
---|---|---|---|
1 | 1 | Tarefa 1 do Alpha | 2023-01-15 |
2 | 1 | Tarefa 2 do Alpha | 2023-01-20 |
3 | 2 | Tarefa 1 do Beta | 2023-02-15 |
4 | 2 | Tarefa 2 do Beta | 2023-02-20 |