3561F09_l14 - Relationaldatabases:keysand cardinality...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Relational databases: keys and 
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Relational database system Keys must:  uniquely identify each record if it is different  SSN works as a key for identifying individuals better than name (which might  be duplicated)  be identical, in type and ID, in the two tables,   column names don’t have to match  sorting, counts don’t have to be the same  Parcel Number Area (acres) Owner 1006 0.2 Jeff Jones 1007 0.3 Susan Smith 1008 0.6 Paul Plane 1009 0.4 Harry Hectare 1010 0.3 Susan Smith 1011 5.0 City of Blaine Obj101 spatial aspatial
Background image of page 2
Relational Database System  a joined table In GIS, the aspatial table is joined to the spatial table The joiner (aspatial):  the source table The joinee (spatial):  the destination table The destination table is the one that is added onto
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Polygon identifiers in the US  FIPS codes – numerical codings of most polygon units in the US  states, counties/parishes, zip codes, block groups, census tracts First three numbers: state Second three numbers:  county
Background image of page 4
QDJ #whatever In a table of all 3000+ US counties, why would  NAME be a dangerous choice for a  key in a relational database?
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Cardinality relationships of RDBMS  links can be done in several ways:  one-to-one  many-to-one  one-to-many  many-to-many  cardinality relationships how the number of instances of a key in one table compares to that of the  other  Parcel Number Area (acres) Owner 1006 0.2 Jeff Jones 1007 0.3 Susan Smith 1008 0.6 Paul Plane 1009 0.4 Harry Hectare 1010 0.3 Susan Smith 1011 5.0 City of Blaine Obj104 One record in  the source table   for each record in  the  destination table These tables have a  one-to-one   cardinality  relationship
Background image of page 6
One-to-one join
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Cardinality relationships of RDBMS  many-to-one:  destination table (e.g., spatial table) has  multiple instances of each value of the key; source has one  City State Mesa Arizona Phoenix Arizona Tucson Arizona Los Angeles California Sacramento California San Francisco California State Time Zone Alabama Central Alaska Pacific Arizona Mountain Arkansas Central California Pacific Colorado Mountain Obj107 destination source joined Often, not all records of the source table are  used in a join
Background image of page 8
Many-to-one join
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
 one-to-many for each record in the destination table,  there are several records in the source;  each record in the source is linked to only  one in the destination  example: destination has property   many-to-many  for each record in the destination, there are several records in the source, and vice  versa  example: destination has stores, source has brands of organic produce  Destination table  (spatial units in GIS) Source table  (nonspatial in GIS) Destination table  (spatial units in GIS)
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/30/2009 for the course GEOG 3561 taught by Professor Robedsall during the Spring '09 term at Minnesota.

Page1 / 46

3561F09_l14 - Relationaldatabases:keysand cardinality...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online