1 / 3

Exercicio – Revisão

Exercicio – Revisão. Método da Resolução e Ponto Fixo Profa. Sandra de Amo PGC 107 Sistemas de Banco de Dados. Exercicio 1. Considere o seguinte programa Datalog P irmao(x,y) :- pais(x,z), pais(y,z), x ≠ y primo(x,y) :- pais(x,x’), pais(y,y’), irmao(x’,y’)

paige
Download Presentation

Exercicio – Revisão

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Exercicio – Revisão Método da Resolução e Ponto Fixo Profa. Sandra de Amo PGC 107 Sistemas de Banco de Dados

  2. Exercicio 1 • Considere o seguinte programa Datalog P irmao(x,y) :- pais(x,z), pais(y,z), x ≠ y primo(x,y) :- pais(x,x’), pais(y,y’), irmao(x’,y’) primo(x,y) :- pais(x,x’), paix(y,y’),primo(x’,y’) parente(x,y) :- irmao(x,y) parente(x,y) :- primo(x,y) parente(x,y) :- parente(x,z), pais(y,z) parente(x,y) :- parente(z,y), pais(x,z) • Considere a seguinte instância da relação pais (extensional) Pais = {(Paulo, Pedro), (Maria, Pedro), (Pedro, Otavio), (Marcos, Otavio), (Maria,Sandra), (Pauline, Sandra), (Sandra, Henrique), (Marcia, Henrique),(Rafael,Marcia)} • Considere as seguintes consultas Datalog: 1. (P, irmao) 2. (P,primo) 3. (P, parente)

  3. Pede-se Para cada uma destas consultas calcule as respostas usando • o método iterativo do ponto fixo (T0, T1, ...) • o método da Resolução

More Related