Download - Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries
![Page 1: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/1.jpg)
Fluvial Architecture Knowledge Transfer System (FAKTS):
database interrogation through SQL queries
Luca Colombera, Nigel P. Mountney
Fluvial & Eolian Research Group – University of Leeds
![Page 2: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/2.jpg)
Querying FAKTS
Two alternative ways to interrogate FAKTS:
- WEB-BASED FRONT-END hosted on FRG website.
Easy to use, but of limited capability. Queries can be run on the website without requiring download of software or data.
- SQL QUERIES on MySQL.
More difficult to use, but it enables full database interrogation.Queries are run locally, requiring download of software (MySQL and HeidiSQL) and database.
![Page 3: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/3.jpg)
MySQL queries
Fully searchable but requires SQLknowledge:
-output referring to any type of genetic unit can be generated;
- any type of output can be queried (including proportions, grain size, etc.);
- all available filters can be applied;
- it is possible to tailor the query so that output does not require further data analysis.
![Page 4: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/4.jpg)
MySQL queries
Interrogation of FAKTS through MySQL queries requires having MySQL (back-end) and HeidiSQL (front-end) installed locally.
The software, database and documentation can be downloaded from the FRG website (Doc ID: 598)
MySQL HeidiSQLFAKTS +documents
![Page 5: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/5.jpg)
MySQL queries
Once all software is installed (see FAKTS manual for instructions), users can login to the local MySQL server using HeidiSQL.
![Page 6: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/6.jpg)
MySQL queries
The screen will appear as above: now FAKTS can be loaded.
![Page 7: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/7.jpg)
MySQL queries
The FAKTS dump file needs to be chosen, opened and run.
![Page 8: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/8.jpg)
MySQL queries
The FAKTS dump file needs to be chosen, opened and run.
![Page 9: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/9.jpg)
MySQL queries
Now, if you refresh (F5)…
![Page 10: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/10.jpg)
MySQL queries
…the FAKTS database will appear on the database panel.
![Page 11: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/11.jpg)
MySQL queries
If you click on the database, you will select it.
![Page 12: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/12.jpg)
MySQL queries
You can now query FAKTS by writing or loading a query in a tab.
![Page 13: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/13.jpg)
MySQL queries
You can write a query in the query editor panel.
![Page 14: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/14.jpg)
MySQL queries
Information on SQL syntax and functions can be found in Chapters 12 and 13 of MySQL manual: http://dev.mysql.com/doc/refman/5.6/en/index.html.
![Page 15: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/15.jpg)
MySQL queries
For example, we can write a query for the thickness of channel complexes from sparsely vegetated basins.
![Page 16: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/16.jpg)
MySQL queries
Then we can click on ‘Execute SQL’, or press F9.
![Page 17: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/17.jpg)
MySQL queries
Results will appear in the panel at the bottom.
![Page 18: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/18.jpg)
MySQL queries
Let’s open a new query tab and load a template query.
![Page 19: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/19.jpg)
MySQL queries
Click on ‘Load SQL file’ or press ctrl + O.
![Page 20: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/20.jpg)
MySQL queries
The ‘template query’ folder contains over 50 SQL scripts.
![Page 21: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/21.jpg)
MySQL queries
To guide the choice of a script suitable for your specific scopes, the ‘template query’ document should be referred to.
![Page 22: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/22.jpg)
MySQL queries
To guide the choice of a script suitable for your specific scopes, the ‘template query’ document should be referred to.
![Page 23: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/23.jpg)
MySQL queries
Let’s say we are interested in the types and thicknesses of facies units overlying a 4th-order channel base: we open tq_32.
![Page 24: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/24.jpg)
MySQL queries
In particular, we are interested in information on facies units overlying the base of crevasse channels.
![Page 25: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/25.jpg)
MySQL queries
After identifying the clause that specifies the architectural element type, we edit the script changing ‘CH’ into ‘CR’.
![Page 26: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/26.jpg)
MySQL queries
After editing the script, we can run the query.
![Page 27: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/27.jpg)
MySQL queries
The results are returned in the bottom panel.
![Page 28: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/28.jpg)
MySQL queries
The query we have just run entailed the generation of a temporary table: if we want to edit and run the same script we need to…
![Page 29: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/29.jpg)
MySQL queries
…either edit the script re-naming the temporary table (in addition to the changes required for obtaining the desired output),…
![Page 30: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/30.jpg)
MySQL queries
…or open a new session, in which the same query can be run, without requiring re-naming the temporary table.
![Page 31: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/31.jpg)
MySQL queries
…or open a new session, in which the same query can be run, without requiring re-naming the temporary table.
![Page 32: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/32.jpg)
MySQL queries
The new output – referring to facies units overlying the base of LA barform elements – is now displayed.
![Page 33: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/33.jpg)
MySQL queries
The queries can be designed in a way that all required functions are included: the results do not require any further processing.
![Page 34: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/34.jpg)
MySQL queries
If we want to export the results: we can right click on them…
![Page 35: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/35.jpg)
MySQL queries
…and select ‘Export grid rows’.
![Page 36: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/36.jpg)
MySQL queries
The results can now be exported conveniently as CSV file.
![Page 37: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/37.jpg)
MySQL queries
After exporting either all the results or the selected rows...
![Page 38: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/38.jpg)
MySQL queries
…the FAKTS output can be further analysed or graphed after opening the CSV file using Excel.
![Page 39: Fluvial Architecture Knowledge Transfer System (FAKTS): database interrogation through SQL queries](https://reader030.vdocuments.site/reader030/viewer/2022032414/568132ac550346895d9958b9/html5/thumbnails/39.jpg)
Conclusions
FAKTS interrogation
MySQL queries FRG website- user-friendly menu-driven front-end;
- depositional and architectural elements currently included;
- dimension and transition data currently made available;
- limited number of filters;
- output is given in the form of raw data, which may require further analysis.
Further developments will follow.
- HeidiSQL front-end requires basic SQL knowledge;
- output referring to any type of genetic unit can be generated;
- any type of output can be queried (including proportions, grain size, etc.);
- all available filters can be applied;
- it is possible to tailor the query so that output does not require further data analysis.