Now we will show you how to analyze your data with NetWeaver. For this exercise we will use the Cascades Lake Chemistry knowledge base and corresponding lake chemistry data. The Cascades knowledge base is a peer-reviewed knowledge base that analyzes chemistry of lakes in Montana and Idaho, USA to determine their sensitivity and potential to be impacted by acid rain (acid deposition). A brief summary of the Cascades Lake Chemistry knowledge base follows:
The sample data set for the Cascades knowledge base is the table “Cascades” in the Access database “LakeChem_US.mdb”. Experts collected the data from lakes in the Cascades region in the mid 1990’s and used them in the peer-reviewing process. A sample of the data appears in figure 1. Other data sets are included in the LakeChem_US database. The “US Lakes” table combines each regional data set into one table.
Close any windows you may have open in NetWeaver Developer. Open the Cascades Lake Chemistry knowledge base (Cascades.nw2) provided with the samples. You should see a knowledge base window (figure 2) Now open the goal group “Surface Water Sensitivity” by double clicking on it. You should now have the goal group window open (figure 3).
Now we will connect the lake chemistry data to the knowledge base. Open the Database Connection Setup window (figure 4) by selecting Configure Links to Databases… from the Data menu, or by pressing the database links button on the application/knowledge base toolbar. This window has two tabs: Data Sources and Links to Data. We will start by identifying our data source, the Cascades table within LakeChem_US.mdb. From the Database Tables toolbar on the Data Sources tab click the Add Database Tables button to open the Add Database Tables window (figure 5).
Our database, being an Access database is file-based, so click on the File DBs menu and select Access (*.mdb) to open a file selection dialog (figure 6). Navigate to and select (open) LakeChem_US.mdb. You will see a credentials dialog (figure 7) for providing a username and password when needed. This database is not secured, so you can just dismiss this dialog. The Add Database Tables window should now display a list of the database tables within LakeChem_US.mdb (figure 8).
From the list of tables within the database select Cascades. You will see a preview of its contents on the right. Click the Add button to add the Cascades table as a data source. Now close the window. Cascades should now be listed in the Data Sources list in the Database Connection window (figure 9).
If you double click on Cascades in the database table list, a database browser will open (figure 10). You might notice that the field names are somewhat “old style” in that they are all uppercase, no spaces, and limited to 10 characters. That is because the data was originally delivered in dBase (*.dbf) format and we opted to leave the field names as they were delivered.
Go back to the Database Connection window (figure 9) and switch to the Links to Data tab (figure 11). We now need to tell each data link from which database table and field to get its data. For the first data link, ANC, click in the Table cell and select Cascades from the drop down menu.
NetWeaver tries to guess which field in the database table matches the data link by calculating how similar the names are. In this case NetWeaver chose ANC_ field from the database table as a match for ANC (figure 12), which is correct. Had this not been correct, you could have used the drop down menu for the field to select the correct one.
Now we will do the rest of the connections the easy way. From the Database Tables menu in the database connection toolbar, select the submenu Apply to all inputs…, and from here select Cascades. (Obviously this only works when you have only one table to connect to all of the data links.) At this point the database connections are complete and the database connection window should look like figure 13 with all tables and fields assigned.
Now that the database connections are complete you might want to save this configuration for later use by clicking the save button in the database connection window's toolbar.
Now we are all set to browse through the Cascades data and see how the lakes fare. Figures 14 & 15 illustrate two lakes with different sensitivities to acid deposition.