1 / 23

The a lgebra and the calculus

The a lgebra and the calculus. …their correspondence and their differences. Kifer et all: http:// www.amazon.com / gp /product/0321228383/ref=s9_simh_gw_p14_d1_i3?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-2&pf_rd_r=0SF508JN5HZFRECYND6V&pf_rd_t=101&pf_rd_p=1389517282&pf_rd_i=507846.

kedma
Download Presentation

The a lgebra and the calculus

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The algebra and the calculus …their correspondence and their differences

  2. Kifer et all: http://www.amazon.com/gp/product/0321228383/ref=s9_simh_gw_p14_d1_i3?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-2&pf_rd_r=0SF508JN5HZFRECYND6V&pf_rd_t=101&pf_rd_p=1389517282&pf_rd_i=507846 Some of this material was taken from

  3. The set of all allowable values that a function can act on and return a meaningful result. A domain is

  4. Any system of calculating • Apparently, the word come from Latin word for rock and early folks did their counting with piles of rocks. • When we were in high school, it was the mathematics that deals with the concept of change, like the slope of a curve, as opposed to the slope of a line • Line is delta-y/delta-x • Curve varies in slope depending on where you are in the curve A calculus is

  5. It is a tuple calculus • Variables represent conceptual tuples from a table, derived table, or singleton • One can also create domain calculi SQL

  6. Form of query: {T | Condition(T)} T is the target– a variable that ranges over tuples of values Condition is the body of the query Involves T (and possibly other variables) Evaluates to true or false if a specific tuple is substituted for T Tuple calculus

  7. {T | Teaching(T) AND T.Semester = ‘F2000’} Is the same as: SELECT * FROMTeaching T WHERET.Semester = ‘F2000’ Example

  8. A domain variable is a variable whose value is drawn from the domain of an attribute • Contrast this with a tuple variable, whose value is an entire tuple • Example: The domain of a domain variable Crs might be the set of all possible values of the CrsCode attribute in the relation Teaching Domain calculus

  9. {X1 , …, Xn | condition(X1 , …, Xn)} {Pid, Code | Teaching(Pid, Code, ‘F1997’)} Domain calculus expression

  10. Algebra: R– S • TRC: {T | R(T) AND NOTS(T)} • DRC: {A,B,C | R(A,B,C) ANDNOTS(A,B,C) } Example

  11. More complete example

  12. Another example

  13. Declarative query language, like SQL • Based on DRC (rather than TRC) • Visual A visual interface

  14. In a more formal form

  15. Professor Id Name DeptId • Print all professors’ names in the MGT department P._John MGT The QBE interface

  16. Professor Id Name DeptId • MGT P. Return all attributes

  17. Professor Id Name DeptId P._John _123 Joins

  18. Condition boxes

  19. Insert a tuple

  20. A bigger example

  21. Other table based DBs: Microsoft Access

  22. Example

  23. Filemaker

More Related