jagomart
digital resources
picture1_Algebra Powerpoint 72441 | File 2013 09 21 08ː30ː01 Fajar Agung Nugroho, Kom, Cs  Ch4m


 215x       Filetype PPT       File size 0.44 MB       Source: dinus.ac.id


File: Algebra Powerpoint 72441 | File 2013 09 21 08ː30ː01 Fajar Agung Nugroho, Kom, Cs Ch4m
relational query languages query languages allow manipulation and retrieval of data from a database relational model supports simple powerful qls strong formal foundation based on logic allows for much optimization ...

icon picture PPT Filetype Power Point PPT | Posted on 31 Aug 2022 | 3 years ago
Partial capture of text on file.
       Relational Query Languages
  Query languages:  Allow manipulation and 
    retrieval of data from a database.
  Relational model supports simple, powerful QLs:
      Strong formal foundation based on logic.
      Allows for much optimization.
  Query Languages != programming languages
      QLs not expected to be “Turing complete”.
      QLs not intended to be used for complex calculations.
      QLs support easy, efficient access to large data sets.
                                                                   2
       Formal Relational Query 
       Languages
    Two mathematical Query Languages form 
       the basis for “real” languages (e.g. SQL), 
       and for implementation:
        Relational Algebra:  More operational 
         (procedural), useful for representing execution 
         plans.
        Relational Calculus:   Allows users to describe 
         what they want, rather than how to compute it: 
         Non-operational, declarative.
                                                               3
        Preliminaries
    A query is applied to relation instances, and 
       the result of a query is also a relation 
       instance.
        Schemas of input relations for a query are 
         fixed.
        The schema for the result of a given query is 
         also fixed! - determined by definition of query 
         language constructs.
    Positional vs. named-field notation:  
        Positional notation easier for formal definitions, 
         named-field notation more readable.  
        Both used in SQL
                                                                      4
                                     R1
       Example Instances
  “Sailors” and “Reserves”        sid   sname rating age
    relations for our          S1
    examples.                      22    dustin    7     45.0
  We’ll use positional or         31    lubber    8     55.5
    named field notation,          58    rusty     10    35.0
    assume that names of 
    fields in query results    S2 sid sname rating age
    are `inherited’ from           28   yuppy      9     35.0
    names of fields in query       31   lubber     8     55.5
    input relations.
                                   44   guppy      5     35.0
                                   58   rusty      10    35.0
                                                                  5
        Relational Algebra
   Basic operations:
       Selection  (     )    Selects a subset of rows from relation.
                   
       Projection  (     )   Deletes unwanted columns from 
                    
        relation.       
       Cross-product  (     )  Allows us to combine two relations.
                      
        Set-difference  (     )  Tuples in reln. 1, but not in reln. 2.
                
        Union  (     )  Tuples in reln. 1 and in reln. 2.
   Additional operations:
       Intersection, join, division, renaming:  Not essential, but 
        (very!) useful.
   Since each operation returns a relation, operations 
     can be composed: algebra is “closed”.
                                                                      6
The words contained in this file might help you see if this file matches what you are looking for:

...Relational query languages allow manipulation and retrieval of data from a database model supports simple powerful qls strong formal foundation based on logic allows for much optimization programming not expected to be turing complete intended used complex calculations support easy efficient access large sets two mathematical form the basis real e g sql implementation algebra more operational procedural useful representing execution plans calculus users describe what they want rather than how compute it non declarative preliminaries is applied relation instances result also instance schemas input relations are fixed schema given determined by definition language constructs positional vs named field notation easier definitions readable both in r example sailors reserves sid sname rating age our s examples dustin we ll use or lubber rusty assume that names fields results inherited yuppy guppy basic operations selection selects subset rows projection deletes unwanted columns cross product...

no reviews yet
Please Login to review.