¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

Flash Cards Relatioanl Algebra

nurhidayah.mazni Inglés 5,0Valoración media 5,0 de 5 (1 valoración) 17 fichas

Flash Cards Relatioanl Algebra

Fichas del conjunto (17)

  1. 1Basic of "RELATIONAL ALGEBRA" OperationsBasic of "RELATIONAL ALGEBRA" Operations
  2. 2Projection* Retains only attributes that are in the “projection list".
    *The 1st query will produce a relation with only one column which is age. While the 2nd query produces a relation with two columns: sname and rating.
    * The number of rows depends on the number of unique content. e.g. 1st query, 2 rows, 2nd query, 4 rows.
    # Projection operator eliminates duplicates rows .
    Projection
  3. 3Selection# Selects rows that satisfy selection condition. Can also have multiple conditions.
    # Result is a relation with same number of columns BUT probably lesser number of rows.
    Selection
  4. 4Union and Set-DifferenceAll of these operations take two input relations, which must be union compatible:
    - Same number of fields.
    - Corresponding’ fields have the same type.
    Union and Set-Difference
  5. 5UnionUnion
  6. 6Set DifferenceSet Difference
  7. 7Cross-ProductResult schema has one field per field of R1 and R2, with field names `inherited’ if possible.
    May have a naming conflict: Both R1 and R2 have a field with the same name.
    Cross-Product
  8. 8Compound Operator: IntersectionIntersection takes two input relations, which must be union-compatible..
    Q: How to express it using basic operators?
    Compound Operator: Intersection
  9. 9IntersectionIntersection
  10. 10Compound Operator: JoinJoins are compound operators involving cross product, selection, and (sometimes) projection.
    Most common type of join is a “natural join” (often just called “join”). R S conceptually is:
    Compute R X S
    Select rows where attributes that appear in both relations have equal values and domains.
    Project all unique atttributes and one copy of each of the common ones.
  11. 11Natural Join ExampleNatural Join Example
  12. 12Outer JoinsLeft outer Join: each row in R1 will appear in results even if no matching row of R2 (null).
    Right outer Join: each row in R2 will appear in results even if no matching row of R1 (null).
    Full outer Join: each row in R1 will appear in even if no matching row of R2 and each row of R2 will appear even if no matching row of R1.
  13. 13Compound Operator: DivisionExamples of Division A/B (AB)Compound Operator: Division
  14. 14Aggregate FunctionsAggregation function takes a collection of values and returns a single value as a result.
    avg: average value
    min: minimum value
    max: maximum
    value sum: sum of values
    count: number of values
  15. 15Aggregate OperationsAggregate operation in relational algebra.
    G1, G2, …, Gn ℱ F1( A1), F2( A2),…, Fn( An) (E)
    E is any relational-algebra expression.
    G1, G2 …, Gn is a list of attributes on which to group (can be empty).
    Each Fi is an aggregate function.
    Each Ai is an attribute name
  16. 16Aggregate Operation – ExampleAggregate Operation – Example
  17. 17Assignment OperationThe assignment operation () provides a convenient way to express complex queries.
    *Write query as a sequential program consisting of a series of assignments followed by an expression whose value is displayed as a result of the query.
    *Assignment must always be made to a temporary relation variable.
    Assignment Operation

Información

Descripción
Explanation more about What is Relational Algebra?
Visitas
181
Etiquetas
besttolearn
Valoración
Valoración media 5,0 de 5 (1 valoración)

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?