Overview
This lecture covers attribute data in GIS, focusing on tables, data types, database management systems, relationships (cardinality), and common editing practices within platforms like ArcGIS Pro and QGIS.
Attribute Data & Tables in GIS
- Attribute data adds descriptive information to spatial data (points, lines, polygons) using tables.
- Each row in an attribute table is a record (e.g., a feature), and each column is a field (attribute).
- The ID field (e.g., ObjectID) uniquely identifies every feature but is not used for calculations.
- Tables can be edited to add, remove, or calculate fields based on existing data (e.g., population change).
- Selecting the correct data type for each field (integer, double, text) is important for analysis and storage.
Database Management Systems (DBMS) & Structures
- Flat file databases store attribute data simply as rows, making querying efficient.
- Hierarchical DBMS organizes data in parent-child relationships but is less efficient for querying.
- Relational Database Management Systems (RDBMS) use unique fields (keys) to relate tables, enabling flexible joins and queries.
Joins & Relationships (Cardinality)
- Joining tables attaches external attribute data using common fields (keys), such as state or county codes.
- Cardinality defines the type of relationship: one-to-one, one-to-many, many-to-one, or many-to-many.
- One-to-one: one record in each table matches perfectly.
- Many-to-one/One-to-many: multiple records in one table relate to single records in another, often requiring aggregation during joins.
- Many-to-many: complex relationships requiring special handling.
- Null values in join results indicate missing or unmatched data.
- Data type consistency between joining fields is critical; mismatches (string vs. integer) cause join errors or all-null results.
Data Types & Storage Considerations
- Common data types: integer, long, double/float (for decimals), text/string (for names/IDs), date, and binary (0/1).
- Use data types appropriate to the value (e.g., integer for counts, double for rates).
- Excess decimal precision increases storage needs without adding practical value.
- Binary fields are ideal for presence/absence or yes/no data.
- Field length (for text) and value range (for numbers) should be managed to optimize database size.
Editing Attribute Tables
- Editing requires enabling an edit mode; after saving, changes cannot be easily undoneβback up layers before major edits.
- Most local attribute tables are directly editable, but server-based tables may track versions.
Key Terms & Definitions
- Attribute Table β A table containing information describing spatial features.
- Record β A row in the table, representing one spatial feature.
- Field β A column in the table; an attribute of the feature.
- ID Field (ObjectID) β A unique identifier for each record/feature.
- Cardinality β The numerical relationship between records in tables (e.g., one-to-one, many-to-one).
- Join β The process of linking tables on a common field.
- Flat File Database β Simple table database without complex relationships.
- Hierarchical DBMS β Database with parent-child tables.
- Relational DBMS β Database using keys to relate different tables.
Action Items / Next Steps
- Review the slides and posted PDF for examples and data formats.
- Practice joining tables in QGIS or ArcGIS Pro, focusing on cardinality and matching data types.
- Complete any assigned chapter review questions on attribute tables and joins.