Data Management: Attribute Data Flashcards
Lecture 8
What is Attribute data in a GIS?
- In a GIS, attribute data are stored in attribute tables in .dbf files
- An attribute table is organized by row and by column
- Each row represents a spatial feature
- Each column describes a characteristic
- Intersect of row & column = Value of particular characteristic
of a feature - A row is also called a record
- A column is also called a field
What are Attribute data types?
Refers to how to GIS stores the attribute data.
*Number
*text
*character
*dates
*blob - binary large objects.
What is measurement scale?
Categorical:
1. Nomial
2. Ordinal
Numeric:
3. Interval
4. Ratio
What is nominal?
No ranking used for naming
What is ordinal?
Ranking with no number [large>medium> small]
What is interval?
Have known numerical intervals but no absolute zero ie. there are negative numbers. (temp in farenheit or celcius)
What is ratio?
Same as interval but has an absolute zero. (temp in Kelvin or rainfall)
What is the measurement scale of attribute data types?
nominal > ordinal > interval > ratio
Increasing level of sophistication.
2 types of attribute data
spatial attribute table
non spatial attribute table
Feature attribute table
- FeatureID = feature’s geometry
- Default
- Geometry like shape, length..
- 1 Row represents 1 spatial feature
- Flat file (looks like an Excel spreadsheet)
non-spaital attribute table
- No direct link to feature’s geometry
- Can link to feature table
- Aim: Efficient storage of attributes
- Avoid duplication
- Dbase file (Access, SQL, Oracle)
What is DBMS [database management system]?
Software package that allows us to manage and manipulate a database.
What is a database?
A database is a collection of interrelated tables in digital format.
What is the primary objective of a database?
collect and maintain information as well as to relate facts and situations that were previously unconnected.
What are the 5 types of databases?
- Flat file
- Hierarchical
- Network
- Relational
- Object Orientated
What is the flat file database?
NB
- Most simple type of database consisting of a single table only
- All data in one ‘spreadsheet’
- Excel spreadsheet = .xls/.xlxs
- Shapefile attribute table = * .dbf
- Outdated in the GIS arena because it lacks any method of checking data integrity
What is heirarchical database?
- Data organized in series similar to family tree
- Hierarchical structure of records organized in files at differing logical levels … connections between levels
- Branches comprise parent & child records
▪ Parent record can have multiple child records
▪ Each child record can have only 1 parent
▪ Parent record at top of database… root record
▪ There is a one-to-many relationship.
What are the advantages of a heirarchical database?
- Easy to understand
- Easy to search (fast)
- Easy to expand
What are the disadvantages of a heirarchical database?
- Need to explicitly define each relation in advance
- Difficult to modify structure
- Large index files requires extra storage space
- No many-to-many relations
- Restricted queries
- Not much used in GIS
What is the network database?
- Relationships not hierarchical (or nested)
- Each table (element/collection of like records) can maintain connections to several tables at different levels
- Child table can have more than one parent table!
What are the advantages of network database?
- More flexible than hierarchical system
- Many-to-many relation
What are the disadvantages of the network database?
- Complex
- Pointers must be explicitly defined
- Many pointers = More storage space occupied
- Limited application
What is the Relational database?
- A RDBMS is a DBMS in which data AND the relationships among the data are stored in tables
- Provide a flexible approach to linkages between records, comes
close to modelling the complexity of spatial relationships between objects - More of a concept than a data structure
▪ Internal architecture varies substantially from one RDBMS to another - RDBMS structure is a collection of tables (or relations) that can be
connected to each other by keys - Each table must contain a ‘key’ field for linkages.
- A primary key represents one or more attributes whose values
can uniquely identify a record in a table
▪ Value of the key is unique/ should not change e.g. phone
number is a unique key in a phone directory
▪ Cannot be null - A foreign key is one or more attributes that refer to a primary
key in another table
What are the advantages of the relational database?
- Simple and flexible
- Don’t have to have complete database design from outset
- Each table independent with key field– only need to ink when run query or analysis
- Ease of creation and maintenance
- Efficient data management and data processing
- Used in many GIS software packages.
What are the disadvantage of relational database?
- Can become large and complex
What is the object oriented database?
- Spatial data and all related attribute data for a feature is dealt with as an integrated entity
- Unlike other systems object-oriented DBMS keep geometric &
attribute data together (single unit) - Remember geodatabase example ?
What are the advantages of the object orientated database?
- Data is located in one place / stored centrally
- Easier to update consistently
- Geometry information is stored in the database, and attributes are stored in a single system!
- Relational databases (RDBMS) are now often ‘replaced’ by object-oriented approaches due to some weaknesses of relational DBMS:
- Inability to store complete objects directly in the database
- Problem dealing with rich data types e.g., sound & video
- Problem with some queries… limitations on geographic
applications.
What are the disadvantages of the object oriented database?
- Maintaining values, connections, methods, and behaviour for each object complex.
How to link tables?
- Join
- Relate
- Relational Class
What does a join do?
brings together two tables by using a common field (primary
key and foreign key) - more permanent.
▪ Recommended for one-to-one or many-to-one
▪ Joined data added to original data table
▪ Not suitable for one-to-many, many-to-many (only first matching destination record is assigned to origin)
What does a relate do?
temporarily connects two tables, but keeps them separate.
▪ Can connect 3 or more tables simultaneously
▪ Particularly useful in Windows based package
▪ Appropriate for all four types of relationships
▪ Can be very slow, especially if data is in a remote database.
What does the relational class do?
Predefined relationships supported and stored in geo-database.
▪ When used for attribute data management a relationship is
defined and stored as a relationship class
▪ Appropriate for all four types of relationships
What is cardinality?
- one to one
- one to many
- many to one
- many to many
what is one to one cardinality?
One record in join table relates to one and only one record in the
input table
what is one to many cardinality?
One record in 1st table relates to many in the 2nd
what is many to many cardinality?
- E.g., Many owners own more than one property
- I.e., A land parcel has many plant species and many plant species
occur on many land parcels
▪ Not Join
▪ Relate table
What is cardinality?
linkage between data in a GIS database.
What is a primary key?
in the primary table
What is a foreign key?
in the secondary table