* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download the Working with Tables 1 document
Survey
Document related concepts
Operational transformation wikipedia , lookup
Data Protection Act, 2012 wikipedia , lookup
Expense and cost recovery system (ECRS) wikipedia , lookup
Data center wikipedia , lookup
Clusterpoint wikipedia , lookup
Data analysis wikipedia , lookup
Information privacy law wikipedia , lookup
Forecasting wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
3D optical data storage wikipedia , lookup
Business intelligence wikipedia , lookup
Data vault modeling wikipedia , lookup
Transcript
Geog. 314 Working with tables Introduction • GIS involves both spatial and attribute data • Spatial data is concerned with the geometry (position & shape) of map feature • Attribute data describe a characteristic of map feature (colour, name, size, type, etc) • Attribute data are stored in tables Introduction • Two types of vector data models: • Georelational data model (dominant in GIS) stores spatial and attribute data separately and links them using the feature ID. Before any analysis can be performed , you must synchronize the two datasets • Object oriented data model combines the spatial and attribute data in a single database. Here each map feature has a unique object ID and an attribute to store its geometry. Tables & Attribute data • Tabular information is the basis of geographic features. They allow you to perform the following tasks: • visualize • Query • analyze your data Organization of Attribute data • tables are made up of rows and columns, and all rows have the same number of columns • Each row of a table represents a map feature • Each column represent a characteristic Organization of Attribute data • rows are known as records or tuples • columns are fields or items • Each field can store a specific type of data, such as a number, date, or piece of text, etc • Attribute tables are called feature attribute tables (point attribute table (PAT), arc attribute table (AAT), polygon attribute table (PAT) Organization of Attribute data • Attribute data are managed using DBMS • A database management systems (DBMS) is a set of computer programs for managing an integrated and shared database (Laurini and Thompson, 1992) • DBMS provide tools for data input, search, retrieval, manipulation, and ouput Types of attribute data • We can classify attribute data by (data type & measurement scale • Data type - character or string, number (integer, float, double), date, etc • Measurement scale - categorical (nominal &ordinal) and numeric (ratio & interval) • relationship between measurement scale and data type - ordinal and nominal – character strings - interval & ratio – integer and real numbers data types • Numbers: Can be one of four numeric data types: short integers, long integers, single-precision floatingpoint numbers (often referred to as floats) and double-precision floating-point numbers (commonly called doubles) • Text or string: for storing textual or alphanumeric data • Date: storing date and time • BLOB: Object linking and embedding (OLE) objects are objects created in other applications that are linked or embedded in Access. In this case, binary large object (BLOB) and GEOMETRY data types don't exist in Access, so the object is in ArcGIS and linked to the Access database. Numeric data types • Short integer I. Stores numbers between -32,768 to 32,767 II. Size on hard disk: 2bytes III.Applications: Numeric values without fractional values within specific range; coded values Numeric data types • Long integer I. Stores number s from -2,147,483,648 to 2,147,483,647 II. Size on disk: 4bytes III. Applications: Numeric values without fractional values within specific range Numeric data types • Single-precision floating-point number (float) I. Stores numbers approximately from -3.4 X 1038 to 1.2 X 1038 II. Size on disk: 4bytes III. Application: Numeric values with fractional values within specific range Numeric data types • Double-precision floating-point number (double) I. Stores numbers approximately from -2.2X10 308 to 1.8X10308 II. Size on disk: 8bytes III. Application: Numeric values with fractional values within specific range database model • A database is a collection of interrelated tables in digital format. • Four types of databases: • Flat file: contains all data in a large table (e.g. feature attribute table) • Hierarchical: organizes the data at different levels and uses only the one-to-many associations • Network: builds connections across tables • Relational: a collection of tables (also called relations) which can be connected to each other by keys database model PIN P101 a. FLAT P101 FILE P102 P102 P103 P104 Owner Wang Chang Zoning Residential (1) Residential (1) Smith Jones Costello Smith Commercial (2) Commercial (2) Commercial (2) Residential (1) ZONING b. HIERARCHICAL P101 Wang Chang 1 2 P104 Smith P102 Smith P103 Jones Costello database model c. NETWORK Zoning 1 2 Owner Wang P101 Chang P102 Smith Jones P103 Costello P104 d. RELATIONAL Zoning Owner PIN Zonecode P103 N.B: a problem hierarchical and network data model is the linkages b/n tables must be known in advance and built into the computer code Keys of relational databases • Primary keys: represents one or more attributes whose values can uniquely identify a record in a table • Foreign keys: a counterpart of primary key in another table (i.e. the destination table) • In the parcel and zoning tables below, the key to connect the two is zone code. • Note: the key fields may have different names but must be of the same data type and contain the same kind of info. Primary and foreign keys PIN Sale Date 1-10-98 10-06-68 3-07-97 7-30-78 P101 P102 P103 P104 Foreign key Acres Zonecode 1.0 3.0 1 2 2.5 1.0 2 1 Zonecode 1 Zoning Residential 2 Commercial Primary key