🗊 Презентация Relational Calculus

Категория: Образование
Нажмите для полного просмотра!
Relational Calculus, слайд №1 Relational Calculus, слайд №2 Relational Calculus, слайд №3 Relational Calculus, слайд №4 Relational Calculus, слайд №5 Relational Calculus, слайд №6 Relational Calculus, слайд №7 Relational Calculus, слайд №8 Relational Calculus, слайд №9 Relational Calculus, слайд №10 Relational Calculus, слайд №11 Relational Calculus, слайд №12 Relational Calculus, слайд №13 Relational Calculus, слайд №14 Relational Calculus, слайд №15 Relational Calculus, слайд №16 Relational Calculus, слайд №17 Relational Calculus, слайд №18 Relational Calculus, слайд №19 Relational Calculus, слайд №20 Relational Calculus, слайд №21 Relational Calculus, слайд №22 Relational Calculus, слайд №23 Relational Calculus, слайд №24 Relational Calculus, слайд №25 Relational Calculus, слайд №26 Relational Calculus, слайд №27 Relational Calculus, слайд №28

Вы можете ознакомиться и скачать презентацию на тему Relational Calculus. Доклад-сообщение содержит 28 слайдов. Презентации для любого класса можно скачать бесплатно. Если материал и наш сайт презентаций Mypresentation Вам понравились – поделитесь им с друзьями с помощью социальных кнопок и добавьте в закладки в своем браузере.

Слайды и текст этой презентации


Слайд 1


Lecture 7. Relational calculus National Aviation University Computer Science Faculty Department of Software Engineering
Описание слайда:
Lecture 7. Relational calculus National Aviation University Computer Science Faculty Department of Software Engineering

Слайд 2


CONTENTS Relational calculus (tuple, domain) Codd calculus ALPHA language Equivalence and completeness Examples
Описание слайда:
CONTENTS Relational calculus (tuple, domain) Codd calculus ALPHA language Equivalence and completeness Examples

Слайд 3


Set theory and logic
Описание слайда:
Set theory and logic

Слайд 4


Relational calculus Subset of formulas of the predicate calculus Formal description of WHAT it is necessary to select from DB. Example: NL - “Output...
Описание слайда:
Relational calculus Subset of formulas of the predicate calculus Formal description of WHAT it is necessary to select from DB. Example: NL - “Output faculties with Fund > 10000" RL - {t | (FAC(t) & t.fund > 10000} It has possibility of query languages but does not have data manipulation possibilities (just the same as relational algebra) Two variants of relational calculus: Tuple relational calculus (TRC) – variables represent rows of relations Domain relational calculus (DRC) - variables represent domains of attributes of relations

Слайд 5


Tuple relational calculus (TRC) Query (in simple case) has the form {t | (F(t)} t - tuple variable; F(t) – formula that contains tuple variable t...
Описание слайда:
Tuple relational calculus (TRC) Query (in simple case) has the form {t | (F(t)} t - tuple variable; F(t) – formula that contains tuple variable t Answer. Is the set of all tuples t for which the formula F(t) evaluates to true. Formula. It is recursively defined from simple atomic formulas (get tuples from relations or make comparison of values) and build more complex formulas using the logical connectives and quintifiers. SQL. It is formal foundation of SQL language.

Слайд 6


TRC – basic components
Описание слайда:
TRC – basic components

Слайд 7


TRC – Well formed formulas Atomic formulas: P(t) - P – predicate symbol, - t - tuple variable. If Р interpreted by relation R then P(t) means t  R...
Описание слайда:
TRC – Well formed formulas Atomic formulas: P(t) - P – predicate symbol, - t - tuple variable. If Р interpreted by relation R then P(t) means t  R t.a θ t.b - t.a and t.b – tuple projections t.a θ с - t.a – tuple projection, с - constant Well formed formulas (wff): Atomic formulas are wff; If F is wff then F and (F) are wff If F and G are wff then F  G, F  G, F  G are wff If F is wff with free variable t then tF(t) and tF(t) are wff with bound variable t.

Слайд 8


TRC – Free and bound variables. Queries.
Описание слайда:
TRC – Free and bound variables. Queries.

Слайд 9


Example of DB for queries in TRC FAC FACULTY (FNo, Name, Dean, Bld, Fund) DEP DEPARTMENT (DNo, FNo, Name, Head, Bld, Fund) TCH TEACHER(TNo, DNo,...
Описание слайда:
Example of DB for queries in TRC FAC FACULTY (FNo, Name, Dean, Bld, Fund) DEP DEPARTMENT (DNo, FNo, Name, Head, Bld, Fund) TCH TEACHER(TNo, DNo, Name, Post, Tel, Salary, Comm) GRP GROUP(GNo, DNo, Course, Num, Quantity, CurNo) SBJ SUBJECT(SNo, Name) ROM ROOM (RNo, Num, Building, Seats) LEC LECTURE (TNo, GNo, SNo, RNo, Type, Day, Week)

Слайд 10


TRC – Examples of projection, selection and join
Описание слайда:
TRC – Examples of projection, selection and join

Слайд 11


TRC – Examples of existential quantifiers
Описание слайда:
TRC – Examples of existential quantifiers

Слайд 12


TRC – Examples of universal quantifiers
Описание слайда:
TRC – Examples of universal quantifiers

Слайд 13


TRC - Save formulas and queries Query is safe if: All variables in the formula are restricted; All logical connectives in the formula are restricted;...
Описание слайда:
TRC - Save formulas and queries Query is safe if: All variables in the formula are restricted; All logical connectives in the formula are restricted; All quantifiers in the formula are restricted.

Слайд 14


Restricted variables Variable t is restricted if : It belongs to a predicate Р(t), where Р is interpreted by DB relation; It appears in the formula...
Описание слайда:
Restricted variables Variable t is restricted if : It belongs to a predicate Р(t), where Р is interpreted by DB relation; It appears in the formula t.a1 = c1 & ... & t.an = cn, where a1,..., an are all attributes of the tuple t, and c1, ..., cn are constants; It appears in the formula t = s, where s is restricted variable.

Слайд 15


Restricted logical connectives
Описание слайда:
Restricted logical connectives

Слайд 16


Restricted quantifiers
Описание слайда:
Restricted quantifiers

Слайд 17


Domain Relational Calculus (DRC) Query has the form {x1,x2,...,xn | (F(x1,x2,...,xn)} x1,x2,...,xn - attributes domain variables; F(x1,x2,...,xn) – a...
Описание слайда:
Domain Relational Calculus (DRC) Query has the form {x1,x2,...,xn | (F(x1,x2,...,xn)} x1,x2,...,xn - attributes domain variables; F(x1,x2,...,xn) – a formula with the only free variables x1,x2,...,xn Answer. Set of such tuples , that evaluates the formula F to true value. Formula. It is recursively defined by using atomic formulas and more complex formulas with the help of logical connectives and quantifiers just the same as in tuple relational calculus. Safe formulas are defined just the same as in tuple relational calculus. QBE. Is a formal base of QBE language.

Слайд 18


Example of queries in DRC
Описание слайда:
Example of queries in DRC

Слайд 19


Equivalence of RA, TRC, DRC and relational completeness.
Описание слайда:
Equivalence of RA, TRC, DRC and relational completeness.

Слайд 20


Codd relational calculus (СRС)
Описание слайда:
Codd relational calculus (СRС)

Слайд 21


CRC – basic components
Описание слайда:
CRC – basic components

Слайд 22


CRC – well formed formulas Terms: P.t – value term: P - predicate, t - tuple variable. If Р is interpreted by relation R, then P.t means t  R t[i] θ...
Описание слайда:
CRC – well formed formulas Terms: P.t – value term: P - predicate, t - tuple variable. If Р is interpreted by relation R, then P.t means t  R t[i] θ s[j], t[i] = c - join term Examples: t1[3] = t2[1]; t4[7] = 15 Formula well defined over tuple variable: All predicate symbols is interpreted by relations that are union compatible . This formula contains only value terms with the only tuple variable. Value terms are connected by logical operands , &, . More over, operand  directly preceded by operand &. Examples: P1.t  P2.t  (P3.t & P4.t); (P1.t  P2.t) & P3.t.

Слайд 23


Formula well defined over quantifiers
Описание слайда:
Formula well defined over quantifiers

Слайд 24


Formula with domain of definition
Описание слайда:
Formula with domain of definition

Слайд 25


Alpha expression
Описание слайда:
Alpha expression

Слайд 26


ALPHA language Simplified syntax: RANGE [ SOME | ALL] … GET ( ) : range – it shows name of the the tuple variable of the relation . SOME | ALL – is...
Описание слайда:
ALPHA language Simplified syntax: RANGE [ SOME | ALL] … GET ( ) : range – it shows name of the the tuple variable of the relation . SOME | ALL – is it necessary to interpret variable with existential or universal quantifier? workspace – it is name of temporary work relation that contains result of executing of GET command. target list – target list of tuple variables and their projections; they show columns that are projected into the resulting relation. wff – well wormed formula of the tuple relational calculus

Слайд 27


Example of queries in ALPHA and CRC
Описание слайда:
Example of queries in ALPHA and CRC

Слайд 28


Summary
Описание слайда:
Summary



Теги Relational Calculus
Похожие презентации
Mypresentation.ru
Загрузить презентацию