ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Domain relational calculus - Wikipedia, the free encyclopedia

Domain relational calculus

From Wikipedia, the free encyclopedia

In computer science, domain relational calculus (DRC) is a calculus that was introduced by Michel Lacroix and Alain Pirotte as a declarative database query language for the relational data model.[1]

In DRC, queries have the form:

< X1,X2,....,Xn > | p( < X1,X2,....,Xn > )

where each Xi is either a domain variable or constant, and p(<X1, X2, ...., Xn>) denotes a DRC formula. The result of the query is the set of tuples Xi to Xn which makes the DRC formula true.

This language uses the same operators as tuple calculus; Logicial operators ∧ (and), ∨ (or) and ¬ (not). The existential quantifier (∃) and the universal quantifier (∀) can be used to bind the variables.

Its computational expresivity is equivalent to that of Relational algebra.[2]

[edit] Examples

Let A, B, C mean Rank, Name, ID and D, E, F to mean Name, DeptName, ID

Find all captains of the starship USS Enterprise:

\left\{ \ {\left\langle A, B, C \right\rangle} \ | \ {\left\langle A, B, C \right\rangle \in Enterprise \ \land \ A = \mathrm{Captain} } \ \right\}

In this example, A, B, C denotes both the result set and a set in the table Enterprise.

Find Names of Enterprise crewmembers who are in Stellar Cartography:


\begin{align}
{\left\langle B \right\rangle} \ & | \ {\exists A, C \ \left\langle A, B, C \right\rangle \in Enterprise } \\
                               & \land \ {\exists D, E, F \ \left\langle D, E, F \right\rangle \in Departments } \\
                               & \land \ F = C \ \land \ E = \mathrm{Stellar \ Cartography} \\
\end{align}

In this example, we're only looking for the name, and that's B. F = C is a requirement, because we need to find Enterprise crew members AND they are in the Stellar Cartography Department.

An alternate representation of the previous example would be:

\left\{ \ {\left\langle B \right\rangle} \ | \ {\exists A, C \ \left\langle A, B, C \right\rangle \in Enterprise } \ \land \ {\exists D \ \left\langle D, \mathrm{Stellar \ Cartography}, C \right\rangle \in Departments } \ \right\}

In this example, the value of the requested F domain is directly placed in the formula and the C domain variable is re-used in the query for the existence of a department, since it already holds a crew member's id.

[edit] See also


  • Aldat Relational Algebra
  • Domain algebra

[edit] References

  1. ^ Michel Lacroix, Alain Pirotte: Domain-Oriented Relational Languages. VLDB 1977: 370-378
  2. ^ E. F. Codd: Relational Completeness of Data Base Sub-languages. In R. Rustin, editor, Data Base Systems. Prentice Hall, 1972
Languages


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -