Table Operations Table Operations Combining tables of attributes
Table Operations
Table Operations • Combining tables of attributes is a powerful analysis technique • Three common types of table operations: • Intersect* • Union* • Join *Tables must have same fields and field types (schema)
Table Operations - Intersect • Output table only contains records that all input tables have in common. Input Table 1 ID 1 2 3 4 5 Region A D A M W Salesman Will Adam Billy Alice Claire Input Table 2 ID 1 5 11 Region A W M Salesman Will Claire Jean Output Table Intersect ID 1 5 Region A W Salesman Will Claire
Table Operations - Union • Output table only contains all records that exist in all input tables Input Table 1 ID 1 2 3 4 5 Region A D A M W Salesman Will Adam Billy Alice Claire Input Table 2 ID 1 5 11 Region A W M Salesman Will Claire Jean Output Table Union ID 1 2 3 4 5 11 Region A D A M W M Salesman Will Adam Billy Alice Claire Jean
Table Operations - Join • Based on a shared attribute, attributes of one input table appended to attributes of the other input table Input Table 1 ID 1 2 3 4 5 Region A D A M W Salesman Will Adam Billy Alice Claire Join Input Table 2 Region A D W M Manager John Felicia Alan Seneca Output Table Area (sq. mi. ) 20 25 16 19 ID 1 2 3 4 5 Region A D A M W Salesman Will Adam Billy Alice Claire Manager John Felicia John Seneca Alan Area (sq. mi. ) 20 25 20 19 16
- Slides: 5