SlideServe
Menu
Préférences
© SlideServe · v2026

Database Applications: Comprehensive Overview of Relational Domain Calculus

quinta avatar
43 diapositives · 556 Views · Nov 25, 2012

Relational model, formal query languages, relational algebra, relational tuple calculus, and domain calculus. Understand the basis for query-by-example (QBE) and practice with examples.

Database Applications: Comprehensive Overview of Relational Domain Calculus - slide 1
01 / 43Database Applications: Comprehensive Overview of Relational Domain Calculus
1 / 17

Télécharger la présentation

Database Applications: Comprehensive Overview of Relational Domain Calculus
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Carnegie Mellon Univ.Dept. of Computer Science15-415 - Database Applications C. Faloutsos Relational domain calculus

  2. General Overview • relational model • Formal query languages • relational algebra • rel. tuple calculus • rel. domain calculus 15-415 - C. Faloutsos

  3. Overview - detailed • rel. tuple calculus • dfn • details • equivalence to rel. algebra • rel. domain calculus + QBE 15-415 - C. Faloutsos

  4. Rel. domain calculus (RDC) • Q: why? • A: slightly easier than RTC, although equivalent - basis for QBE. • idea: domain variables (w/ F.O.L.) - eg: • ‘find STUDENT record with ssn=123’ 15-415 - C. Faloutsos

  5. Rel. Dom. Calculus • find STUDENT record with ssn=123’ 15-415 - C. Faloutsos

  6. Details • Like R.T.C - symbols allowed: • quantifiers 15-415 - C. Faloutsos

  7. Details • but: domain (= column) variables, as opposed to tuple variables, eg: ssn address name 15-415 - C. Faloutsos

  8. Reminder: our Mini-U db 15-415 - C. Faloutsos

  9. Examples • find all student records RTC: 15-415 - C. Faloutsos

  10. Examples • (selection) find student record with ssn=123 15-415 - C. Faloutsos

  11. Examples • (selection) find student record with ssn=123 or RTC: 15-415 - C. Faloutsos

  12. Examples • (projection) find name of student with ssn=123 15-415 - C. Faloutsos

  13. Examples • (projection) find name of student with ssn=123 need to ‘restrict’ “a” RTC: 15-415 - C. Faloutsos

  14. Examples cont’d • (union) get records of both PT and FT students RTC: 15-415 - C. Faloutsos

  15. Examples cont’d • (union) get records of both PT and FT students 15-415 - C. Faloutsos

  16. Examples • difference: find students that are not staff RTC: 15-415 - C. Faloutsos

  17. Examples • difference: find students that are not staff 15-415 - C. Faloutsos

  18. Cartesian product • eg., dog-breeding: MALE x FEMALE • gives all possible couples = x 15-415 - C. Faloutsos

  19. Cartesian product • find all the pairs of (male, female) - RTC: 15-415 - C. Faloutsos

  20. Cartesian product • find all the pairs of (male, female) - RDC: 15-415 - C. Faloutsos

  21. ‘Proof’ of equivalence • rel. algebra <-> rel. domain calculus <-> rel. tuple calculus 15-415 - C. Faloutsos

  22. Overview - detailed • rel. domain calculus • why? • details • examples • equivalence with rel. algebra • more examples; ‘safety’ of expressions 15-415 - C. Faloutsos

  23. More examples • join: find names of students taking 15-415 15-415 - C. Faloutsos

  24. Reminder: our Mini-U db 15-415 - C. Faloutsos

  25. More examples • join: find names of students taking 15-415 - in RTC 15-415 - C. Faloutsos

  26. More examples • join: find names of students taking 15-415 - in RDC 15-415 - C. Faloutsos

  27. Sneak preview of QBE: 15-415 - C. Faloutsos

  28. Sneak preview of QBE: • very user friendly • heavily based on RDC • very similar to MS Access interface 15-415 - C. Faloutsos

  29. More examples • 3-way join: find names of students taking a 2-unit course - in RTC: join projection selection 15-415 - C. Faloutsos

  30. Reminder: our Mini-U db _x .P _y 2 _x _y 15-415 - C. Faloutsos

  31. More examples • 3-way join: find names of students taking a 2-unit course 15-415 - C. Faloutsos

  32. More examples • 3-way join: find names of students taking a 2-unit course 15-415 - C. Faloutsos

  33. Even more examples: • self -joins: find Tom’s grandparent(s) 15-415 - C. Faloutsos

  34. Even more examples: • self -joins: find Tom’s grandparent(s) 15-415 - C. Faloutsos

  35. Even more examples: • self -joins: find Tom’s grandparent(s) 15-415 - C. Faloutsos

  36. Even more examples: • self -joins: find Tom’s grandparent(s) 15-415 - C. Faloutsos

  37. Hard examples: DIVISION • find suppliers that shipped all the ABOMB parts 15-415 - C. Faloutsos

  38. Hard examples: DIVISION • find suppliers that shipped all the ABOMB parts 15-415 - C. Faloutsos

  39. Hard examples: DIVISION • find suppliers that shipped all the ABOMB parts 15-415 - C. Faloutsos

  40. More on division • find students that take all the courses that ssn=123 does (and maybe even more) 15-415 - C. Faloutsos

  41. More on division • find students that take all the courses that ssn=123 does (and maybe even more) 15-415 - C. Faloutsos

  42. Safety of expressions • similar to RTC • FORBIDDEN: 15-415 - C. Faloutsos

  43. Overview - detailed • rel. domain calculus + QBE • dfn • details • equivalence to rel. algebra 15-415 - C. Faloutsos