The document provides an overview of relational algebra, which is a formal query language used to manipulate data in relational databases. It describes the basic operations in relational algebra, including selection, projection, cross-product, union, intersection, and set difference. It also discusses how these operations can be composed to form more complex queries, and how they allow querying and retrieving data from relational databases in a declarative manner.
This document provides an overview of relational algebra and SQL. It defines key concepts in relational databases like relations, tuples, attributes, and instances. It describes the five basic relational algebra operations: selection, projection, join, union, and difference. It provides examples of how to express queries using these operations, including compound queries. It then introduces SQL as a language for querying and manipulating data in relational databases, covering commands for table creation, data insertion, deletion, and selection of tuples through queries. It also discusses the use of primary and foreign keys to link relations.
This document provides information on GRK Fasteners rugged structural screws (RSS). It includes specifications, advantages, descriptions, performance comparisons to lag bolts, factored resistance tables for various wood types and screw sizes, spacing requirements, and maximum deck joist spans using the screws. The screws are made of hardened steel and have features like CEE threads, recessed star drives and climatek coatings that provide strength, reduced splitting, and corrosion resistance for structural applications like decks, beams, and floor systems. Tables provide factored resistances for withdrawal and lateral loads to enable structural design and code compliance.
This document contains work examples and specifications for manufacturing turbine blades and related components out of nickel alloys like Inconel. It includes summaries of 4 product launches for OEM manufacturing of turbine blades and compressor discs and 1 for component repair. It also provides details on the materials, number of operations, and specifications for components like dimensions, tolerances and surface finishes. Engineering drawings with additional details are referenced.
The document is the 2005 edition of the National Design Specification for Wood Construction published by the American Wood Council and American Forest & Paper Association. It provides design values and guidance for wood structural design and connections. Tables in the document provide withdrawal and lateral design values for toe-nailed wood connections based on nail type, diameter, length, wood species and specific gravity values. The values are adjusted factors outlined in the NDS and assume complete nail embedment.
This document provides specifications for Electromate's CSD Series ultra flat component gear sets. It includes detailed technical specifications, diagrams, and ordering information for the CSD-20 through CSD-50 component set sizes. Key specifications covered are gear ratios, torque limits, speeds, inertias, stiffnesses, accuracies, weights and dimensions. Lubrication requirements and a sample ordering code are also shown.
Nondestructive Approach to Evaluate Defects in Elements of Agricultural Machi...Engr. Md. Nur-A-Alam
The document describes developing a nondestructive testing method to detect defects in agricultural machinery parts. A four-point probe potential drop technique was used to measure voltage changes caused by internal cracks or defects. Tests were conducted on mild steel, stainless steel, and carbon steel samples with varying crack depths. The results showed that voltage drop increased with resistance and differed by material composition. A computer program was created to calculate resistivity and voltage drop from the experimental data, allowing defects to be detected nondestructively.
This document contains technical drawings and specifications for several mechanical parts and assemblies:
1) An aluminum 4-cylinder engine block with detailed dimensions and notes specifying the material and scale of views.
2) A hinge pin assembly with dimensions for several subcomponents to be made from various materials like 3D printed plastic and machined metal.
3) A sheet metal sled cutout pattern with dimensions for a part to be cut from 14-gauge steel sheet.
4) An exploded view assembly drawing of a ball switcher machine with a parts list and notes on materials for the components.
This document provides specifications for TRCA series carriage assemblies, including:
- Nominal bearing diameters ranging from 0.500 to 2.000 inches
- Carriage plate lengths from 6 to 30 inches
- Bearing and locking options
- Maximum operating temperatures and speeds
- Dynamic load capacity specifications for each assembly model
- Dimensional drawings and specifications
This document provides an overview of relational algebra and SQL. It defines key concepts in relational databases like relations, tuples, attributes, and instances. It describes the five basic relational algebra operations: selection, projection, join, union, and difference. It provides examples of how to express queries using these operations, including compound queries. It then introduces SQL as a language for querying and manipulating data in relational databases, covering commands for table creation, data insertion, deletion, and selection of tuples through queries. It also discusses the use of primary and foreign keys to link relations.
This document provides information on GRK Fasteners rugged structural screws (RSS). It includes specifications, advantages, descriptions, performance comparisons to lag bolts, factored resistance tables for various wood types and screw sizes, spacing requirements, and maximum deck joist spans using the screws. The screws are made of hardened steel and have features like CEE threads, recessed star drives and climatek coatings that provide strength, reduced splitting, and corrosion resistance for structural applications like decks, beams, and floor systems. Tables provide factored resistances for withdrawal and lateral loads to enable structural design and code compliance.
This document contains work examples and specifications for manufacturing turbine blades and related components out of nickel alloys like Inconel. It includes summaries of 4 product launches for OEM manufacturing of turbine blades and compressor discs and 1 for component repair. It also provides details on the materials, number of operations, and specifications for components like dimensions, tolerances and surface finishes. Engineering drawings with additional details are referenced.
The document is the 2005 edition of the National Design Specification for Wood Construction published by the American Wood Council and American Forest & Paper Association. It provides design values and guidance for wood structural design and connections. Tables in the document provide withdrawal and lateral design values for toe-nailed wood connections based on nail type, diameter, length, wood species and specific gravity values. The values are adjusted factors outlined in the NDS and assume complete nail embedment.
This document provides specifications for Electromate's CSD Series ultra flat component gear sets. It includes detailed technical specifications, diagrams, and ordering information for the CSD-20 through CSD-50 component set sizes. Key specifications covered are gear ratios, torque limits, speeds, inertias, stiffnesses, accuracies, weights and dimensions. Lubrication requirements and a sample ordering code are also shown.
Nondestructive Approach to Evaluate Defects in Elements of Agricultural Machi...Engr. Md. Nur-A-Alam
The document describes developing a nondestructive testing method to detect defects in agricultural machinery parts. A four-point probe potential drop technique was used to measure voltage changes caused by internal cracks or defects. Tests were conducted on mild steel, stainless steel, and carbon steel samples with varying crack depths. The results showed that voltage drop increased with resistance and differed by material composition. A computer program was created to calculate resistivity and voltage drop from the experimental data, allowing defects to be detected nondestructively.
This document contains technical drawings and specifications for several mechanical parts and assemblies:
1) An aluminum 4-cylinder engine block with detailed dimensions and notes specifying the material and scale of views.
2) A hinge pin assembly with dimensions for several subcomponents to be made from various materials like 3D printed plastic and machined metal.
3) A sheet metal sled cutout pattern with dimensions for a part to be cut from 14-gauge steel sheet.
4) An exploded view assembly drawing of a ball switcher machine with a parts list and notes on materials for the components.
This document provides specifications for TRCA series carriage assemblies, including:
- Nominal bearing diameters ranging from 0.500 to 2.000 inches
- Carriage plate lengths from 6 to 30 inches
- Bearing and locking options
- Maximum operating temperatures and speeds
- Dynamic load capacity specifications for each assembly model
- Dimensional drawings and specifications
The document summarizes research on evaluating the low-cycle fatigue durability of shear panel dampers (SPDs) used in bridges. Finite element analysis was used to investigate the influence of SPD dimensional parameters on crack initiation life and critical crack length. The analysis considered factors like weld toe radius, aspect ratio, and width-to-thickness ratio. Regression analysis was used to determine a relationship between critical crack length and these parameters. The research aims to also evaluate crack propagation life using the J-integral approach to calculate crack growth per cycle and determine the number of cycles until failure.
This document contains details for Daniel Lipinski including contact information and sketches of furniture designs. It includes exploded views and bills of materials for designs like the Cobra Stool and Tidal 29 Lounge as well as sketches of other furniture like the Custom Ute Tray and Metal Scrap Frames. Dimensions are provided for components.
This document provides an overview of questions and answers related to metal cutting, metrology, metal forming, automation, robotics, and cutting tool materials. It is organized into 6 sections covering various manufacturing topics. Each section includes multiple chapters that provide theory and questions/answers on the given topics. Page numbers are provided to direct the reader to the relevant content within the document.
The document provides specifications for the CSD Series ultra flat component sets from Harmonic Drive Systems. It includes detailed technical specifications, diagrams, and ordering information for the CSD-20 through CSD-50 component set sizes. Key specifications covered are gear ratios, torque limits, speeds, inertia, stiffness, backlash, weight, lubrication requirements, and dimensions.
This assembly drawing consists of 7 sheets showing the parts of a hydraulic jack. There are 136 numbered parts with their materials, dimensions, and other specifications. The document provides assembly views, section views, and detailed views of individual parts with notes on tolerances, chamfers, and surface finishes.
Autodesk inventor practice part drawingsGoldi Patil
This document contains 25 detailed drawings of miscellaneous mechanical parts for practice modeling in Autodesk Inventor or other 3D CAD software. The parts range in complexity and some hints are provided for specific features. While dimensions may be missing, the goal is for students to practice their modeling skills rather than reproduce the parts exactly. Students should build the parts by creating simple sketches and additive features.
Racks and Pinions Gears, Drive Systems Manufacturers in India.pdfKreyMayer
Kreymayer has been developing and manufacturing high quality drive systems for a wide range of industries. We enjoy our impeccable reputation as quality manufacturers of high performance racks and pinions purely on the basis of research and high quality standards adopted by us.
Visit our Website:- https://kreymayer.com/
An unconventional approach for ETL of historized dataAndrej Pashchenko
Maintaining a data historization is a very common but time consuming task in a data warehouse environment. The common techniques used involve outer joins and some kind of change detection. This change detection must be done with respect of Null-values and is possibly the most trickiest part. But, on the other hand, SQL offers standard functionality with exactly desired behaviour: Group By or Partitioning with analytic functions. Can it be used for this task?
THE EFFECT OF OPENINGS IN THE SLAB STIFFENED WITH SHALLOW BEAMSIRJET Journal
This document summarizes a study that analyzed the effect of openings in reinforced concrete slabs stiffened with shallow beams. 24 slab models with different beam depths and opening locations/sizes were analyzed using finite element modeling. The modeling found that as beam depth decreased, deflection increased but still met serviceability standards. Ultimate load capacity generally increased as beam depth decreased, with the center opening slab having the highest capacity. The study concluded that designing based on orthotropy values that account for openings ensures ultimate capacity exceeds design loads, and trends in capacity can be explained by reinforcement quantity and stress.
CONSTRUCTION_ENG - on home w_0 Watermar logoDRP Joint
This document discusses DRP-JOINT, which is a collective term for various joint fittings used in piping systems. DRP-JOINT uses a 360-degree circular pressing method to compress metal and rubber rings to join pipes. It has advantages over welding such as being more environmentally friendly, hygienic, easy to install, and able to withstand vibration and ground movement. The document provides details on the structure, characteristics, applications, cost savings, and standard product sizes of DRP-JOINT fittings.
The document describes various accessories for ball screw assemblies, including flexible couplings, three-piece couplers, grease options, wiper kits, and standard mounting flanges. It provides details on part numbers, specifications, and applications for each type of accessory. Flexible couplings come in various sizes and materials to allow for misalignment. Grease options include specialized gels for different temperature ranges and environments. Wiper kits help spread lubricant and prevent contamination. Mounting flanges are designed for easy installation on bronze nuts and supenuts.
The document describes various accessories for ball screw assemblies, including flexible couplings, three-piece couplers, grease options, wiper kits, and standard mounting flanges. It provides details on part numbers, specifications, and applications for each type of accessory. Flexible couplings come in various sizes and materials to provide misalignment capability and withstand hostile environments. Grease options include specialized gels for different temperature ranges and cleanliness requirements. Wiper kits help spread lubricant and prevent contamination, with brush or snap-in styles available. Mounting flanges are designed for easy attachment to bronze nuts or supenuts.
The document provides product information for heatshrink cable terminations and joints for voltages ranging from 0.6kV to 36kV. It lists various indoor and outdoor termination part numbers corresponding to cable type (XLPE, PILC), cores (single, three), voltage rating and cable cross section range. It also provides information on related accessories like earthing components and ordering guidelines. Coldshrink terminations are introduced as an alternative with advantages like easier installation without open flames. Technical test standards for heatshrink products are listed at the end.
Sunwill supplies wear parts for sugar cane shredders, including knife edges, hammers, and hammer tips. They offer various options for knife edges such as arrow head, half arrow head, and blunt styles in different sizes. Their hammer and hammer tips are made from alloy steel, bi-metal, or tribond materials to provide impact and abrasion resistance. Sunwill also provides maintenance services and customized parts to prolong the lifespan of cane shredders.
This document contains technical drawings and specifications for various tubular pipe sections, plates, stiffeners, and other components for assembling a wind turbine tower and its underground foundation. Dimensions and material specifications are provided for pipes, baseplates, joints, stiffeners, turnbuckles, and other parts, along with assembly diagrams.
Javier Garcia - Verdugo Sanchez - Six Sigma Training - W1 Z TransformationJ. García - Verdugo
The document provides an overview of Z-transformation and capability calculations based on defective units. It explains the theoretical background of Z-transformation and how it can be used to determine the portion of production outside specifications. An example shows how to calculate the percentage of a normal distribution that is above a given value using Z-transformation. The document also discusses how to calculate sigma values from defect portions and provides tables to convert between defects per million opportunities (DPMO) and sigma.
The document discusses Groz sockets and sets. It provides details on Groz socket features like the super grip profile, knurled band, chrome vanadium construction and ultra premium finish that provide enhanced performance, life and durability. It also discusses Groz ratchets and their 48 tooth gear structure, compact pear head, flat shank and other smart designs that enable enhanced transmission of torque. The document further provides pricing and details of Groz socket sets in 1/2" and 1/4" square drive sizes along with terms and conditions.
Great plains parts manual nta 3510 & nta 3010 no-till air drill implementPartCatalogs Net
This document is a parts manual for the Great Plains Manufacturing NTA3010 & NTA3510 No-Till Air Drill Implement. It contains 9 sections that describe the various components of the air drill in detail including towers, frames, gauge wheels, openers, press wheels, hydraulics, decals, options, and provides part numbers and diagrams. The manual provides the necessary information to order replacement parts and ensure proper assembly and maintenance of the equipment.
Mc cormick x4 series (2014 ) - rs52 - x4.50 tractor service repair manualfjjsekmmm
The document contains parts lists and diagrams for an engine and various components. It lists specific part numbers, names and quantities for items such as bolts, gaskets, valves, sensors, pulleys, filters and other engine parts. Instructions are provided to contact the spare parts department for certain items. The parts are identified as replacements for a Deutz tcd 3.6 l4 engine in McCormick X4 series tractors from 2014.
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Aggregage
This webinar will explore cutting-edge, less familiar but powerful experimentation methodologies which address well-known limitations of standard A/B Testing. Designed for data and product leaders, this session aims to inspire the embrace of innovative approaches and provide insights into the frontiers of experimentation!
The document summarizes research on evaluating the low-cycle fatigue durability of shear panel dampers (SPDs) used in bridges. Finite element analysis was used to investigate the influence of SPD dimensional parameters on crack initiation life and critical crack length. The analysis considered factors like weld toe radius, aspect ratio, and width-to-thickness ratio. Regression analysis was used to determine a relationship between critical crack length and these parameters. The research aims to also evaluate crack propagation life using the J-integral approach to calculate crack growth per cycle and determine the number of cycles until failure.
This document contains details for Daniel Lipinski including contact information and sketches of furniture designs. It includes exploded views and bills of materials for designs like the Cobra Stool and Tidal 29 Lounge as well as sketches of other furniture like the Custom Ute Tray and Metal Scrap Frames. Dimensions are provided for components.
This document provides an overview of questions and answers related to metal cutting, metrology, metal forming, automation, robotics, and cutting tool materials. It is organized into 6 sections covering various manufacturing topics. Each section includes multiple chapters that provide theory and questions/answers on the given topics. Page numbers are provided to direct the reader to the relevant content within the document.
The document provides specifications for the CSD Series ultra flat component sets from Harmonic Drive Systems. It includes detailed technical specifications, diagrams, and ordering information for the CSD-20 through CSD-50 component set sizes. Key specifications covered are gear ratios, torque limits, speeds, inertia, stiffness, backlash, weight, lubrication requirements, and dimensions.
This assembly drawing consists of 7 sheets showing the parts of a hydraulic jack. There are 136 numbered parts with their materials, dimensions, and other specifications. The document provides assembly views, section views, and detailed views of individual parts with notes on tolerances, chamfers, and surface finishes.
Autodesk inventor practice part drawingsGoldi Patil
This document contains 25 detailed drawings of miscellaneous mechanical parts for practice modeling in Autodesk Inventor or other 3D CAD software. The parts range in complexity and some hints are provided for specific features. While dimensions may be missing, the goal is for students to practice their modeling skills rather than reproduce the parts exactly. Students should build the parts by creating simple sketches and additive features.
Racks and Pinions Gears, Drive Systems Manufacturers in India.pdfKreyMayer
Kreymayer has been developing and manufacturing high quality drive systems for a wide range of industries. We enjoy our impeccable reputation as quality manufacturers of high performance racks and pinions purely on the basis of research and high quality standards adopted by us.
Visit our Website:- https://kreymayer.com/
An unconventional approach for ETL of historized dataAndrej Pashchenko
Maintaining a data historization is a very common but time consuming task in a data warehouse environment. The common techniques used involve outer joins and some kind of change detection. This change detection must be done with respect of Null-values and is possibly the most trickiest part. But, on the other hand, SQL offers standard functionality with exactly desired behaviour: Group By or Partitioning with analytic functions. Can it be used for this task?
THE EFFECT OF OPENINGS IN THE SLAB STIFFENED WITH SHALLOW BEAMSIRJET Journal
This document summarizes a study that analyzed the effect of openings in reinforced concrete slabs stiffened with shallow beams. 24 slab models with different beam depths and opening locations/sizes were analyzed using finite element modeling. The modeling found that as beam depth decreased, deflection increased but still met serviceability standards. Ultimate load capacity generally increased as beam depth decreased, with the center opening slab having the highest capacity. The study concluded that designing based on orthotropy values that account for openings ensures ultimate capacity exceeds design loads, and trends in capacity can be explained by reinforcement quantity and stress.
CONSTRUCTION_ENG - on home w_0 Watermar logoDRP Joint
This document discusses DRP-JOINT, which is a collective term for various joint fittings used in piping systems. DRP-JOINT uses a 360-degree circular pressing method to compress metal and rubber rings to join pipes. It has advantages over welding such as being more environmentally friendly, hygienic, easy to install, and able to withstand vibration and ground movement. The document provides details on the structure, characteristics, applications, cost savings, and standard product sizes of DRP-JOINT fittings.
The document describes various accessories for ball screw assemblies, including flexible couplings, three-piece couplers, grease options, wiper kits, and standard mounting flanges. It provides details on part numbers, specifications, and applications for each type of accessory. Flexible couplings come in various sizes and materials to allow for misalignment. Grease options include specialized gels for different temperature ranges and environments. Wiper kits help spread lubricant and prevent contamination. Mounting flanges are designed for easy installation on bronze nuts and supenuts.
The document describes various accessories for ball screw assemblies, including flexible couplings, three-piece couplers, grease options, wiper kits, and standard mounting flanges. It provides details on part numbers, specifications, and applications for each type of accessory. Flexible couplings come in various sizes and materials to provide misalignment capability and withstand hostile environments. Grease options include specialized gels for different temperature ranges and cleanliness requirements. Wiper kits help spread lubricant and prevent contamination, with brush or snap-in styles available. Mounting flanges are designed for easy attachment to bronze nuts or supenuts.
The document provides product information for heatshrink cable terminations and joints for voltages ranging from 0.6kV to 36kV. It lists various indoor and outdoor termination part numbers corresponding to cable type (XLPE, PILC), cores (single, three), voltage rating and cable cross section range. It also provides information on related accessories like earthing components and ordering guidelines. Coldshrink terminations are introduced as an alternative with advantages like easier installation without open flames. Technical test standards for heatshrink products are listed at the end.
Sunwill supplies wear parts for sugar cane shredders, including knife edges, hammers, and hammer tips. They offer various options for knife edges such as arrow head, half arrow head, and blunt styles in different sizes. Their hammer and hammer tips are made from alloy steel, bi-metal, or tribond materials to provide impact and abrasion resistance. Sunwill also provides maintenance services and customized parts to prolong the lifespan of cane shredders.
This document contains technical drawings and specifications for various tubular pipe sections, plates, stiffeners, and other components for assembling a wind turbine tower and its underground foundation. Dimensions and material specifications are provided for pipes, baseplates, joints, stiffeners, turnbuckles, and other parts, along with assembly diagrams.
Javier Garcia - Verdugo Sanchez - Six Sigma Training - W1 Z TransformationJ. García - Verdugo
The document provides an overview of Z-transformation and capability calculations based on defective units. It explains the theoretical background of Z-transformation and how it can be used to determine the portion of production outside specifications. An example shows how to calculate the percentage of a normal distribution that is above a given value using Z-transformation. The document also discusses how to calculate sigma values from defect portions and provides tables to convert between defects per million opportunities (DPMO) and sigma.
The document discusses Groz sockets and sets. It provides details on Groz socket features like the super grip profile, knurled band, chrome vanadium construction and ultra premium finish that provide enhanced performance, life and durability. It also discusses Groz ratchets and their 48 tooth gear structure, compact pear head, flat shank and other smart designs that enable enhanced transmission of torque. The document further provides pricing and details of Groz socket sets in 1/2" and 1/4" square drive sizes along with terms and conditions.
Great plains parts manual nta 3510 & nta 3010 no-till air drill implementPartCatalogs Net
This document is a parts manual for the Great Plains Manufacturing NTA3010 & NTA3510 No-Till Air Drill Implement. It contains 9 sections that describe the various components of the air drill in detail including towers, frames, gauge wheels, openers, press wheels, hydraulics, decals, options, and provides part numbers and diagrams. The manual provides the necessary information to order replacement parts and ensure proper assembly and maintenance of the equipment.
Mc cormick x4 series (2014 ) - rs52 - x4.50 tractor service repair manualfjjsekmmm
The document contains parts lists and diagrams for an engine and various components. It lists specific part numbers, names and quantities for items such as bolts, gaskets, valves, sensors, pulleys, filters and other engine parts. Instructions are provided to contact the spare parts department for certain items. The parts are identified as replacements for a Deutz tcd 3.6 l4 engine in McCormick X4 series tractors from 2014.
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Aggregage
This webinar will explore cutting-edge, less familiar but powerful experimentation methodologies which address well-known limitations of standard A/B Testing. Designed for data and product leaders, this session aims to inspire the embrace of innovative approaches and provide insights into the frontiers of experimentation!
Open Source Contributions to Postgres: The Basics POSETTE 2024ElizabethGarrettChri
Postgres is the most advanced open-source database in the world and it's supported by a community, not a single company. So how does this work? How does code actually get into Postgres? I recently had a patch submitted and committed and I want to share what I learned in that process. I’ll give you an overview of Postgres versions and how the underlying project codebase functions. I’ll also show you the process for submitting a patch and getting that tested and committed.
2. 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 intended to be used for complex calculations.
QLs support easy, efficient access to large data sets.
3. Formal Relational Query Languages
Two mathematical Query Languages form the basis
for “real” languages (e.g. SQL), and for
implementation:
Relational Algebra: More operational, very useful
for representing execution plans.
Relational Calculus: Lets users describe what they
want, rather than how to compute it. (Non-
procedural, declarative.)
We will concentrate on relational algebra in this
course
* Understanding Algebra & Calculus is key to
understanding SQL, query processing!
4. 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 (but
query will run over any legal instance)
The schema for the result of a given query is also fixed.
It is determined by the definitions of the query language
constructs.
5. Basics of Querying
A query is applied to relation instances, and the result of a query is
also a relation instance.
eid ename Salary age
28 Eric 90K 35
58 Kyle 100K 33
ename Salary
Eric 90K
Kyle 100K
6. Relational Algebra: 5 Basic Operations
Selection ( s ) Selects a subset of rows from relation
(horizontal).
Projection ( p ) Retains only wanted columns from
relation (vertical).
Cross-product ( ) Allows us to combine two relations.
Set-difference ( — ) Tuples in r1, but not in r2.
Union ( ) Tuples in r1 or in r2.
Since each operation returns a relation, operations can be
composed! (Algebra is “closed”.)
7. sid sname rating age
22 dustin 7 45.0
31 lubber 8 55.5
58 rusty 10 35.0
sid sname rating age
28 yuppy 9 35.0
31 lubber 8 55.5
44 guppy 5 35.0
58 rusty 10 35.0
sid bid day
22 101 10/10/96
58 103 11/12/96
R1
S1
S2
bid bname color
101 Interlake blue
102 Interlake red
103 Clipper green
104 Marine red
Boats
Example Instances
8. Projection (p)
Examples:
Retains only attributes that are in the “projection list”.
Schema of result:
exactly the fields in the projection list, with the same names that they had
in the input relation.
Projection operator has to eliminate duplicates (How do
they arise? Why remove them?)
Note: real systems typically don’t do duplicate elimination unless the user
explicitly asks for it.
)
2
(S
age
p
psname rating
S
,
( )
2
9. Projection (p)
age
35.0
55.5
sid sname rating age
28 yuppy 9 35.0
31 lubber 8 55.5
44 guppy 5 35.0
58 rusty 10 35.0
S2
sname rating
yuppy 9
lubber 8
guppy 5
rusty 10
)
2
(
,
S
rating
sname
p
page S
( )
2
10. Selection (s)
Selects rows that satisfy selection condition.
Result is a relation.
Schema of result is same as that of the input relation.
Do we need to do duplicate elimination?
srating
S
8
2
( ) p s
sname rating rating
S
,
( ( ))
8
2
sid sname rating age
28 yuppy 9 35.0
31 lubber 8 55.5
44 guppy 5 35.0
58 rusty 10 35.0
sname rating
yuppy 9
rusty 10
11. Union, Intersection and Set-
Difference
Both of these operations take two input relations, which must be
union-compatible:
Two relations R and S are union-compatible if
they have the same number of columns and
corresponding columns have the same
domains.
17. Set Difference
sid sname rating age
22 dustin 7 45.0
31 lubber 8 55.5
58 rusty 10 35.0
sid sname rating age
28 yuppy 9 35.0
31 lubber 8 55.5
44 guppy 5 35.0
58 rusty 10 35.0
S1
S2
sid sname rating age
22 dustin 7 45.0
S2 – S1
S S
1 2
sid sname rating age
28 yuppy 9 35.0
44 guppy 5 35.0
18. Cross-Product
S1 X R1
Each row of S1 is paired with each row of R1.
Result schema has one field per field of S1 and R1, with field names `inherited’ if possible.
sid sname rating age
22 dustin 7 45.0
31 lubber 8 55.5
58 rusty 10 35.0
sid bid day
22 101 10/10/96
58 103 11/12/96
S1 R1
27. (sid) sname rating age (sid) bid day
22 dustin 7 45.0 22 101 10/10/96
22 dustin 7 45.0 58 103 11/12/96
31 lubber 8 55.5 22 101 10/10/96
31 lubber 8 55.5 58 103 11/12/96
58 rusty 10 35.0 22 101 10/10/96
58 rusty 10 35.0 58 103 11/12/96
Both S1 and R1 have a field called sid. Which may
cause a conflict when referring to columns
S1 X R1
28. Cross-Product
S1 R1: Each row of S1 paired with each row of R1.
Q: How many rows in the result?
Result schema has one field per field of S1 and R1,
with field names `inherited’ if possible.
May have a naming conflict: Both S1 and R1 have a field with
the same name.
In this case, can use the renaming operator:
( ( , ), )
C sid sid S R
1 1 5 2 1 1
29. Renaming Operator
( ( , ), )
C sid sid S R
1 1 5 2 1 1
(sid) sname rating age (sid) bid day
22 dustin 7 45.0 22 101 10/10/96
22 dustin 7 45.0 58 103 11/12/96
31 lubber 8 55.5 22 101 10/10/96
31 lubber 8 55.5 58 103 11/12/96
58 rusty 10 35.0 22 101 10/10/96
58 rusty 10 35.0 58 103 11/12/96
sid1 sid2
Takes a relation schema and gives a new name to
the schema and the columns
1 2 3 4 5 6 7
S1 X R1
C
30. Compound Operator: Intersection
In addition to the 5 basic operators, there are several additional
“Compound Operators”
These add no computational power to the
language, but are useful shorthands.
Can be expressed solely with the basic ops.
Intersection takes two input relations, which must be union-
compatible.
Q: How to express it using basic operators?
R S = R (R S)
31. Compound Operator: Join
Joins 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 S
Select rows where attributes that appear in both relations
have equal values
Project all unique attributes and one copy of each of the
common ones.
32. Joins
Condition Join : c
S
R
)
( S
R
c
s
Result schema same as that of cross-product.
Fewer tuples than cross-product, might be able to compute
more efficiently
Sometimes called a theta-join.
Equi-Join: A special case of condition join where the condition
c contains only equalities.
33. Joins
(sid) sname rating age (sid) bid day
22 dustin 7 45.0 58 103 11/12/96
31 lubber 8 55.5 58 103 11/12/96
sid
R
sid
S
R
S
.
1
.
1
1
1
sid sname rating age
22 dustin 7 45.0
31 lubber 8 55.5
58 rusty 10 35.0
S1
sid bid day
22 101 10/10/96
58 103 11/12/96
R1
36. sid sname rating age
22 dustin 7 45.0
31 lubber 8 55.5
58 rusty 10 35.0
S1 sid bid day
22 101 10/10/96
58 103 11/12/96
R1
)
1
1
(
.
1
.
1
R
S
sid
R
sid
S
s
(sid) sname rating age (sid) bid day
22 dustin 7 45.0 58 103 11/12/96
31 lubber 8 55.5 58 103 11/12/96
37. sid sname rating age bid day
22 dustin 7 45.0 101 10/10/96
58 rusty 10 35.0 103 11/12/96
S R
sid
1 1
sid sname rating age
22 dustin 7 45.0
31 lubber 8 55.5
58 rusty 10 35.0
S1
sid bid day
22 101 10/10/96
58 103 11/12/96
R1
Example: Natural join
38. sid sname rating age bid day
22 dustin 7 45.0 101 10/10/96
58 rusty 10 35.0 103 11/12/96
S R
sid
1 1
sid sname rating age
22 dustin 7 45.0
31 lubber 8 55.5
58 rusty 10 35.0
S1
sid bid day
22 101 10/10/96
58 103 11/12/96
R1
Example: Natural join
39. sid sname rating age bid day
22 dustin 7 45.0 101 10/10/96
58 rusty 10 35.0 103 11/12/96
S R
sid
1 1
sid sname rating age
22 dustin 7 45.0
31 lubber 8 55.5
58 rusty 10 35.0
S1
sid bid day
22 101 10/10/96
58 103 11/12/96
R1
Example: Natural join
40. sid sname rating age bid day
22 dustin 7 45.0 101 10/10/96
58 rusty 10 35.0 103 11/12/96
S R
sid
1 1
sid sname rating age
22 dustin 7 45.0
31 lubber 8 55.5
58 rusty 10 35.0
S1
sid bid day
22 101 10/10/96
58 103 11/12/96
R1
Example: Natural join
41. Outer Join
An extension of the join operation that avoids loss
of information.
Computes the join and then adds tuples form one
relation that does not match tuples in the other
relation to the result of the join.
Uses null values:
null signifies that the value is unknown or does not
exist
All comparisons involving null are (roughly speaking)
false by definition.
42. Outer Join – Example
Relation loan
customer_name loan_number
Jones
Smith
Hayes
L-170
L-230
L-155
3000
4000
1700
loan_number amount
L-170
L-230
L-260
branch_name
Downtown
Redwood
Perryridge
Relation borrower
43. Outer Join – Example
Inner Join
loan Borrower
loan_number amount
L-170
L-230
3000
4000
customer_name
Jones
Smith
branch_name
Downtown
Redwood
Jones
Smith
null
loan_number amount
L-170
L-230
L-260
3000
4000
1700
customer_name
branch_name
Downtown
Redwood
Perryridge
n Left Outer Join
loan Borrower
44. Outer Join – Example
loan_number amount
L-170
L-230
L-155
3000
4000
null
customer_name
Jones
Smith
Hayes
branch_name
Downtown
Redwood
null
loan_number amount
L-170
L-230
L-260
L-155
3000
4000
1700
null
customer_name
Jones
Smith
null
Hayes
branch_name
Downtown
Redwood
Perryridge
null
n Full Outer Join
loan borrower
n Right Outer Join
loan borrower
45. Compound Operator: Division
Useful for expressing “for all” queries like:
Find sids of sailors who have reserved all boats.
For A/B, attributes of B must be subset of attrs of A.
May need to “project” to make this happen.
E.g., let A have 2 fields, x and y; B have only field y:
A/B contains all tuples (x) such that for every y tuple in B,
there is an xy tuple in A.
A B x y B( x,y A)
47. Expressing A/B Using Basic Operators
Division is not essential op; just a useful shorthand.
(Also true of joins, but joins are so common that systems
implement joins specially.)
Idea: For A(x,y)/B(y), compute all x values that are not
`disqualified’ by some y value in B.
x value is disqualified if by attaching y value from B, we
obtain an xy tuple that is not in A.
Disqualified x values: p p
x x A B A
(( ( ) ) )
A/B: p x A
( ) Disqualified x values