CMU SCS Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 – DB Applications C. Faloutsos & A. Pavlo Lecture#5: Relational calculus.

Slides:



Advertisements
Similar presentations
CMU SCS Carnegie Mellon Univ. School of Computer Science /615 - DB Applications C. Faloutsos & A. Pavlo Lecture #4: Relational Algebra.
Advertisements

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Calculus Chapter 4, Part B.
Relational Calculus   Logic, like whiskey, loses its beneficial effect when taken in too large quantities. --Lord Dunsany.
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 – DB Applications Faloutsos & Pavlo Lecture#11 (R&G ch. 11) Hashing.
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications C. Faloutsos & A. Pavlo Lecture#6: Rel. model - SQL part1 (R&G, chapter.
1 541: Relational Calculus. 2 Relational Calculus  Comes in two flavours: Tuple relational calculus (TRC) and Domain relational calculus (DRC).  Calculus.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Algebra Chapter 4, Part A Modified by Donghui Zhang.
INFS614, Fall 08 1 Relational Algebra Lecture 4. INFS614, Fall 08 2 Relational Query Languages v Query languages: Allow manipulation and retrieval of.
1 Relational Calculus Chapter 4 – Part II. 2 Formal Relational Query Languages  Two mathematical Query Languages form the basis for “real” languages.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Algebra Chapter 4.
Relational Algebra Content based on Chapter 4 Database Management Systems, (Third Edition), by Raghu Ramakrishnan and Johannes Gehrke. McGraw Hill, 2003.
1 Relational Algebra & Calculus. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.  Relational.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 52 Database Systems I Relational Algebra.
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Lecture#7 (cont’d): Rel. model - SQL part3.
Relational Calculus. Another Theoretical QL-Relational Calculus n Comes in two flavors: Tuple relational calculus (TRC) and Domain relational calculus.
Relational Calculus CS 186, Spring 2007, Lecture 6 R&G, Chapter 4 Mary Roth   We will occasionally use this arrow notation unless there is danger of.
1 Relational Algebra and Calculus Yanlei Diao UMass Amherst Feb 1, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Relational Calculus R&G, Chapter 4   We will occasionally use this arrow notation unless there is danger of no confusion. Ronald Graham Elements of Ramsey.
Rutgers University Relational Algebra 198:541 Rutgers University.
Relational Algebra Chapter 4 - part I. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.  Relational.
Relational Calculus CS 186, Fall 2003, Lecture 6 R&G, Chapter 4   We will occasionally use this arrow notation unless there is danger of no confusion.
Rutgers University Relational Calculus 198:541 Rutgers University.
CSCD343- Introduction to databases- A. Vaisman1 Relational Algebra.
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications C. Faloutsos & A. Pavlo Lecture#7 : Rel. model - SQL part2 (R&G, chapters.
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Rel. model - SQL part1.
Relational Algebra.  Introduction  Relational Algebra Operations  Projection and Selection  Set Operations  Joins  Division  Tuple Relational Calculus.
1 Relational Algebra and Calculus Chapter 4. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.
Temple University – CIS Dept. CIS331– Principles of Database Systems V. Megalooikonomou Relational Model III (based on notes by Silberchatz,Korth, and.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Calculus Chapter 4, Section 4.3.
Lecture 05 Structured Query Language. 2 Father of Relational Model Edgar F. Codd ( ) PhD from U. of Michigan, Ann Arbor Received Turing Award.
Database Management Systems, R. Ramakrishnan1 Relational Calculus Chapter 4.
1 Relational Algebra. 2 Relational Query Languages v Query languages: Allow manipulation and retrieval of data from a database. v Relational model supports.
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science Database Applications Lecture#6: Relational calculus.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Relational Algebra.
Relational Calculus R&G, Chapter 4. Relational Calculus Comes in two flavors: Tuple relational calculus (TRC) and Domain relational calculus (DRC). Calculus.
Relational Calculus CS 186, Spring 2005, Lecture 9 R&G, Chapter 4   We will occasionally use this arrow notation unless there is danger of no confusion.
1 Relational Algebra & Calculus Chapter 4, Part A (Relational Algebra)
1 Relational Algebra and Calculas Chapter 4, Part A.
Relational Algebra.
1 Relational Algebra Chapter 4, Sections 4.1 – 4.2.
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Rel. model - SQL part3.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 4 Relational Algebra.
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Relational model.
Temple University – CIS Dept. CIS331– Principles of Database Systems V. Megalooikonomou Relational Model I (based on notes by Silberchatz,Korth, and Sudarshan.
CSCD34-Data Management Systems - A. Vaisman1 Relational Algebra.
IST 210 The Relational Language Todd S. Bacastow January 2004.
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Relational domain calculus.
CSC 411/511: DBMS Design Dr. Nan WangCSC411_L5_Relational Calculus 1 Relational Calculus Chapter 4 – Part B.
Relational Calculus Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY courtesy of Joe Hellerstein for some slides.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Algebra Chapter 4.
Database Management Systems, R. Ramakrishnan1 Relational Calculus Chapter 4, Part B.
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Relational tuple calculus.
Temple University – CIS Dept. CIS616– Principles of Database Systems V. Megalooikonomou Relational Model (based on notes by Silberchatz,Korth, and Sudarshan.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Algebra Chapter 4, Part A.
1 Relational Algebra. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.  Relational model supports.
Relational Calculus Chapter 4, Section 4.3.
Relational Algebra & Calculus
Temple University – CIS Dept. CIS661– Principles of Database Systems
Relational Calculus Chapter 4, Part B
Lecture #4: Relational Algebra
Relational Algebra 461 The slides for this text are organized into chapters. This lecture covers relational algebra, from Chapter 4. The relational calculus.
CS 186, Spring 2007, Lecture 6 R&G, Chapter 4 Mary Roth
Database Applications (15-415) Relational Calculus Lecture 6, September 6, 2016 Mohammad Hammoud.
Lecture#5: Relational calculus
Relational Calculus.
CS 186, Fall 2002, Lecture 8 R&G, Chapter 4
CS 186, Spring 2007, Lecture 6 R&G, Chapter 4 Mary Roth
Relational Algebra & Calculus
Relational Calculus Chapter 4, Part B 7/1/2019.
Relational Calculus Chapter 4, Part B
Presentation transcript:

CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 – DB Applications C. Faloutsos & A. Pavlo Lecture#5: Relational calculus

CMU SCS Faloutsos - PavloCMU SCS /615#2 General Overview - rel. model history concepts Formal query languages –relational algebra –rel. tuple calculus –rel. domain calculus

CMU SCS Faloutsos - PavloCMU SCS /615#3 Overview - detailed rel. tuple calculus –why? –details –examples –equivalence with rel. algebra –more examples; ‘safety’ of expressions rel. domain calculus + QBE

CMU SCS Faloutsos - PavloCMU SCS /615#4 Motivation Q: weakness of rel. algebra? A: procedural –describes the steps (ie., ‘how’) –(still useful, for query optimization)

CMU SCS Faloutsos - PavloCMU SCS /615#5 Solution: rel. calculus –describes what we want –two equivalent flavors: ‘tuple’ and ‘domain’ calculus –basis for SQL and QBE, resp. –Useful for proofs (see query optimization, later)

CMU SCS Faloutsos - PavloCMU SCS /615#6 Rel. tuple calculus (RTC) first order logic ‘Give me tuples ‘t’, satisfying predicate P - eg:

CMU SCS Faloutsos - PavloCMU SCS /615#7 Details symbols allowed: quantifiers

CMU SCS Faloutsos - PavloCMU SCS /615#8 Specifically Atom

CMU SCS Faloutsos - PavloCMU SCS /615#9 Specifically Formula: –atom –if P1, P2 are formulas, so are –if P(s) is a formula, so are

CMU SCS Faloutsos - PavloCMU SCS /615#10 Specifically Reminders: –DeMorgan –implication: –double negation: ‘every human is mortal : no human is immortal’

CMU SCS Faloutsos - PavloCMU SCS /615#11 Reminder: our Mini-U db

CMU SCS Faloutsos - PavloCMU SCS /615#12 Examples find all student records output tuple of type ‘STUDENT’

CMU SCS (Goal: evidence that RTC = RA) Full proof: complicated We’ll just show examples of the 5 RA fundamental operators, and how RTC can handle them (Quiz: which are the 5 fundamental op’s?) Faloutsos - PavloCMU SCS /615#13

CMU SCS Faloutsos - PavloCMU SCS /615#14 selection projection cartesian product MALE x FEMALE set union set difference R - S FUNDAMENTAL Relational operators R U S

CMU SCS Faloutsos - PavloCMU SCS /615#15 Examples (selection) find student record with ssn=123

CMU SCS Faloutsos - PavloCMU SCS /615#16 Examples (selection) find student record with ssn=123  selection  projection X cartesian product U set union - set difference ✔

CMU SCS Faloutsos - PavloCMU SCS /615#17 Examples (projection) find name of student with ssn=123

CMU SCS Faloutsos - PavloCMU SCS /615#18 Examples (projection) find name of student with ssn=123 ‘t’ has only one column  selection  projection X cartesian product U set union - set difference ✔ ✔

CMU SCS Faloutsos - PavloCMU SCS /615#19 ‘Tracing’ s t

CMU SCS Faloutsos - PavloCMU SCS /615#20 Examples cont’d (union) get records of both PT and FT students  selection  projection X cartesian product U set union - set difference ✔ ✔ ✔

CMU SCS Faloutsos - PavloCMU SCS /615#21 Examples cont’d (union) get records of both PT and FT students

CMU SCS Faloutsos - PavloCMU SCS /615#22 Examples difference: find students that are not staff (assuming that STUDENT and STAFF are union-compatible)  selection  projection X cartesian product U set union - set difference ✔ ✔ ✔ ✔

CMU SCS Faloutsos - PavloCMU SCS /615#23 Examples difference: find students that are not staff

CMU SCS Faloutsos - PavloCMU SCS /615#24 Cartesian product eg., dog-breeding: MALE x FEMALE gives all possible couples x =

CMU SCS Faloutsos - PavloCMU SCS /615#25 Cartesian product find all the pairs of (male, female)  selection  projection X cartesian product U set union - set difference ✔ ✔ ✔ ✔ ✔

CMU SCS Faloutsos - PavloCMU SCS /615#26 ‘Proof’ of equivalence rel. algebra rel. tuple calculus  selection  projection X cartesian product U set union - set difference ✔ ✔ ✔ ✔ ✔

CMU SCS Faloutsos - PavloCMU SCS /615#27 Overview - detailed rel. tuple calculus –why? –details –examples –equivalence with rel. algebra –more examples; ‘safety’ of expressions re. domain calculus + QBE

CMU SCS Faloutsos - PavloCMU SCS /615#28 More examples join: find names of students taking

CMU SCS Faloutsos - PavloCMU SCS /615#29 Reminder: our Mini-U db

CMU SCS Faloutsos - PavloCMU SCS /615#30 More examples join: find names of students taking

CMU SCS Faloutsos - PavloCMU SCS /615#31 More examples join: find names of students taking projection selection join (Remember: ‘SPJ’ )

CMU SCS Faloutsos - PavloCMU SCS /615#32 More examples 3-way join: find names of students taking a 2-unit course

CMU SCS Faloutsos - PavloCMU SCS /615#33 Reminder: our Mini-U db

CMU SCS Faloutsos - PavloCMU SCS /615#34 More examples 3-way join: find names of students taking a 2-unit course selection projection join

CMU SCS Faloutsos - PavloCMU SCS /615#35 More examples 3-way join: find names of students taking a 2-unit course - in rel. algebra??

CMU SCS Faloutsos - PavloCMU SCS /615#36 More examples 3-way join: find names of students taking a 2-unit course - in rel. algebra??

CMU SCS Faloutsos - PavloCMU SCS /615#37 Even more examples: self -joins: find Tom’s grandparent(s)

CMU SCS Faloutsos - PavloCMU SCS /615#38 Even more examples: self -joins: find Tom’s grandparent(s)

CMU SCS Faloutsos - PavloCMU SCS /615#39 Hard examples: DIVISION find suppliers that shipped all the ABOMB parts !

CMU SCS Faloutsos - PavloCMU SCS /615#40 Hard examples: DIVISION find suppliers that shipped all the ABOMB parts !

CMU SCS Faloutsos - PavloCMU SCS /615#41 General pattern three equivalent versions: –1) if it’s bad, he shipped it –2)either it was good, or he shipped it –3) there is no bad shipment that he missed !

CMU SCS Faloutsos - PavloCMU SCS /615#42 General pattern three equivalent versions: –1) if it’s bad, he shipped it –2)either it was good, or he shipped it –3) there is no bad shipment that he missed a  b  a  b !

CMU SCS Faloutsos - PavloCMU SCS /615#43 General pattern three equivalent versions: –1) if it’s bad, he shipped it –2)either it was good, or he shipped it –3) there is no bad shipment that he missed !

CMU SCS Faloutsos - PavloCMU SCS /615#44 a  b is the same as  a  b If a is true, b must be true for the implication to be true. If a is true and b is false, the implication evaluates to false. If a is not true, we don’t care about b, the expression is always true. a T F T F b T TT F

CMU SCS Faloutsos - PavloCMU SCS /615#45 More on division find (SSNs of) students that take all the courses that ssn=123 does (and maybe even more) find students ‘s’ so that if 123 takes a course => so does ‘s’

CMU SCS Faloutsos - PavloCMU SCS /615#46 More on division find students that take all the courses that ssn=123 does (and maybe even more)

CMU SCS Faloutsos - PavloCMU SCS /615#47 Safety of expressions FORBIDDEN: It has infinite output!! Instead, always use

CMU SCS Faloutsos - PavloCMU SCS /615#48 Overview - conclusions rel. tuple calculus: DECLARATIVE –dfn –details –equivalence to rel. algebra rel. domain calculus + QBE

CMU SCS Faloutsos - PavloCMU SCS /615#49 General Overview relational model Formal query languages –relational algebra –rel. tuple calculus –rel. domain calculus

CMU SCS Faloutsos - PavloCMU SCS /615#50 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’

CMU SCS Faloutsos - PavloCMU SCS /615#51 Rel. Dom. Calculus find STUDENT record with ssn=123’

CMU SCS Faloutsos - PavloCMU SCS /615#52 Details Like R.T.C - symbols allowed: quantifiers

CMU SCS Faloutsos - PavloCMU SCS /615#53 Details but: domain (= column) variables, as opposed to tuple variables, eg: ssn name address

CMU SCS Faloutsos - PavloCMU SCS /615#54 Reminder: our Mini-U db

CMU SCS Faloutsos - PavloCMU SCS /615#55 Examples find all student records RTC:

CMU SCS Faloutsos - PavloCMU SCS /615#56 Examples (selection) find student record with ssn=123

CMU SCS (‘Proof’ of RDC = RA) Again, we show examples of the 5 fundamental operators, in RDC Faloutsos - PavloCMU SCS /615#57

CMU SCS Faloutsos - PavloCMU SCS /615#58 Examples (selection) find student record with ssn=123 RTC:

CMU SCS Faloutsos - PavloCMU SCS /615#59 Examples (selection) find student record with ssn=123 RTC: or

CMU SCS Faloutsos - PavloCMU SCS /615#60 Examples (projection) find name of student with ssn=123

CMU SCS Faloutsos - PavloCMU SCS /615#61 Examples (projection) find name of student with ssn=123 need to ‘restrict’ “a” RTC:

CMU SCS Faloutsos - PavloCMU SCS /615#62 Examples cont’d (union) get records of both PT and FT students RTC:

CMU SCS Faloutsos - PavloCMU SCS /615#63 Examples cont’d (union) get records of both PT and FT students

CMU SCS Faloutsos - PavloCMU SCS /615#64 Examples difference: find students that are not staff RTC:

CMU SCS Faloutsos - PavloCMU SCS /615#65 Examples difference: find students that are not staff

CMU SCS Faloutsos - PavloCMU SCS /615#66 Cartesian product eg., dog-breeding: MALE x FEMALE gives all possible couples x =

CMU SCS Faloutsos - PavloCMU SCS /615#67 Cartesian product find all the pairs of (male, female) - RTC:

CMU SCS Faloutsos - PavloCMU SCS /615#68 Cartesian product find all the pairs of (male, female) - RDC:

CMU SCS Faloutsos - PavloCMU SCS /615#69 Cartesian product find all the pairs of (male, female) - RDC:

CMU SCS Faloutsos - PavloCMU SCS /615#70 ‘Proof’ of equivalence rel. algebra rel. domain calculus rel. tuple calculus

CMU SCS Faloutsos - PavloCMU SCS /615#71 Overview - detailed rel. domain calculus –why? –details –examples –equivalence with rel. algebra –more examples; ‘safety’ of expressions

CMU SCS Faloutsos - PavloCMU SCS /615#72 More examples join: find names of students taking

CMU SCS Faloutsos - PavloCMU SCS /615#73 Reminder: our Mini-U db

CMU SCS Faloutsos - PavloCMU SCS /615#74 More examples join: find names of students taking in RTC

CMU SCS Faloutsos - PavloCMU SCS /615#75 More examples join: find names of students taking in RDC

CMU SCS Faloutsos - PavloCMU SCS /615#76 Sneak preview of QBE:

CMU SCS Faloutsos - PavloCMU SCS /615#77 Glimpse of QBE: very user friendly heavily based on RDC very similar to MS Access interface and pgAdminIII

CMU SCS Faloutsos - PavloCMU SCS /615#78 More examples 3-way join: find names of students taking a 2-unit course - in RTC: selection projection join

CMU SCS Faloutsos - PavloCMU SCS /615#79 Reminder: our Mini-U db _x.P _x_y 2

CMU SCS Faloutsos - PavloCMU SCS /615#80 More examples 3-way join: find names of students taking a 2-unit course

CMU SCS Faloutsos - PavloCMU SCS /615#81 More examples 3-way join: find names of students taking a 2-unit course

CMU SCS Faloutsos - PavloCMU SCS /615#82 Even more examples: self -joins: find Tom’s grandparent(s)

CMU SCS Faloutsos - PavloCMU SCS /615#83 Even more examples: self -joins: find Tom’s grandparent(s)

CMU SCS Faloutsos - PavloCMU SCS /615#84 Even more examples: self -joins: find Tom’s grandparent(s)

CMU SCS Faloutsos - PavloCMU SCS /615#85 Even more examples: self -joins: find Tom’s grandparent(s)

CMU SCS Faloutsos - PavloCMU SCS /615#86 Hard examples: DIVISION find suppliers that shipped all the ABOMB parts

CMU SCS Faloutsos - PavloCMU SCS /615#87 Hard examples: DIVISION find suppliers that shipped all the ABOMB parts

CMU SCS Faloutsos - PavloCMU SCS /615#88 Hard examples: DIVISION find suppliers that shipped all the ABOMB parts

CMU SCS Faloutsos - PavloCMU SCS /615#89 More on division find students that take all the courses that ssn=123 does (and maybe even more)

CMU SCS Faloutsos - PavloCMU SCS /615#90 More on division find students that take all the courses that ssn=123 does (and maybe even more)

CMU SCS Faloutsos - PavloCMU SCS /615#91 Safety of expressions similar to RTC FORBIDDEN:

CMU SCS Faloutsos - PavloCMU SCS /615#92 Overview - detailed rel. domain calculus + QBE –dfn –details –equivalence to rel. algebra

CMU SCS Faloutsos - PavloCMU SCS /615#93 Fun Drill:Your turn … Schema: Movie(title, year, studioName) ActsIn(movieTitle, starName) Star(name, gender, birthdate, salary)

CMU SCS Faloutsos - PavloCMU SCS /615#94 Your turn … Queries to write in TRC: –Find all movies by Paramount studio –… movies starring Kevin Bacon –Find stars who have been in a film w/Kevin Bacon –Stars within six degrees of Kevin Bacon* –Stars connected to K. Bacon via any number of films** * Try two degrees for starters ** Good luck with this one!

CMU SCS Faloutsos - PavloCMU SCS /615#95 Answers … Find all movies by Paramount studio {M | M  Movie  M.studioName = ‘Paramount’}

CMU SCS Faloutsos - PavloCMU SCS /615#96 Answers … Movies starring Kevin Bacon {M | M  Movie   A  ActsIn(A.movieTitle = M.title  A.starName = ‘Bacon’))}

CMU SCS Faloutsos - PavloCMU SCS /615#97 Answers … Stars who have been in a film w/Kevin Bacon {S | S  Star   A  ActsIn(A.starName = S.name   A2  ActsIn(A2.movieTitle = A.movieTitle  A2.starName = ‘Bacon’))} moviestar A2: S: name… ‘Bacon’ moviestar A:

CMU SCS Faloutsos - PavloCMU SCS /615#98 Answers … Stars within six degrees of Kevin Bacon {S | S  Star   A  ActsIn(A.starName = S.name   A2  ActsIn(A2.movieTitle = A.movieTitle   A3  ActsIn(A3.starName = A2.starName   A4  ActsIn(A4.movieTitle = A3.movieTitle  A4.starName = ‘Bacon’))} two

CMU SCS Faloutsos - PavloCMU SCS /615#99 Two degrees: S: name… ‘Bacon’ moviestar A4: moviestar A3:

CMU SCS Faloutsos - PavloCMU SCS /615#100 Two degrees: S: name… ‘Bacon’ moviestar A2: moviestar A: moviestar A4: moviestar A3:

CMU SCS Faloutsos - PavloCMU SCS /615#101 Answers … Stars connected to K. Bacon via any number of films Sorry … that was a trick question –Not expressible in relational calculus!! What about in relational algebra? –No – RA, RTC, RDC are equivalent

CMU SCS Faloutsos - PavloCMU SCS /615#102 Expressive Power Expressive Power (Theorem due to Codd): –Every query that can be expressed in relational algebra can be expressed as a safe query in RDC / RTC; the converse is also true. Relational Completeness: Query language (e.g., SQL) can express every query that is expressible in relational algebra/calculus. (actually, SQL is more powerful, as we will see…)

CMU SCS Faloutsos - PavloCMU SCS /615#103 Summary The relational model has rigorously defined query languages — simple and powerful. Relational algebra is more operational/procedural –useful as internal representation for query evaluation plans Relational calculus is declarative –users define queries in terms of what they want, not in terms of how to compute it.

CMU SCS Faloutsos - PavloCMU SCS /615#104 Summary - cnt’d Several ways of expressing a given query –a query optimizer chooses best plan. Algebra and safe calculus: same expressive power => relational completeness.