RELATIONAL ALGEBRA II - California Institute of Technology
RELATIONAL ALGEBRA II
CS121: Relational Databases Fall 2018 ? Lecture 3
Last Lecture
2
? Query languages provide support for retrieving information from a database
? Introduced the relational algebra
? A procedural query language ? Six fundamental operations:
n select, project, set-union, set-difference, Cartesian product, rename
? Several additional operations, built upon the fundamental operations
n set-intersection, natural join, division, assignment
Extended Operations
3
? Relational algebra operations have been extended in various ways
? More generalized ? More useful!
? Three major extensions:
? Generalized projection ? Aggregate functions ? Additional join operations
? All of these appear in SQL standards
Generalized Projection Operation
4
? Would like to include computed results into relations
? e.g. "Retrieve all credit accounts, computing the current `available credit' for each account."
? Available credit = credit limit ? current balance
? Project operation is generalized to include computed results
? Can specify functions on attributes, as well as attributes themselves
? Can also assign names to computed values ? (Renaming attributes is also allowed, even though this is also
provided by the r operator)
Generalized Projection
5
? Written as: P (E) F1, F2, ..., Fn
? Fi are arithmetic expressions ? E is an expression that produces a relation ? Can also name values: Fi as name
? Can use to provide derived attributes
? Values are always computed from other attributes stored in database
? Also useful for updating values in database
? (more on this later)
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- relational algebra ii california institute of technology
- the aggregate production function new york university
- sf simple features for r washington university in st louis
- the microeconomic foundations of aggregate production functions
- sf simple features for r
- sql aggregate functions
- hyperspec work with hyperspectral data i e spectra meta
- package aggregater cran
- package spectacles the comprehensive r archive network
- aggregation edu
Related searches
- seton institute of reconstructive surgery
- michigan institute of real estate classes
- sports institute of tucson
- institute of physics iop
- institute of physics uk
- american institute of physics
- american institute of physics citation
- american institute of physics inc
- chicago institute of plastic surgery
- indian institute of public health
- nigerian institute of international affairs
- eric institute of education science