Deductive database - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Deductive database

Description:

Family Tree System ...Deductive DB Implementation... Facts & Rules. father(tom,amy) ... Using advanced queuing (AQ) to activate a message-driven bean (MDB) ... – PowerPoint PPT presentation

Number of Views:1975
Avg rating:3.0/5.0
Slides: 31
Provided by: perdanaFs
Category:

less

Transcript and Presenter's Notes

Title: Deductive database


1
Deductive database
Active database
  • Group 7
  • Alexander Tan Thiam Ong WGA060040
  • Beh Kee Lim
    WGA060023
  • Qi Han
    WGA060026
  • Yang Lina
    WGA060004
  • Zhai Chunchao
    WGA060031

2
Deductive database
  • Introduction
  • A deductive database system is a database system
    which can make deductions (ie infer additional
    rules or facts) based on rules and facts stored
    in the (deductive) database.
  • Deductive Databases have been the focus of
    intense research, which has brought dramatic
    advances in theory, systems and applications.
  • Feature of deductive databases capability of
    supporting a declarative, rule-based style of
    expressing queries and applications on databases.

3
Deductive database
  • Deductive database systems
  • Mainly deal with rules and facts.
  • Use a declarative language (such as prolog) to
    specify those rules and facts.
  • Use an inference engine which can deduce new
    facts and rules from those given.

4
Deductive database
  • Deductive Database Languages---prolog and datalog
  • Prolog is a logic programming language.
  • "programming in logic ". Expression of logic
    instead of
  • carefully specified instructions on the
    computer.
  • subset of Planner .
  • Datalog is a query and rule language for
    deductive databases that syntactically is a
    subset of Prolog.

5
Deductive database
  • What is the rules and facts?
  • The deductive database field has had close
    links with the logic programming community, and
    much of the development of deductive database
    systems has centered around languages based on
    Horn clauses.

6
Deductive database
  • This class of formulas forms the basis of PrologA
  • Horn clause is generally written as
  • p(t) - ql(tl), . . . , qn(n)
  • where p and ql, qn are predicate
    letters, n _gt 0, and all variables that occur in
    the terms t, t-l,. , tn are considered
    universally quantified at the front of the
    clause.
  • Note that n may be 0, in which case we refer to
    the clause as a fact. Otherwise, we refer to the
    clause as a rule.

7
Deductive database
  • Declarative Programming
  • two important ways
  • 1. The order in which goals are written in the
    rules does not determine their actual execution
    order, which is controlled by the system rather
    than the programmer.
  • 2. The selection between forward-chaining and
    backward-chaining execution is automatic--it is
    done by the system, rather than the programmer.

8
Deductive database
  • Systems and Applications
  • most deductive database systems position
    themselves as extensions to and improvements of
    existing relational databases rather than as
    their replacement.
  • A second ingredient found critical in many
    applications is an open and extensible
    architecture.

9
Deductive database
  • Future Directions
  • We are looking forward to a new generation of
    deductive database systems that embody these new
    advances, along with the know-how acquired in
    building the first generation of research
    prototypes.

10
Active Database
  • Introduction
  • Mechanisms that enable them to respond
    automatically
  • Considerable effort has been directed towards
    improving understanding
  • Review
  • Database systems are beginning to be applied
    to domains that involve more complex information
    processing

11
Active Database
  • What is it ABOUT
  • Over the past few years, the topic of active
    databases has become an important area of
    research .
  • Many DBMSs have addressed support for
    event-condition-action (ECA) rule in databases.
  • Current practice Data-driven oriented active
    database model

12
  • ADBMS

13
Active Database
  • The progress of the research
  • At the point of function ,an active database
    system (ADBS) is consisted with traditional
    database system , event-driven knowledge base
    (EB) and events monitor(EM).
  • ADBS DBS EB EM
  • EB is a group of event-driven by the knowledge
    pool
  • EM is a monitoring module monitored if the
    incident has happened in EB

14
Active Database
  • Traditional ADBMS has many problems in the
    practical application, such as it has a long and
    difficult period of development, and it does not
    rapidly use of the data gaps identified in
    history

15
Active Database
  • Component-based active database (CAB)
  • Directly use of the database which has been
    created to complete the data, the sharing to and
    the other functions .
  • Add an intermediate layer components in the
    data link layer to supervise the changing of the
    system, and then transfers those to the EM
    immediately.
  • When Monitor found that the incident
    occurred when a systematic definition of the
    conditions for automatic matching, if successful
    match, trigger corresponding moves on
    implementation

16
Active Database
  • 2 Based on dynamic fuzzy logic (DFL) active
    database
  • Based on dynamic fuzzy logic active database
    system (DFADBS) is consisted with a Dynamic Fuzzy
    Database System (DFDBS), DF Event-driven Base
    (DFEB) and DF Event Monitor (DFEM) .
  • DFADBSDFDBSDFEBDFEM

17
Active Database
  • WHEN ltDF Eventgt
  • IFltDF Condition 1gtTHENltDF Action 1gt
  • IFltDF Condition ngtTHENltDF Action ngt(n1)
  • Once the "incident" occurred, the computer
    would take
  • the initiative to trigger the implementation
    of the IF-THEN rules later, until the enforcement
    lasts.

18
Datalog
  • A query and rule language for deductive databases
  • Subset of Prolog
  • Facts state info that are true, eg
  • Rules state info that are true if certain
    condition apply, eg

woman(mia). listensToMusic(mia).happy(yolanda).
playsAirGuitar(mia)  - listensToMusic(mia).plays
AirGuitar(yolanda) - listensToMusic(yolanda).lis
tensToMusic(yolanda)- happy(yolanda).
19
Datalog
  • Query, eg
  • Return yes, because the fact is stated
  • Both queries above return no, because the fact
    is unknown
  • Return yes, because the yolanda play guitar if
    listens to music, yolanda listens to music if
    happy, and according to the fact, yolanda is
    happy

?- woman(mia).
?- woman(yolanda). ?- student(mia) .
?- playsAirGuitar(yolanda).
20
Systems Implementing Deductive DB
  • Bddbddb (BDD-Based Deductive DataBase)
  • ConceptBase
  • DES (Datalog Educational System)
  • DLV
  • XSB

21
Deductive DB Implementation
  • Using DES
  • Family Tree System

22
Deductive DB Implementation
  • Facts Rules

father(tom,amy). father(jack,fred). father(tony,ca
rolII). father(fred,carolIII). mother(graceI,amy).
mother(amy,fred). mother(carolI,carolII). mother(
carolII,carolIII). parent(X,Y) -
father(X,Y). parent(X,Y) - mother(X,Y). ancestor
(X,Y) - parent(X,Y). ancestor(X,Y) -
parent(X,Z), ancestor(Z,Y).
23
Deductive DB Implementation
  • Starting DES

24
Deductive DB Implementation
  • Consulting Datalog program file (load facts
    rules)

25
Deductive DB Implementation
  • Querying descendants of tom

26
Deductive DB Implementation
  • Querying parents of amy

27
Deductive DB Implementation
  • Insert john as son of fred and carolIII

28
Deductive DB Implementation
  • Remove john

29
Active DB Implementation
  • Using Oracle9i

30
Active DB Implementation
  • Making an HTTP call from PL/SQL to activate a
    Java Servlet
  • Using advanced queuing (AQ) to activate a
    message-driven bean (MDB)
  • Using AQ to notify a Java client application of
    changes in the database

declare    t_result varchar2(4000)begin   
-- do something    t_result
utl_http.request('http//www.myweb.com/myservlet?m
yparammydata')    -- do somethingend
Write a Comment
User Comments (0)
About PowerShow.com