1 Session 3 Welcome: To session 3 - the 7 th. learning sequence “Relational algebra “ Recap : In the previous learning sequences, we discussed some operators.

Slides:



Advertisements
Similar presentations
CH4 EXERCISES 4.2. Given two relations R1 and R2, where R1 contains N1 tuples, R2 contains N2 tuples, and N2 > N1 > 0, give the min and max possible sizes.
Advertisements

1 Welcome: To the fifth learning sequence “ Possible representation (2) “ Recap : In the previous learning sequence, we discussed four possible representations.
16.3 Parser to Logical Query Plans SQL(not RAE) Figure 16.2 select distinct movietitle from starsIn where starname in (select name from moviestar.
A geometric sequence is a list of terms separated by a constant ratio, the number multiplied by each consecutive term in a geometric sequence. A geometric.
VARIABLES AND EXPRESSIONS NUMERICAL EXPRESSION A NAME FOR A NUMBER VARIABLE OR ALGEBRAIC EXPRESSION AN EXPRESSION THAT CONTAINS AT LEAST ONE VARIABLE.
SQL Server Management Studio Introduction
Arithmetic Sequences and Series. A sequence is arithmetic if each term – the previous term = d where d is a constant e.g. For the sequence d = 2 nd term.
Lesson 1-9 Algebra: Arithmetic Sequences
Global Perspectives on Social Policy: Human Rights, UNCRC and Global Youth work Lecture 3 Wednesday 30 th April.
1 Session 3 Welcome: To session 3-the 8 th. learning sequence “Relational algebra “ Recap : In the previous learning sequence, we discussed some example.
1 Welcome: To the second learning sequence “ Data Base (DB) and Data Base Management System (DBMS) “ Recap : In the previous learning sequence, we discussed.
1.2 – Evaluate and Simplify Algebraic Expressions A numerical expression consists of numbers, operations, and grouping symbols. An expression formed by.
1 Session 3 Welcome: To session 3- the first learning sequence “ Introduction to Relational Model“ Recap : In the previous learning sequences, we discussed.
1 The Relational Model By Elena Ciriani CS157A February 19, 2004 Professor Lee.
Implementing the Theory dBase Operations in MS Access.
Oracle DML Dr. Bernard Chen Ph.D. University of Central Arkansas.
1 Session 2 Welcome: The seventh learning sequence “ Reduction of an EER schema to tables“ Recap : In the previous learning sequence, we discussed the.
1 Session 3 Welcome: To session 3-the fifth learning sequence “ Relational algebra “ Recap : In the previous learning sequences, we discussed the eight.
Hachim Haddouti, adv. DBMS & DW CSC5301, Ch5 Chapter 5: The Value Chain Adv. DBMS & DW Hachim Haddouti.
1 Welcome : To the third learning sequence “ DB ACTORS “ Present learning: We shall explore the following topics: - DB limitations. - DB actors. - DB Administrator.
CSC271 Database Systems Lecture # 7. Summary: Previous Lecture  Relational keys  Integrity constraints  Views.
Copyright © 2004 Pearson Education, Inc.. Chapter 6 The Relational Algebra and Relational Calculus.
1 Session 3 Welcome: To session 3-the fourth learning sequence “Relational algebra “ Recap : In the previous learning sequences, we discussed the four.
12.2, 12.3: Analyze Arithmetic and Geometric Sequences HW: p (4, 10, 12, 18, 24, 36, 50) p (12, 16, 24, 28, 36, 42, 60)
1 Basic Definitions Fundamentals of Data Base Dr. Rashid Al_Zubaidy.
ALGEBRA VOCABULARY. Vocabulary: Expression Definition: A math phrase built from constants, variables and operations EXAMPLE: 3X - 2Y.
Yum Juices Database. Background Organic juice company producing fruit and vegetable juices to own recipes. Supply juices by the litre to range of organic.
Patterns and Sequences Sequence: Numbers in a specific order that form a pattern are called a sequence. An example is 2, 4, 6, 8, 10 and 12. Polygon:
1 Welcome: To the forth learning sequence “ Possible representation (1) “ Recap : In the previous learning sequence, we discussed the basic definitions.
Ch Variables in Algebra Objective: To recognize and evaluate variable expressions and basic formulas.
Welcome: To the fifth learning sequence “ Data Models “ Recap : In the previous learning sequence, we discussed The Database concepts. Present learning:
Algebra Arithmetic Sequences and Series. Vocabulary Sequence – A list of numbers in a particular order Arithmetic Sequence – A sequence of numbers.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
1 Session 3 Welcome: To session 3-the third learning sequence “ Relational algebra “ Recap : In the previous learning sequences, we discussed the four.
ITE Hirakjyoti Nath Class 7
Notes Over 1.2.
“ Possible representation (3) “
Session 3 Welcome: To session 3-the fourth learning sequence
Fundamentals of Databases
“ Database (DB) and Database Management System (DBMS) “
Combining Like Terms.
Session 3 Welcome: To session 3-the fifth learning sequence
Review Problems Algebra 1 11-R.
CS 480: Database Systems Lecture 8 February 1, 2013.
Database Actors Welcome : To the third learning sequence “ DB ACTORS “
Achieving synchronisation through shared information
STRUCTURE OF PRESENTATION :
alt Planning Analysis Performer Planning Session Manager
Arithmetic Sequences and Series
Chapter 2: Intro to Relational Model
Modeling Your Data Chapter 2 cs542
Recapping: Writing with algebra
Algebraic Sequences.
Database Applications (15-415) Relational Calculus Lecture 6, September 6, 2016 Mohammad Hammoud.
Session 3 Welcome: To session 3 - the 7th. learning sequence
Communication Diagrams
Session 3 Welcome: To session 3-the second learning sequence
Session 3 Welcome: To session 3-the sixth learning sequence
Session 2 Welcome: The seventh learning sequence
Relational Algebra Sample Questions.
Relational Model.
Where are we? Until now: Modeling databases (ODL, E/R): all about the schema Now: Manipulating the data: queries, updates, SQL Then: looking inside -
2/18/2019.
Relational Algebra.
Session 3 Welcome: To session 3-the 8th. learning sequence
STORE MANAGER RESPONSIBILITIES.
“ Possible representation (2) “
“ Possible representation (1) “
Learn to identify and evaluate expressions.
Evaluating Algebraic Expressions
Presentation transcript:

1 Session 3 Welcome: To session 3 - the 7 th. learning sequence “Relational algebra “ Recap : In the previous learning sequences, we discussed some operators of relational algebra. Present learning: We shall explore the following topic: Example Queries - Example Queries

2 Relational Algebra

uA basic expression in the relational algebra consists of either one of the following: wA relation in the database wA constant relation

Relational Instances for the Purchasing System The Supplier relation: S-numberS-nameS-city S100AhmedAmman S200AliJarash S300KasimIrbid S400JasimAquaba S500RanaAmman

5 The Part relation: P-numberP-nameColorPriceP-city P1TVSilver300Amman P2CameraBlack100Jarash P3VideoBlack200Amman P4PCSilver400Irbid P5PrinterRed100Irbid P6Scannersilver150Jarash

6 The shipment relation: S-numberP-numberQuantity S100P1100 S100P2150 S100P3200 S100P4160 S100P550 S100P670 S200P1200 S200P2150 S300P2400 S400P2150 S400P480 S500P4100

Example Queries uQ1- Find The cities for all suppliers.  S-city (Supplier)

Example Queries uQ1- Find The cities for all suppliers. S-city Amman Jarash Irbid Aquaba The result relation  S-city (Supplier)

Example Queries n Q2- Find city for Ahmed.

Example Queries n Q2- Find city for Ahmed. Temp1   S-name = ‘Ahmed’ (Supplier)

Example Queries n Q2- Find city for Ahmed. Temp1   S-name = ‘Ahmed’ (Supplier) S-numberS-nameS-city S100AhmedAmman Temp1

Example Queries n Q2- Find city for Ahmed. Temp1   S-name = ‘Ahmed’ (Supplier) S-numberS-nameS-city S100AhmedAmman Temp1 S-city Amman Result Result   S-city (Temp1)

Example Queries uQ3- Find Supplier number and name for suppliers in Amman.

Example Queries uQ3- Find Supplier number and name for suppliers in Amman. Temp1   S-city= ‘Amman’ (Supplier)

Example Queries uQ3- Find Supplier number and name for suppliers in Amman. Temp1   S-city= ‘Amman’ (Supplier) S-numberS-nameS-city S100AhmedAmman S500RanaAmman Temp1

Example Queries uQ3- Find Supplier number and name for suppliers in Amman. Temp1   S-city= ‘Amman’ (Supplier) S-numberS-nameS-city S100AhmedAmman S500RanaAmman Temp1 Result   S-number, S-name (Temp1)

Example Queries uQ3- Find Supplier number and name for suppliers in Amman. Temp1   S-city= ‘Amman’ (Supplier) S-numberS-nameS-city S100AhmedAmman S500RanaAmman Temp1 Result   S-number, S-name (Temp1) S-numberS-name S100Ahmed S500Rana Result

Example Queries n Q4- For each part supplied, find the part names and the names of all cities storing these parts.

Example Queries n Q4- For each part supplied, find the part names and the names of all cities storing these parts. Temp1   P-number ( Shipment )

Example Queries n Q4- For each part supplied, find the part names and the names of all cities storing these parts. Temp1   P-number ( Shipment ) P-number P1 P2 P3 P4 P5 P6 Temp1

Example Queries n Q4- For each part supplied, find the part names and the names of all cities storing these parts. Temp1   P-number ( Shipment ) Temp2  Part Temp1

Example Queries n Q4- For each part supplied, find the part names and the names of all cities storing these parts. Temp1   P-number ( Shipment ) Temp2  Part Temp1 P-numberP-nameColorPriceP-city P1TVSilver300Amman P2CameraBlack100Jarash P3VideoBlack200Amman P4PCSilver400Irbid P5PrinterRed100Irbid P6Scannersilver150Jarash Temp2

Example Queries n Q4- For each part supplied, find the part names and the names of all cities storing these parts. Temp1   P-number ( Shipment ) Temp2  Part Temp1 Result   P-name, p-city(Temp2) P-nameP-city TVAmman CameraJarash VideoAmman PCIrbid PrinterIrbid ScannerJarash Result

Example Queries n Q5- For each part supplied, find the part numbers and names of all cities supplying the parts.

Example Queries n Q5- For each part supplied, find the part numbers and names of all cities supplying the parts. Temp1  Shipment Supplier

Example Queries n Q5- For each part supplied, find the part numbers and names of all cities supplying the parts. Temp1  Shipment Supplier S-numberP-numberQuantityS-nameS-city S100P1100AhmedAmman S100P2150AhmedAmman S100P3200AhmedAmman S100P4160AhmedAmman S100P550AhmedAmman S100P670AhmedAmman S200P1200AliJarash S200P2150AliJarash S300P2400KasimIrbid S400P2150JasimAquaba S400P480JasimAquaba S500P4100RanaAmman Temp1

Example Queries n Q5- For each part supplied, find the part numbers and names of all cities supplying the parts. Result   P-number, S-city ( Temp1 ) Temp1  Shipment Supplier P-numberS-city P1Amman P2Amman P3Amman P4Amman P5Amman P6Amman P1Jarash P2Jarash P2Irbid P2Aquaba P4Aquaba P4Amman Result

Example Queries n Q6- Get supplier numbers for suppliers who supply part p2

Example Queries n Q6- Get supplier numbers for suppliers who supply part p2 Temp1   p-number = ‘p2’ (Shipment)

Example Queries n Q6- Get supplier numbers for suppliers who supply part p2 Temp1   p-number = ‘p2’ (Shipment) S-numberP-numberQuantity S100P2150 S200P2150 S300P2400 S400P2150 Temp1

Example Queries n Q6- Get supplier numbers for suppliers who supply part p2 Temp1   P-number = ‘p2’ (Shipment) Result   S-number ( Temp1 ) S-number S100 S200 S300 S400 Result

32 Relational Algebra Summary: In this learning sequence, we discussed some example queries about purchasing system.

33 END