Mon, Oct 11, 1999 ------------------------ - Corrected mistake made in last class reg. DISTINCT keyword - More on safety in Datalog queries - A Mutual Recursion Example - SQL Subqueries - SQL aggregation - SQL ORDER BY clause - SQL GROUPing, HAVING etc. Wed, Oct 13, 1999 ------------------------ - Calculator button pushing - Review of PROLOG - Animals have four legs - PROLOG's Strategy - Tuple-at-a-time - Backward Chaining - Top-Down - Goal-Oriented - Depth-First - Typical RDBMS Strategy - Set-at-a-time - Forward Chaining - Bottom-Up - Query Optimization - Detailed PROLOG Example ancestor(X,Y) <- parent(X,Z), ancestor(Z,Y). ancestor(X,X). parent(amy,bob). - Example Query: Who are the ancestors of bob? ancestor(X,bob)? - What happens if we reverse the order of clauses in the first line? - entailment in PROLOG (or even first-order logic) is semi-decidable. - Commonalities between PROLOG and DBs - predicate : relation - argument : attribute - ground fact : tuple - extensional definition : table (with data) - intensional definition : view - Differences between PROLOG and DBs - (see above) - Intersection: Deductive DBMSs - Example: CORAL, XSB, LDL, LDL++ - Examples of deductive query optimization tricks - Same Generation: Hello World of DDBMSs - Magic Fri, Oct 15, 1999 ------------------------ - Interfacing DBs with PLs - the impedance mismatch problem - PL/SQL, Pro*C etc - ODBC standards - stored procedures - cursors as iterators - Views - Relations that are not - Example - Inserting tuples - Updatable Views (NULL <> NULL) - Non-updatable Views - Foreign Keys - An implementation of Referential Integrity - uses the REFERENCES construct in SQL - the REFERENCEd attribute must be the PRIMARY KEY of the other relation