Escolar Documentos
Profissional Documentos
Cultura Documentos
Chapter Outline
Relational Algebra
Unary Relational Operations Relational Algebra Operations From Set Theory Binary Relational Operations Additional Relational Operations Examples of Queries in Relational Algebra Tuple Relational Cal ulus !omain Relational Cal ulus
Example !atabase Appli ation "CO#$A%&' O(er(ie) of the QBE language "appendix !'
Relational algebra is the basi set of operations for the relational model
These operations enable a user to spe ify basic retrieval requests "or queries'
The result of an operation is a new relation* )hi h may ha(e been formed from one or more input relations
This property ma+es the algebra , losed- "all ob.e ts in relational algebra are relations'
The result of a relational algebra expression is also a relation that represents the result of a database /uery "or retrie(al re/uest'
U%3O% " '* 3%TERSECT3O% " '* !3FFERE%CE "or #3%US* ' CARTES3A% $RO!UCT " x ' 2O3% "se(eral (ariations of 2O3% exist' !343S3O% OUTER 2O3%S* OUTER U%3O% A55RE5ATE FU%CT3O%S "These ompute summary of information1 for example* SU#* COU%T* A45* #3%* #A6'
All examples dis ussed belo) refer to the CO#$A%& database sho)n here7
The SE0ECT operation "denoted by "sigma'' is used to sele t a subset of the tuples from a relation based on a selection condition7
The sele tion ondition a ts as a filter 8eeps only those tuples that satisfy the /ualifying ondition Tuples satisfying the ondition are selected )hereas the other tuples are dis arded "filtered out'
"E#$0O&EE' Sele t the employee tuples )hose salary is greater than ;<=*===1
!%O : 9
"E#$0O&EE'
the symbol "sigma' is used to denote the select operator the sele tion ondition is a Boolean " onditional' expression spe ified on the attributes of relation R tuples that ma+e the ondition true are sele ted
appear in the result of the operation dis arded from the result of the operation
The SE0ECT operation ?sele tion ondition>"R' produ es a relation S that has the same s hema "same attributes' as R SE0ECT is ommutati(e1 ? ondition@>" ? onditionA> "R'' : ? onditionA> " ? ondition@> "R'' Be ause of ommutati(ity property* a as ade "se/uen e' of SE0ECT operations may be applied in any order1 ? ond@>"? ondA> "? ond<> "R'' : ? ondA> "? ond<> "? ond@> " R''' A as ade of SE0ECT operations may be repla ed by a single sele tion )ith a on.un tion of all the onditions1 ? ond@>"? ondA> "? ond<>"R'' : ? ond@> A%! ? ondA> A%! ? ond<>"R'''
The number of tuples in the result of a SE0ECT is less than "or e/ual to' the number of tuples in the input relation R
$RO2ECT Operation is denoted by "pi' This operation +eeps ertain columns "attributes' from a relation and dis ards the other olumns7
The list of spe ified olumns "attributes' is +ept in ea h tuple The other attributes in ea h tuple are dis arded
Example1 To list ea h employeeBs first and last name and salary* the follo)ing is used1
0%A#E* F%A#E*SA0AR&"E#$0O&EE'
"pi' is the symbol used to represent the project operation ?attribute list> is the desired list of attributes from relation R7 This is be ause the result of the project operation must be a set of tuples
The number of tuples in the result of pro.e tion ?list>"R' is al)ays less or e/ual to the number of tuples in R
3f the list of attributes in ludes a key of R* then the number of tuples in the result of $RO2ECT is equal to the number of tuples in R ?list@> " ?listA> "R' ' : ?list@> "R' as long as ?listA> ontains the attributes in ?list@>
Ce may )ant to apply se(eral relational algebra operations one after the other
Either )e an )rite the operations as a single relational algebra expression by nesting the operations* or Ce an apply one operation at a time and reate intermediate result relations7
3n the latter ase* )e must gi(e names to the relations that hold the intermediate results7
Single e+pression versus se)uence of relational operations (%+a,ple) To retrie(e the first name* last name* and salary of all employees )ho )or+ in department number D* )e must apply a sele t and a pro.e t operation Ce an )rite a single relational algebra expression as follo)s1 F%A#E* 0%A#E* SA0AR&" !%O:D"E#$0O&EE''
OR Ce an expli itly sho) the sequence of operations* gi(ing a name to ea h intermediate relation1 !E$DEE#$S !%O:D"E#$0O&EE'
RESU0T
"!E$DEE#$S'
The RE%A#E operator is denoted by "rho' 3n some ases* )e may )ant to rename the attributes of a relation or the relation name or both Useful )hen a /uery re/uires multiple operations %e essary in some ases "see 2O3% operation later'
the relation name to S* and the olumn "attribute' names to B@* B@* F77Bn the relation name only to S the column (attribute) names only to B@* B@* F77Bn
S"R' hanges1
For on(enien e* )e also use a shorthand for renaming attributes in an intermediate relation1
3f )e )rite1 G RESU0T F%A#E* 0%A#E* SA0AR& "!E$DEE#$S' G RESU0T )ill ha(e the same attribute names as !E$DEE#$S "same attributes as E#$0O&EE'
3f )e )rite1
G
RESU0T "F* #* 0* S* B* A* S6* SA0* SU* !%O' RESU0T "F7#707S7B*A*S6*SA0*SU* !%O'"!E$DEE#$S' The @= attributes of !E$DEE#$S are renamed to F* #* 0* S* B* A* S6* SA0* SU* !%O* respe ti(ely
U%3O% Operation
Binary operation* denoted by The result of R S* is a relation that in ludes all tuples that are either in R or in S or in both R and S !upli ate tuples are eliminated The t)o operand relations R and S must be ,type ompatible- "or U%3O% ompatible'
R and S must ha(e same number of attributes Ea h pair of orresponding attributes must be type ompatible "ha(e same or ompatible domains'
Example1
To retrie(e the so ial se urity numbers of all employees )ho either work in department 5 "RESU0T@ belo)' or directly supervise an employee who works in department 5 "RESU0TA belo)' Ce an use the U%3O% operation as follo)s1
The union operation produ es the tuples that are in either RESU0T@ or RESU0TA or both
!E$DEE#$S !%O:D "E#$0O&EE' RESU0T@ SS%"!E$DEE#$S' RESU0TA"SS%' SU$ERSS%"!E$DEE#$S' RESU0T RESU0T@ RESU0TA
operation
U%3O% Example
Type Compatibility of operands is re/uired for the binary set operation U%3O% * "also for 3%TERSECT3O% * and SET !3FFERE%CE H* see next slides' R@"A@* AA* 777* An' and RA"B@* BA* 777* Bn' are type ompatible if1
they ha(e the same number of attributes* and the domains of orresponding attributes are type ompatible "i7e7 dom"Ai':dom"Bi' for i:@* A* 777* n'7
The resulting relation for R@RA "also for R@RA* or R@HRA* see next slides' has the same attribute names as the first operand relation R@ "by on(ention'
3%TERSECT3O% is denoted by The result of the operation R S* is a relation that in ludes all tuples that are in both R and S
The attribute names in the result )ill be the same as the attribute names in R
SET !3FFERE%CE "also alled #3%US or E6CE$T' is denoted by H The result of R H S* is a relation that in ludes all tuples that are in R but not in S The attribute names in the result )ill be the same as the attribute names in R
%oti e that both union and interse tion are commutative operationsI that is
R S : S R* and R S : S R
Both union and interse tion an be treated as nJary operations appli able to any number of relations as both are associative operationsI that is
RHSKSHR
This operation is used to ombine tuples from t)o relations in a ombinatorial fashion7 !enoted by R"A@* AA* 7 7 7* An' x S"B@* BA* 7 7 7* Bm' Result is a relation Q )ith degree n L m attributes1
The resulting relation state has one tuple for ea h ombination of tuplesMone from R and one from S7 Nen e* if R has nR tuples "denoted as ORO : nR '* and S has nS tuples* then R x S )ill ha(e nR P nS tuples7 The t)o operands do %OT ha(e to be Qtype ompatible-
To +eep only ombinations )here the !E$E%!E%T is related to the E#$0O&EE* )e add a SE0ECT operation as follo)s Example "meaningful'1
FE#A0EEE#$S SE6:BFB"E#$0O&EE' E#$%A#ES F%A#E* 0%A#E* SS% "FE#A0EEE#$S' E#$E!E$E%!E%TS E#$%A#ES x !E$E%!E%T ACTUA0E!E$S SS%:ESS%"E#$E!E$E%!E%TS' RESU0T F%A#E* 0%A#E* !E$E%!E%TE%A#E "ACTUA0E!E$S'
RESU0T )ill no) ontain the name of female employees and their dependents
'
The se/uen e of CARTES3A% $RO!ECT follo)ed by SE0ECT is used /uite ommonly to identify and sele t related tuples from t)o relations A spe ial operation* alled 2O3% ombines this se/uen e into a single operation This operation is (ery important for any relational database )ith more than a single relation* be ause it allo)s us combine related tuples from (arious relations The general form of a .oin operation on t)o relations R"A@* AA* 7 7 7* An' and S"B@* BA* 7 7 7* Bm' is1 R ?.oin ondition>S )here R and S an be any relations that result from general relational algebra expressions 7
(cont()
Example1 Suppose that )e )ant to retrie(e the name of the manager of ea h department7
To get the managerBs name* )e need to ombine ea h !E$ART#E%T tuple )ith the E#$0O&EE tuple )hose SS% (alue mat hes the #5RSS% (alue in the department tuple7 Ce do this by using the .oin operation7 !E$TE#5R !E$ART#E%T
#5RSS%:SS%
E#$0O&EE
Combines ea h department re ord )ith the employee )ho manages the department The .oin ondition an also be spe ified as !E$ART#E%T7#5RSS%: E#$0O&EE7SS%
operation
!E$TE#5R !E$ART#E%T
#5RSS%:SS%
E#$0O&EE
So,e properties of *O
The resulting relation state has one tuple for ea h ombination of tuplesMr from R and s from S* but only if they satisfy the join condition rRAiS:sRB.S Nen e* if R has nR tuples* and S has nS tuples* then the .oin result )ill generally ha(e less than nR P nS tuples7 Only related tuples "based on the .oin ondition' )ill appear in the result
So,e properties of *O
The .oin ondition is alled theta Theta an be any general boolean expression on the attributes of R and SI for example1
#ost .oin onditions in(ol(e one or more e/uality onditions ,A%!-ed togetherI for example1
EQU32O3% Operation The most ommon use of .oin in(ol(es .oin onditions )ith equality comparisons only Su h a .oin* )here the only omparison operator used is :* is alled an EQU32O3%7
3n the result of an EQU32O3% )e al)ays ha(e one or more pairs of attributes ")hose names need not be identi al' that ha(e identi al (alues in e(ery tuple7 The 2O3% seen in the pre(ious example )as an EQU32O3%7
Another (ariation of 2O3% alled %ATURA0 2O3% M denoted by P M )as reated to get rid of the se ond "superfluous' attribute in an EQU32O3% ondition7
The standard definition of natural .oin re/uires that the t)o .oin attributes* or ea h pair of orresponding .oin attributes* have the same name in both relations 3f this is not the ase* a renaming operation is applied first7
A'"RA&
Example1 To apply a natural .oin on the !%U#BER attributes of !E$ART#E%T and !E$TE0OCAT3O%S* it is suffi ient to )rite1
Only attribute )ith the same name is !%U#BER An impli it .oin ondition is reated based on this attribute1 !E$ART#E%T7!%U#BER:!E$TE0OCAT3O%S7!%U#BER Another example1 Q R"A*B*C*!' P S"C*!*E' The impli it .oin ondition in ludes each pair of attributes )ith the same name* ,A%!-ed together1
operation
The set of operations in luding SE0ECT * $RO2ECT * U%3O% * !3FFERE%CE * RE%A#E * and CARTES3A% $RO!UCT 6 is alled a complete set be ause any other relational algebra expression an be expressed by a ombination of these fi(e operations7 For example1
R S : "R S ' H ""R S' "S R'' R ?.oin ondition>S : ?.oin ondition> "R 6 S'
!343S3O% Operation
The di(ision operation is applied to t)o relations R"T' S"6'* )here 6 subset T7 0et & : T J 6 "and hen e T : 6 &'I that is* let & be the set of attributes of R that are not attributes of S7
For a tuple t to appear in the result T of the !343S3O%* the (alues in t must appear in R in ombination )ith every tuple in S7
%+a,ple of D-2-S-O
Query Tree
An internal data stru ture to represent a /uery Standard te hni/ue for estimating the )or+ in(ol(ed in exe uting the /uery* the generation of intermediate results* and the optimiUation of exe ution %odes stand for operations li+e sele tion* pro.e tion* .oin* renaming* di(ision* F7 0eaf nodes represent base relations A tree gi(es a good (isual feel of the omplexity of the /uery and the operations in(ol(ed Algebrai Query OptimiUation onsists of re)riting the /uery or modifying the /uery tree into an e/ui(alent tree7 (see Chapter 15)
Although it is possible to retrie(e employees at ea h le(el and then ta+e their union* )e annot* in general* spe ify a /uery su h as ,retrie(e the super(isees of V2ames BorgB at all le(els- )ithout utiliUing a looping me hanism7
3n %ATURA0 2O3% and EQU32O3%* tuples )ithout a matching "or related' tuple are eliminated from the .oin result
Tuples )ith null in the .oin attributes are also eliminated This amounts to loss of information7
A set of operations* alled OUTER .oins* an be used )hen )e )ant to +eep all the tuples in R* or all those in S* or all those in both relations in the result of the .oin* regardless of )hether or not they ha(e mat hing tuples in the other relation7
Additional Relational Operations (cont() The left outer .oin operation +eeps e(ery tuple in the first or left relation R in R SI if no mat hing tuple is found in S* then the attributes of S in the .oin result are filled or ,padded- )ith null (alues7 A similar operation* right outer .oin* +eeps e(ery tuple in the se ond or right relation S in the result of R S7 A third operation* full outer .oin* denoted by +eeps all tuples in both the left and the right relations )hen no mat hing tuples are found* padding them )ith null (alues as needed7
The outer union operation )as de(eloped to ta+e the union of tuples from t)o relations if the relations are not type compatible7 This operation )ill ta+e the union of tuples in t)o relations R"6* &' and S"6* T' that are partially compatible* meaning that only some of their attributes* say 6* are type ompatible7 The attributes that are type ompatible are represented only on e in the result* and those attributes that are not type ompatible from either relation are also +ept in the result relation T"6* &* T'7
Example1 An outer union an be applied to t)o relations )hose s hemas are STU!E%T"%ame* SS%* !epartment* Ad(isor' and 3%STRUCTOR"%ame* SS%* !epartment* Ran+'7
Tuples from the t)o relations are mat hed based on ha(ing the same ombination of (alues of the shared attributesM %ame* SS%* !epartment7 3f a student is also an instru tor* both Ad(isor and Ran+ )ill ha(e a (alueI other)ise* one of these t)o attributes )ill be null7 The result relation STU!E%TEORE3%STRUCTOR )ill ha(e the follo)ing attributes1
Rel R A @ < B A 9 B 9 W
Rel S C D X
A type of re/uest that annot be expressed in the basi relational algebra is to spe ify mathemati al aggregate functions on olle tions of (alues from the database7 Examples of su h fun tions in lude retrie(ing the a(erage or total salary of all employees or the total number of employee tuples7
These fun tions are used in simple statisti al /ueries that summariUe information from the database tuples7 SU#* A4ERA5E* #A63#U#* and #3%3#U#7
#A6 Salary "E#$0O&EE' retrie(es the maximum salary (alue from the E#$0O&EE relation #3% Salary "E#$0O&EE' retrie(es the minimum Salary (alue from the E#$0O&EE relation SU# Salary "E#$0O&EE' retrie(es the sum of the Salary from the E#$0O&EE relation COU%T SS%* A4ERA5E Salary "E#$0O&EE' omputes the ount "number' of employees and their a(erage salary
%ote1 ount .ust ounts the number of ro)s* )ithout remo(ing dupli ates
The pre(ious examples all summariUed one or more attributes for a set of tuples
5rouping an be ombined )ith Aggregate Fun tions Example1 For ea h department* retrie(e the !%O* COU%T SS%* and A4ERA5E SA0AR& A (ariation of aggregate operation allo)s this1
5rouping attribute pla ed to left of symbol Aggregate fun tions to right of symbol !%O COU%T SS%* A4ERA5E Salary "E#$0O&EE'
Abo(e operation groups employees by !%O "department number' and omputes the ount of employees and a(erage salary per department
Q1: Retrieve the name and address of all employees who work for the Research department. RESEARCH_DEPT DNAME=Research (DEPARTMENT
RESEARCH_EMPS (RESEARCH_DEPT
DN!M"ER= DN#EMP$#%EE
EMP$#%EE
%+a,ples of 1ueries in Relational Algebra 4 Single e+pressions As a single expression* these /ueries be ome1
Q1: Retrieve the name and address of all employees who work for the Research department.
hB
!number:!no"E#$0O&EE''
Relational Calculus
A relational calculus expression reates a ne) relation* )hi h is spe ified in terms of (ariables that range o(er ro)s of the stored database relations "in tuple calculus' or o(er olumns of the stored relations "in domain calculus'7 3n a al ulus expression* there is no order of operations to spe ify ho) to retrie(e the /uery resultMa al ulus expression spe ifies only )hat information the result should ontain7
This is the main distinguishing feature bet)een relational algebra and relational al ulus7
Relational al ulus is onsidered to be a nonprocedural or declarative language7 This differs from relational algebra* )here )e must )rite a sequence of operations to spe ify a retrie(al re/uestI hen e relational algebra an be onsidered as a procedural )ay of stating a /uery7
The tuple relational al ulus is based on spe ifying a number of tuple (ariables7 Ea h tuple (ariable usually ranges o(er a parti ular database relation* meaning that the (ariable may ta+e as its (alue any indi(idual tuple from that relation7 A simple tuple relational al ulus /uery is of the form +t , C%#!(t)
)here t is a tuple (ariable and CO%! "t' is a onditional expression in(ol(ing t7 The result of su h a /uery is the set of all tuples t that satisfy CO%! "t'7
Example1 To find the first and last names of all employees )hose salary is abo(e ;D=*===* )e an )rite the follo)ing tuple al ulus expression1 +t./#)0"( t.1#)0" , "021%3""(t) )#! t.S)1)&3455555The ondition E#$0O&EE"t' spe ifies that the range relation of tuple (ariable t is E#$0O&EE7 The first and last name "$RO2ECT3O% F%A#E* 0%A#E' of ea h E#$0O&EE tuple t that satisfies the ondition t7SA0AR&>D==== "SE0ECT3O% SA0AR& >D====' )ill be retrie(ed7
T)o spe ial symbols alled /uantifiers an appear in formulasI these are the uni(ersal /uantifier () and the existential /uantifier (). 3nformally* a tuple (ariable t is bound if it is /uantified* meaning that it appears in an ( t) or ( t) lauseI other)ise* it is free7 3f F is a formula* then so are ( t'"F' and ( t'"F'* )here t is a tuple (ariable7
The formula (t'"F' is true if the formula F e(aluates to true for some "at least one' tuple assigned to free o urren es of t in FI other)ise ( t'"F' is false7 The formula ( t'"F' is true if the formula F e(aluates to true for e(ery tuple "in the uni(erse' assigned to free o urren es of t in FI other)ise ( t'"F' is false7
is alled the uni(ersal or ,for all- /uantifier be ause e(ery tuple in ,the uni(erse of- tuples must ma+e F true to ma+e the /uantified formula true7 is alled the existential or ,there exists/uantifier be ause any tuple that exists in ,the uni(erse of- tuples may ma+e F true to ma+e the /uantified formula true7
The first tuples to ex lude "by ma+ing them e(aluate automati ally to true' are those that are not in the relation R of interest7
3n /uery abo(e* using the expression not(2&%:"CT(x)) inside the uni(ersally /uantified formula e(aluates to true all tuples x that are not in the $RO2ECT relation7
Then )e ex lude the tuples )e are not interested in from R itself7 The expression not"x7!%U#:D' e(aluates to true all tuples x that are in the pro.e t relation but are not ontrolled by department D7
Finally* )e spe ify a ondition that must hold on all the remaining tuples in R7 ( ( ;)(<%&=S$%#(;) and ;."SS#6e.SS# and x.2# 09"&6;.2#%)
The language S>1 is based on tuple al ulus7 3t uses the basi blo + stru ture to express the /ueries in tuple al ulus1
SE0ECT lause mentions the attributes being pro.e ted* the FRO# lause mentions the relations needed in the /uery* and the CNERE lause mentions the sele tion as )ell as the .oin onditions7
ommodate other
Another language )hi h is based on tuple al ulus is > "1 )hi h a tually uses the range (ariables as in tuple al ulus7 3ts syntax in ludes1
RA%5E OF ?(ariable name> 3S ?relation name> RETR3E4E ?list of attributes from range (ariables> CNERE ? onditions>
Then it uses
This language )as proposed in the relational !B#S 3%5RES7 "system is urrently still supported by Computer Asso iates H but the QUE0 language is no longer there'7
Another (ariation of relational al ulus alled the domain relational al ulus* or simply* domain al ulus is e/ui(alent to tuple al ulus and to relational algebra7 The language alled QBE "QueryJByJExample' that is related to domain al ulus )as de(eloped almost on urrently to SQ0 at 3B# Resear h* &or+to)n Neights* %e) &or+7 !omain al ulus )as thought of as a )ay to explain )hat QBE does7 !omain al ulus differs from tuple al ulus in the type of (ariables used in formulas1 Rather than ha(ing (ariables range o(er tuples* the (ariables range o(er single (alues from domains of attributes7 To form a relation of degree n for a /uery result* )e must ha(e n of these domain (ariablesM one for ea h attribute7
)here x@* xA* 7 7 7* xn* xnL@* xnLA* 7 7 7* xnLm are domain (ariables that range o(er domains "of attributes' and CO%! is a ondition or formula of the domain relational al ulus7
)bbreviated notation "021%3""(qrstuv;xyA) uses the (ariables )ithout the separating ommas1 "021%3""(q(r(s(t(u(v(;(x(y(A) Ten (ariables for the employee relation are needed* one to range o(er the domain of ea h attribute in order7 Of the ten (ariables /* r* s* 7 7 7* U* only u and ( are free7 Spe ify the requested attributes* B!ATE and A!!RESS* by the free domain (ariables u for B!ATE and ( for A!!RESS7 Spe ify the ondition for sele ting a tuple follo)ing the bar " O 'M namely* that the se/uen e of (alues assigned to the (ariables /rstu()xyU be a tuple of the employee relation and that the (alues for / "F%A#E'* r "#3%3T'* and s "0%A#E' be V2ohnB* VBB* and VSmithB* respe ti(ely7
This language is based on the idea of gi(ing an example of a /uery using ,example elements- )hi h are nothing but domain (ariables7 %otation1 An example element stands for a domain (ariable and is spe ified as an example (alue pre eded by the unders ore hara ter7 $7 " alled $ dot' operator "for ,print-' is pla ed in those olumns )hi h are re/uested for the result of the /uery7 A user may initially start gi(ing a tual (alues as examples* but later an get used to pro(iding a minimum number of (ariables as example elements7
The language is (ery userJfriendly* be ause it uses minimal syntax7 QBE )as fully de(eloped further )ith fa ilities for grouping* aggregation* updating et 7 and is sho)n to be e/ui(alent to SQ07 The language is a(ailable under Q#F "Query #anagement Fa ility' of !BA of 3B# and has been used in (arious )ays by other produ ts li+e ACCESS of #i rosoft* and $ARA!O67 For details* see Appendix C in the text7
10% %+a,ples
QBE initially presents a relational s hema as a ,blan+ s hema- in )hi h the user fills in the /uery as an example1
10% %+a,ples The follo)ing domain al ulus /uery an be su essi(ely minimiUed by the user as sho)n1 Query 1 +uv , ( q) ( r) ( s) ( t) ( ;) ( x) ( y) ( A) ("021%3""(qrstuv;xyA) and q67:ohn8 and r6798 and s67Smith8)
Four Su
10% %+a,ples
Spe ifying omplex onditions in QBE1 A te hni/ue alled the , ondition box- is used in QBE to state more in(ol(ed Boolean expressions as onditions7 The C79"a' gi(es employees )ho )or+ on either pro.e t @ or A* )hereas the /uery in C79"b' gi(es those )ho )or+ on both the pro.e ts7
Complex Conditions )ith and )ithout a ondition box as a part of QBE Query
*O
in 10% $ %+a,ples
The .oin is simply a omplished by using the same example element "(ariable )ith unders ore' in the olumns being .oined from different "or same as in C7D "b'' relation7 %ote that the Result is set us as an independent table to sho) (ariables from multiple relations pla ed in the result7
$erforming 2oin )ith ommon example elements and use of a RESU0T relation
A33R%3A'-O
in 10%
Aggregation is a omplished by using 7C%T for ount*7#A6* 7#3%* 7A45 for the orresponding aggregation fun tions 5rouping is a omplished by 75 operator7 Condition Box may use onditions on groups "similar to NA43%5 lause in SQ0 H see Se tion \7D7\'
Chapter Su,,ar#
Relational Algebra
Unary Relational Operations Relational Algebra Operations From Set Theory Binary Relational Operations Additional Relational Operations Examples of Queries in Relational Algebra Tuple Relational Cal ulus !omain Relational Cal ulus