* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Technical documentation of the Decision Support System
Oracle Database wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Functional Database Model wikipedia , lookup
Concurrency control wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Ingres (database) wikipedia , lookup
Relational model wikipedia , lookup
Clusterpoint wikipedia , lookup
HABIT-CHANGE Technical documentation of the Decision Support System 08/2012 This project is implemented through the CENTRAL EUROPE Programme co-financed by the ERDF Title: 08/2012 Date: Technical Documentation of Decision Support System Author: Sebastian Geidel, Kathrin Renner (EURAC) Project: HABIT-CHANGE – Adaptive management of climate-induced changes of habitat diversity in protected areas CENTRAL EUROPE 2CE168P3 Project Number: 3/2010 2/2013 End date: Output Number: Programme: Start date: Lead Partner: Project Partner: Contact: Further information [2] 5.1.2 Leibniz Institute of Ecological and Regional Development (IOER), Germany University of Vienna, Austria National Academy of Sciences, Scientific Centre for Aerospace Research of the Earth, Ukraine Thuringian State Institute for Forestry, Game and Fishery, Germany Potsdam Institute for Climate Impact Research, Germany Technische Universität Berlin, Germany Balaton Uplands National Park Directorate, Hungary Szent Istvan University, Hungary Biebrza National Park, Poland Environmental Protection Institute, Poland Triglav National Park, Slovenia University of Bucharest, Romania Central Institute for Meteorology and Geodynamics, Austria Danube Delta National Institute for Research and Development, Romania SOLINE Pridelava soli d.o.o., Slovenia University of Maribor, Slovenia European Academy Bolzano, Italy Marco Neubert, [email protected], +49 351 4679-274 Sven Rannow, [email protected], +49 351 463-42359 www.habit-change.eu Contents 1. Introduction and background 4 2. User Requirements 4 3. Data sets 6 4. Database – Design and set up 6 5. Web application This project is implemented through the CENTRAL EUROPE Programme co-financed by the ERDF 10 [3] 1. Introduction and background The managers of Natura 2000 sites are currently confronted with changes to their areas due to anthropogenic as well climatic impacts. Habitat compositions are changing following a changing climate and modifications in land use. Nature conservation strategies have to understand those changes as in order to be able to react appropriately. In the HABIT-CHANGE the project consortium developed scenarios and indicators that help to describe this change, its drivers and effects. The aim of the project is to evaluate existing management strategies is to provide nature park managers with This technical documentation provides a step-by-step guide how we designed and set up the IT infrastructure for this Decision Support System. See: http://webgis.eurac.edu/habit/ 2. User Requirements Open Source Software: >Apache Webserver >MySQL database >PHP scripting language It is the most widely used software for the development of Web applications. The Apache Friends project has bundled these software in a package called XAMPP, to make it more comfortable. Everything is pre-configured and ready to use, just download, install and start. http://www.apachefriends.org/en/xampp-windows.html There are also versions for several Linux distributions, a Mac OS X “beta” version (first steps of development), as well as a smaller portable version, called XAMPP Portable Lite. (up to this date just for Windows) With the Portable Lite configuration it runs from your removable media. You can use it on your USB flash drive or your external hard drive. You can download it here: http://www.apachefriends.org/en/xampp-windows.html#646 [4] After the installation is complete, you will find XAMPP under Start | Programs | XAMPP. Or when you decide to use the portable version, please go to the folder where you unzipped it. (e.g. C:\xampplite\xampp-control.exe) You can use the XAMPP Control Panel to start/stop all server and also install/uninstall services. If the Apache Webserver is started (green color), type “localhost/xampp” in a new browser tab. (Firefox,Chrome are recommended) to see it online and the status of their components. This project is implemented through the CENTRAL EUROPE Programme co-financed by the ERDF [5] 3. Data sets The DSS web application communicates with database tables. As mentioned before a MySQL database is used and needs to be filled. Please download these 4 Excel (csv) files http://webgis.eurac.edu/habit/doc/habitat.csv http://webgis.eurac.edu/habit/doc/pressure.csv http://webgis.eurac.edu/habit/doc/impact.csv http://webgis.eurac.edu/habit/doc/response.csv Every file contains the data records of a specific database table. (respective “Habitat”, “Pressure”, “Impact” and “Response”) 4. Database – Design and set up Now go to “localhost/phpmyadmin”. You will see the web database management tool of the MySQL database called phpMyAdmin. Click on the Database tab in the main menu. Create a new database by typing “habit_change_dss”, also define the character encoding with “utf8_general_ci”. (see attached picture) Press the “Create” button. [6] Select the just created database by choosing “habit_change_dss” from the left menu. Now the tables of the database have to be generated and filled with the information of the downloaded excel files. (important: this example assumes that all excel files are stored in C:\Test) Click on the SQL tab in the main menu: Copy the SQL statements below into the SQL query window (see picture) Press the “Go” button. Do this procedure for every single table. CREATE TABLE habitat ( habitat_id int not null primary key auto_increment, habitat_level1 smallint, habitat_l1_desc varchar(200), habitat_level2 smallint, habitat_l2_desc varchar(200), habitat_type char(5), habitat_type_desc varchar(200) ); LOAD DATA LOCAL INFILE '/Test/habitat.csv' INTO TABLE habitat FIELDS TERMINATED BY ';' LINES TERMINATED BY '\n'; This project is implemented through the CENTRAL EUROPE Programme co-financed by the ERDF [7] CREATE TABLE pressure ( pressure_id int not null primary key auto_increment, pressure_code smallint, pressure varchar(200), pressure_type varchar(50), pressure_subtype varchar(50), habitat_level1 varchar(50), created_by varchar(50) ); LOAD DATA LOCAL INFILE '/Test/pressure.csv' INTO TABLE pressure FIELDS TERMINATED BY ';' LINES TERMINATED BY '\n'; -------------------------------------------------------------------------------------------------------------------------------------CREATE TABLE impact ( impact_id int not null primary key auto_increment, impact_code smallint, impact text, impact_type varchar(50), habitat_level1 varchar(50), created_by varchar(50) ); LOAD DATA LOCAL INFILE '/Test/impact.csv' INTO TABLE impact FIELDS TERMINATED BY ';' LINES TERMINATED BY '\n'; -------------------------------------------------------------------------------------------------------------------------------------CREATE TABLE response ( response_id int not null primary key auto_increment, response_code smallint, response_option text, response_type varchar(50), source varchar(50), habitat_level1 varchar(50), created_by varchar(50) ); [8] LOAD DATA LOCAL INFILE '/Test/response.csv' INTO TABLE response FIELDS TERMINATED BY ';' LINES TERMINATED BY '\n'; The table “hpir_chains” will be used to store the Habitat-Pressure-Impact-Response (hpir-) chains created by the user with the DSS web application. CREATE TABLE hpir_chains ( hpir_id int not null primary key auto_increment, habitat_id integer, pressure_id integer, impact_id integer, response_id integer, created_by varchar(50) ); With the table “habit_members” you can define which user will have full access to the database (can create chains) and which user will have limited access, can just read the database. The predefined user “guest”, will automatically have this kind of limited reading role. CREATE TABLE habit_members ( user_id int not null primary key auto_increment, username varchar(50), password varchar(50) ); INSERT INTO habit_members (username, password) VALUES ('guest', MD5('guest')); INSERT INTO habit_members (username, password) VALUES ('user1', MD5('pass1')); This project is implemented through the CENTRAL EUROPE Programme co-financed by the ERDF [9] When the table import is done, you will see a database structure like in the picture above. Now the database is ready. When you click “browse”, you can see the content of each table. 5. Web application The last step is to copy the program files into Apache’s “Hyper Text Documents" htdocs folder. It is located within your xampp main folder. [10] Please download the program files: http://webgis.eurac.edu/habit/doc/dss_webapp.zip That’s all, now you can start the DSS web application, and start creating chains: http://localhost/habitChange This project is implemented through the CENTRAL EUROPE Programme co-financed by the ERDF [11]