diff --git a/relalg.sty b/relalg.sty index 92eed96..8df4bb3 100755 --- a/relalg.sty +++ b/relalg.sty @@ -22,28 +22,28 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % select or restrict operator -\newcommand{\Select}{\ensuremath{\sigma}} -\newcommand{\Restrict}{\ensuremath{\sigma}} +\newcommand{\RelSelect}{\ensuremath{\sigma}} +\newcommand{\RelRestrict}{\ensuremath{\sigma}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % project operator -\newcommand{\Project}{\ensuremath{\pi}} +\newcommand{\RelProject}{\ensuremath{\pi}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % set union operator -\newcommand{\Union}{\ensuremath{\cup}} +\newcommand{\RelUnion}{\ensuremath{\cup}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % set difference operator -\newcommand{\Difference}{\ensuremath{-}} +\newcommand{\RelDifference}{\ensuremath{-}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % cartesian product operator -\newcommand{\Product}{\ensuremath{\times}} +\newcommand{\RelProduct}{\ensuremath{\times}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % rename operator -\newcommand{\Rename}{\ensuremath{\rho}} +\newcommand{\RelRename}{\ensuremath{\rho}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -54,23 +54,23 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % set intersection operator -\newcommand{\Intersection}{\ensuremath{\cap}} -\newcommand{\Intersect}{\ensuremath{\cap}} +\newcommand{\RelIntersection}{\ensuremath{\cap}} +\newcommand{\RelIntersect}{\ensuremath{\cap}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % natural join operator -\newcommand{\NaturalJoin}{\ensuremath{\Join}} -\newcommand{\NatJoin}{\ensuremath{\Join}} -\newcommand{\NJoin}{\ensuremath{\Join}} +\newcommand{\RelNaturalJoin}{\ensuremath{\Join}} +\newcommand{\RelNatJoin}{\ensuremath{\Join}} +\newcommand{\RelNJoin}{\ensuremath{\Join}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % division operators -\newcommand{\Divide}{\ensuremath{/}} -\newcommand{\AltDivide}{\ensuremath{\div}} +\newcommand{\RelDivide}{\ensuremath{/}} +\newcommand{\RelAltDivide}{\ensuremath{\div}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % assignment operator -\newcommand{\Assign}{\ensuremath{\leftarrow}} +\newcommand{\RelAssign}{\ensuremath{\leftarrow}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -81,33 +81,33 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % aggregate functions -\newcommand{\Sum}[1]{\ensuremath{\mathcal{G}_{\mathbf{\mathrm{sum}}(#1)}}} -\newcommand{\Avg}[1]{\ensuremath{\mathcal{G}_{\mathbf{\mathrm{avg}}(#1)}}} -\newcommand{\Min}[1]{\ensuremath{\mathcal{G}_{\mathbf{\mathrm{min}}(#1)}}} -\newcommand{\Max}[1]{\ensuremath{\mathcal{G}_{\mathbf{\mathrm{max}}(#1)}}} -\newcommand{\Count}[1]{\ensuremath{\mathcal{G}_{\mathbf{\mathrm{count}}(#1)}}} +\newcommand{\RelSum}[1]{\ensuremath{\mathcal{G}_{\mathbf{\mathrm{sum}}(#1)}}} +\newcommand{\RelAvg}[1]{\ensuremath{\mathcal{G}_{\mathbf{\mathrm{avg}}(#1)}}} +\newcommand{\RelMin}[1]{\ensuremath{\mathcal{G}_{\mathbf{\mathrm{min}}(#1)}}} +\newcommand{\RelMax}[1]{\ensuremath{\mathcal{G}_{\mathbf{\mathrm{max}}(#1)}}} +\newcommand{\RelCount}[1]{\ensuremath{\mathcal{G}_{\mathbf{\mathrm{count}}(#1)}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % outer join operators % Note: can't use \ensuremath in these because it screws up the spacing. % The $ are OK though because they're used inside hboxes anyway. -\newcommand{\LeftOuterJoin}{\scalebox{0.5}[1]{$\sqsupset$}\mkern-2.5mu\lower0.1em\hbox{$\Join$}} -\newcommand{\leftOuterJoin}{\LeftOuterJoin} -\newcommand{\LOuterJoin}{\LeftOuterJoin} -\newcommand{\LeftOuter}{\LeftOuterJoin} -\newcommand{\LOJ}{\LeftOuterJoin} +\newcommand{\RelLeftOuterJoin}{\scalebox{0.5}[1]{$\sqsupset$}\mkern-2.5mu\lower0.1em\hbox{$\Join$}} +\newcommand{\RelleftOuterJoin}{\LeftOuterJoin} +\newcommand{\RelLOuterJoin}{\LeftOuterJoin} +\newcommand{\RelLeftOuter}{\LeftOuterJoin} +\newcommand{\RelLOJ}{\LeftOuterJoin} -\newcommand{\RightOuterJoin}{\lower0.1em\hbox{$\Join$}\mkern-2.5mu\scalebox{0.5}[1]{$\sqsubset$}} -\newcommand{\rightOuterJoin}{\RightOuterJoin} -\newcommand{\ROuterJoin}{\RightOuterJoin} -\newcommand{\RightOuter}{\RightOuterJoin} -\newcommand{\ROJ}{\RightOuterJoin} +\newcommand{\RelRightOuterJoin}{\lower0.1em\hbox{$\Join$}\mkern-2.5mu\scalebox{0.5}[1]{$\sqsubset$}} +\newcommand{\RelrightOuterJoin}{\RightOuterJoin} +\newcommand{\RelROuterJoin}{\RightOuterJoin} +\newcommand{\RelRightOuter}{\RightOuterJoin} +\newcommand{\RelROJ}{\RightOuterJoin} -\newcommand{\FullOuterJoin}{\scalebox{0.5}[1]{$\sqsupset$}\mkern-2.5mu\lower0.1em\hbox{$\Join$}\mkern-2.5mu\scalebox{0.5}[1]{$\sqsubset$}} -\newcommand{\fullOuterJoin}{\FullOuterJoin} -\newcommand{\FOuterJoin}{\FullOuterJoin} -\newcommand{\FullOuter}{\FullOuterJoin} -\newcommand{\FOJ}{\FullOuterJoin} +\newcommand{\RelFullOuterJoin}{\scalebox{0.5}[1]{$\sqsupset$}\mkern-2.5mu\lower0.1em\hbox{$\Join$}\mkern-2.5mu\scalebox{0.5}[1]{$\sqsubset$}} +\newcommand{\RelfullOuterJoin}{\FullOuterJoin} +\newcommand{\RelFOuterJoin}{\FullOuterJoin} +\newcommand{\RelFullOuter}{\FullOuterJoin} +\newcommand{\RelFOJ}{\FullOuterJoin} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -119,20 +119,23 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % logical operators % \And appears to conflict with beamer? (unconfirmed) -\newcommand{\LogicalAnd}{\ensuremath{\wedge}} -\newcommand{\LogAnd}{\ensuremath{\wedge}} +\newcommand{\RelLogicalAnd}{\ensuremath{\wedge}} +\newcommand{\RelLogAnd}{\ensuremath{\wedge}} -\newcommand{\LogicalOr}{\ensuremath{\vee}} -\newcommand{\LogOr}{\ensuremath{\vee}} +\newcommand{\RelLogicalOr}{\ensuremath{\vee}} +\newcommand{\RelLogOr}{\ensuremath{\vee}} -\newcommand{\LogicalNot}{\ensuremath{\neg}} -\newcommand{\LogNot}{\ensuremath{\neg}} +\newcommand{\RelLogicalNot}{\ensuremath{\neg}} +\newcommand{\RelLogNot}{\ensuremath{\neg}} \endinput %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % $Log$ +% Revision 1.4 2005/03/08 01:25:23 nstanger +% - Updated package date. +% % Revision 1.3 2005/03/08 01:24:51 nstanger % - Added \leftOuterJoin, \rightOuterJoin and \fullOuterJoin to make generating % them from XML easier.