12.07.2015 Views

Electronics Research Lab Design Postgres 1985 - the Information ...

Electronics Research Lab Design Postgres 1985 - the Information ...

Electronics Research Lab Design Postgres 1985 - the Information ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

etrieve* into SUBORDWATES(E .name, E .mgr)from E in EMP, S in SUBORDINATESwhere E.name ="JoneswThis command continues to execute <strong>the</strong> Retrieve-into command until <strong>the</strong>re are nochanges made to <strong>the</strong> SUBORDINATES relation.The "*' modifier can be appended to any of <strong>the</strong> POSTQUEL data manipulationcommands: Append, Delete, Execute, Replace, Retrieve, and Retzieve-into.Complex iterations, like <strong>the</strong> A-* heuristic search algorithm, can be specified usingsequences of <strong>the</strong>se iteration queries [STON85b].Alerters and triggers are specified by adding <strong>the</strong> keyword "always" to a query.For example, an alerter is specified by a Retrieve command such asretrieve always (EMP.all)where EMP.name = "Bill"This command returns data to <strong>the</strong> application program that issued it wheneverBill's employee record is changed.' A trigger is an update query (i.e., Append,Replace, or Delete command) with an "always" keyword. For example, <strong>the</strong>commanddelete always DEPTwhere count(EMP.name by DEPT.dnamewhere EMP.dept = DEPT.dname) = 0defines a trigger that will delete DEPT records for departments with no employees.Iteration queries differ from alerters and triggers in that iteration queries rununtil <strong>the</strong>y cease to have an effect while alerters and triggers run indefinitely. Anefficient mechanism to awaken "always" commands is described in <strong>the</strong> systemarchitecture section."Always" commands support a forward-chaining control structure in which anupdate wakes up a collection of alerters and triggers that can wake up o<strong>the</strong>rcommands. This process terminates when no new commands are awakened.POSTGRES also provides support for a backward-chaining control structure.The conventional approach to supporting inference is to extend <strong>the</strong> viewmechanism (or something equivalent) with additional capabilities (e.g. IULLM85,WONG84, JARK851). The canonical example is <strong>the</strong> definition of <strong>the</strong> ANCESTORrelation based on a stored relation PARENT:PARENT (paren t-of, offspring)Ancestor can <strong>the</strong>n be defined by <strong>the</strong> following commands:' Strictly speaking <strong>the</strong> data is returned to <strong>the</strong> program through a portal which isdefined in section 4.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!