Что такое findslide.org?

FindSlide.org - это сайт презентаций, докладов, шаблонов в формате PowerPoint.


Для правообладателей

Обратная связь

Email: Нажмите что бы посмотреть 

Яндекс.Метрика

Презентация на тему Analysis and Design of Data Systems. Relational Algebra 2 (Lecture 18)

A BA BA BUNIONMINUSINTERSECTIONSet Operations UNION, INTERSECTION, MINUSThe next group of relational algebra operations are the standard mathematical
IE301 Analysis and Design of Data Systems  Lecture 18 Relational Algebra A       BA Set Operations UNION, INTERSECTION, MINUSUNION, INTERSECTION, and MINUS are binary operations. This means UNIONExample: Retrieve the Social Security numbers of all employees who either work Set operations (attributes naming)     CARTESIAN PRODUCT Operation (CROSS PRODUCT) Cartesian product operation produces a new element by CARTESIAN PRODUCT Operation Example: retrieve a list of names of each female CARTESIAN PRODUCT Operation Step 2:Step 3: CARTESIAN PRODUCT Operation Step 4:Step 5:Because this sequence of CARTESIAN PRODUCT followed   Example: retrieve the name of the manager of each department.SELECT d.Dname, e.Fname,    where is of the form:     AND AND … AND (condition)   NATURAL JOIN Example: retrieve the name of the manager of each department.  
Слайды презентации

Слайд 2 A B
A

A    BA    BA

B
A

B

UNION

MINUS

INTERSECTION




Set Operations UNION, INTERSECTION, MINUS

The next group of relational algebra operations are the standard mathematical operations on sets.


Слайд 3 Set Operations UNION, INTERSECTION, MINUS
UNION, INTERSECTION, and MINUS are

Set Operations UNION, INTERSECTION, MINUSUNION, INTERSECTION, and MINUS are binary operations. This

binary operations.
 
This means that the two relations have the

same number of attributes and each corresponding pair of attributes has the same domain.

Слайд 4 UNION
Example: Retrieve the Social Security numbers of all

UNIONExample: Retrieve the Social Security numbers of all employees who either

employees who either work in department 5 or directly

supervise an employee who works in department 5.

Step 1:

Step 2:

Step 3:

Step 4:

or, as a single relational algebra expression:

Set operations eliminate duplicates


Слайд 5
Set operations (attributes naming)
 
 
 
 

Set operations (attributes naming)    

Слайд 6 CARTESIAN PRODUCT Operation (CROSS PRODUCT)
 
Cartesian product operation produces a

CARTESIAN PRODUCT Operation (CROSS PRODUCT) Cartesian product operation produces a new element

new element by combining every tuple from one relation

with every tuple from the other relation.

 

The CARTESIAN PRODUCT operation by itself is generally meaningless, except when followed by a selection that matches values of attributes coming from the component relations.


Слайд 7 CARTESIAN PRODUCT Operation
Example: retrieve a list of names

CARTESIAN PRODUCT Operation Example: retrieve a list of names of each

of each female employee’s dependents
Step 1:
Step 2:
Step 3:
Step 4:
Step

5:

Step 1:

Resulting Relations:


Слайд 8 CARTESIAN PRODUCT Operation
Step 2:
Step 3:

CARTESIAN PRODUCT Operation Step 2:Step 3:

Слайд 9 CARTESIAN PRODUCT Operation
Step 4:
Step 5:
Because this sequence of

CARTESIAN PRODUCT Operation Step 4:Step 5:Because this sequence of CARTESIAN PRODUCT

CARTESIAN PRODUCT followed by SELECT is quite commonly used to

combine related tuples from two relations, a special operation, called JOIN, was created to specify this sequence as a single operation.

Слайд 10  
 
Example: retrieve the name of the manager of

  Example: retrieve the name of the manager of each department.SELECT d.Dname,

each department.
SELECT d.Dname, e.Fname, e.Lname
FROM EMPLOYEE e, DEPARTMENT d
WHERE

Ssn = Mgr_ssn;



Слайд 11  
 
 
where is of the form:

   where is of the form:   AND AND … AND (condition)  

AND AND … AND

(condition)

 

 


  • Имя файла: analysis-and-design-of-data-systems-relational-algebra-2-lecture-18.pptx
  • Количество просмотров: 110
  • Количество скачиваний: 0