Title: Deductive database
1Deductive database
Active database
- Group 7
- Alexander Tan Thiam Ong WGA060040
- Beh Kee Lim
WGA060023 - Qi Han
WGA060026 - Yang Lina
WGA060004 - Zhai Chunchao
WGA060031 -
2Deductive 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.
3Deductive 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.
4Deductive 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.
5Deductive 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.
6Deductive 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.
7Deductive 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.
8Deductive 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.
9Deductive 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.
10Active 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
11Active 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 13Active 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
14Active 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
15Active 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 -
16Active 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
17Active 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.
18Datalog
- 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).
19Datalog
- 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).
20Systems Implementing Deductive DB
- Bddbddb (BDD-Based Deductive DataBase)
- ConceptBase
- DES (Datalog Educational System)
- DLV
- XSB
21Deductive DB Implementation
- Using DES
- Family Tree System
22Deductive DB Implementation
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).
23Deductive DB Implementation
24Deductive DB Implementation
- Consulting Datalog program file (load facts
rules)
25Deductive DB Implementation
- Querying descendants of tom
26Deductive DB Implementation
27Deductive DB Implementation
- Insert john as son of fred and carolIII
28Deductive DB Implementation
29Active DB Implementation
30Active 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