GIS Analysis | GeoModeler | |||||||||||||||
Representing the Environment on All Scales | ||||||||||||||||
![]() |
||||||||||||||||
![]() |
||||||||||||||||
![]() |
||||||||||||||||
![]() |
||||||||||||||||
|
![]() |
Creating, managing and making use of a database This segment demonstrates the aspects of databases from creation to use. Entity-relationship diagrams, or E-R diagrams, are used to sketch out the framework for a database. Once the relationships are defined, a working database can be created using a database software, such as MS Access. Once a database is constructed in MS Access, relationships can between the data can be defined (e.g. one-to-one, one-to-many, or many-to-many) and a relationship diagram produced. Structured Query Language (SQL) is a useful tool to pre-process datasets because it can handle complex data manipulation tasks and is widely support by most relational database management systems. SQL can be called from a Python script which adds the ability to automatically generate reports based on required information.
Suppose that after the requirements collection and analysis phase, the database designers stated the following description of the “miniworld”, the part of the company to be represented in the database:
A relational diagram can be created for a database in MS Access.
A relational diagram can also be created in Visio, which gives the user more flexibility in the arrangement and look of the database structure.
Use SQL to create a table: CREATE TABLE R_Contacts_new (Contact_ID Text(20), Lname Text(20), FName Text(15), Org_ID Text(50), OBJECTID int);
Use SQL to query and join tables: Write a join query to join table W_FI_Gamefish and table W_FI_zdd_FISH_Species. Keep all records from table W_FI_Gamefish, keep only match records from table W_FI_zdd_FISH_Species. Retrieve SiteVisit_ID, Species, TL, WT from table W_FI_Gamefish, retrieve Acronym, Commonname, LATINNAME, ITIS_NAME, FAMILY from table W_FI_zdd_FISH_Species. qry_Join1
SQL can be called from a Python script by importing the pyodbc module. Applications Database management is an important consideration in any organization where large amounts of data are stored, accessed and perhaps edited by a many people. The database management techniques used in these examples above would be very valuable to all operation shops in an Army unit. An operations officer could update training management, then automatically generate reports for the commander. Simultaneously, subordinate operations officers and their staff could "see", utilize and update the documents.
|
||||||||||||||