unknown

Deduktivne baze podataka

Abstract

Ovaj diplomski rad sastoji se od tri poglavlja koja se logički mogu podijeliti u dva dijela. U prvom dijelu (1. i 2. poglavlje) iznijete su teorijske osnove i svojstva deduktivnih baza podataka te jezika Datalog. Razumijevanje pojmova i rezultata opisanih u prvom dijelu ključno je za realizaciju deduktivne baze podataka opisanu u drugom dijelu diplomskog rada. Kako su deduktivne baze podataka nastale kao hibrid logičkog programiranja i relacijskih baza podataka, jasno je da će logika prvog reda igrati ključnu ulogu pri formalizaciji, razvoju i realizaciji deduktivnih baza podataka. Time se bavi prvo poglavlje gdje su iznijeti neki važni pojmovi i rezultati logike prvog reda. Tako najprije krećemo od same sintakse logike prvog reda gdje opisujemo kako izgledaju sintaktički ispravne formule nekog jezika logike prvog reda. Nakon sto imamo sintaktički ispravne izjave želimo ih interpretirati sa semantičke točke gledišta. Na kraju prvog poglavlja uvodimo i neke ključne pojmove (Herbrandov svemir, Herbrandova baza, Herbrandova interpretacija) kako bi pripremili put za drugo poglavlje u kojem definiramo deduktivni sustav za evaluaciju Datalog programa. Drugo poglavlje započinje proučavanjem sintakse Dataloga gdje definiramo kako izgledaju činjenice i pravila kojima pohranjujemo i izvodimo nove znanje. Zatim definiramo kako izgleda korektno napisan Datalog program uvodeći pojam stratifikacije. Nakon što naučimo pisati korektne Datalog programe bavimo se semantikom Dataloga. Tu ćemo vidjeti kako evaluirati Datalog programe koristeći iteraciju fiksne točke kao deduktivni sustav, pri čemu uz dane aksiome koje pruža sam Datalog program kao jedino pravilo dedukcije koristimo tzv. elementarnu produkciju. Zatim želimo omogućiti implementaciju Datalog koncepata unutar relacijske algebre preslikavanjem programa pisanih u Datalogu u relacijsku algebru. U drugom dijelu drugog poglavlja cilj nam je poboljšati samu evaluacju Datalog programa, stoga proučavamo razne metode evaluacije i optimizacije. U trećem poglavlju u softveru koji prepoznaje Datalog jezik (Logic Query Language) realiziramo jednu konkretnu deduktivnu bazu podataka. Cilj je opisati razne mogućnosti softvera postavljanjem rekurzivnih upita nad deduktivnom bazom podataka.This thesis consists of three chapters that can be logically divided into two parts. The first part (1. and 2. chapter) sets out the theoretical basis and properties of deductive databases and Datalog language. Understanding the concepts and results described in the first part is crucial for the realization of deductive database described in the second part of the thesis. Deductive databases were created as a hybrid of logic programming and relational databases, so it is clear that the first-order logic will play a key role in the formalization, development and implementation of deductive databases. First chapter presents some important concepts and results of first-order logic. First we start from the syntax of first-order logic, where we define what do syntactically correct formula of first-order logic language look like. Once we have syntactically correct statements we want to interpret them from the semantic point of view. At the end of the first chapter we introduce some key concepts (Herbrand universe, Herbrand base, Herbrand interpretation) to prepare the way for the second chapter where we define a deductive system for evaluating Datalog programs. The second chapter begins by studying the syntax of Datalog language where we define what do facts and rules by which we store data and derive new knowledge look like. Then we define what does a correctly written Datalog program look like by introducing the concept of stratification. Once we learn how to write Datalog programs correctly we deal with the semantics of Datalog. Here we’ll see how to evaluate Datalog programs using fixed-point iteration as a deductive system, where with the given axioms provided by Datalog program the only deduction rule will be the so-called elementary production. Then we will enable the implementation of Datalog concepts within the relational algebra by mapping a Datalog program into relational algebra. In the second part of the second chapter we aim to improve evaluation of a Datalog program, by studying various evaluation and optimization methods. In the third chapter by using the software that recognizes Datalog language (Logic Query Language) we aim to build a concrete deductive database. The goal is to describe the various capabilities of the software by writing recursive queries over the deductive database

    Similar works