This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
teaching:infoh415:tp [2019/10/22 10:21] gdejaege [Graph databases] |
teaching:infoh415:tp [2024/12/04 12:09] (current) ezimanyi [Active databases] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== INFO-H-415 : Exercises ====== | ====== INFO-H-415 : Exercises ====== | ||
- | ===== Active databases ===== | + | This year, to simplify the workflow of the exercises we will be using docker to manage the required database systems. |
- | ==== Before Session 1 ==== | + | If you have never used docker you can find an installation guide here: |
- | If you are planning on working on your own laptop, please download and install the following before the first exercice session: | + | [[https://docs.docker.com/engine/install/|Installing docker]] |
- | * [[https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017|SQL Server Management Studio]] | + | |
- | * [[https://www.microsoft.com/en-us/sql-server/sql-server-editions-express|SQL Server Express]] | + | |
+ | Please also take the time to familiarize yourself with docker if you have no prior experience with it: [[https://docs.docker.com/get-started/| Getting started]] | ||
+ | ===== Spatial databases (PostGIS) ===== | ||
+ | For the spatial databases exercises, you will have to install the following tool on your computer: | ||
+ | * [[https://www.qgis.org/en/site/ | QGIS]] | ||
- | ==== Session 1 : Exercises "PhD" ==== | + | You will also have to create a container in docker for MobilityDB which will both be used in the spatial and mobilityDB part of this course. Having Docker installed, run the following command in a terminal: |
- | * {{:teaching:infoh415:infoh415_tp01_slides_2019.pdf|Slides: Intro + recap}} | + | ''docker pull ----platform=linux/amd64 mobilitydb/mobilitydb'' |
- | * {{:teaching:infoh415:infoh415_tp01_exercices_2018.pdf|Exercises + Solutions}} | + | |
- | * {{teaching:infoh415:sdi_actives_phd_scripts.zip|SQL Server Scripts}} | + | |
- | * The first exercice session will take place in UB4.130 | + | |
+ | ''docker volume create mobilitydb_data'' | ||
- | ==== UB4.126: Sessions 2 and 3 : Exercises "Employees Departments Projects" ==== | + | ''docker run ----name mobilitydb -e POSTGRES_PASSWORD=mysecretpassword -p 25432:5432 -v mobilitydb_data:/var/lib/postgresql -d mobilitydb/mobilitydb'' |
- | * These sessions take exceptionally place in UB4.126 | + | Then you will have to connect on your database server via a client (either GUI or terminal based): |
- | * {{:teaching:infoh415:2019_infoh415_tp02_03_slides.pdf|Recap}} | + | * [[https://www.pgadmin.org/|PgAdmin]] a simple GUI for PostgreSQL. |
- | * {{:teaching:infoh415:2018_infoh415_tp02_03_exercices_updated.pdf|Exercises + Solutions}} | + | * [[https://www.postgresql.org/docs/current/app-psql.html|psql]] The terminal based client. |
- | * {{teaching:infoh415:sdi_actives_constraints_scripts.zip|SQL Server Scripts}} | + | |
+ | When connecting your username is **postgres** (default username), the password is set in the docker run command (by default mysecretpassword), the address is **localhost** and the port **25432**. | ||
+ | The two first exercise sessions will both be devided into a lab part and an exercise part. During the lab part, we will show you how to use the different tools and what we can do with them. This part will not be covered during the exam. During the exercise part, you will need to write some spatial databases requests. This part will be covered during the examination. QGIS will only be used for the lab part of the sessions. | ||
- | ===== Graph databases ===== | + | ==== Session 1 ==== |
+ | |||
+ | * {{:teaching:infoh415:tp10.zip|TP1}} | ||
+ | |||
+ | |||
+ | ==== Session 2 ==== | ||
+ | |||
+ | <note important>To use rasters in your database you have first to add the extension 'postgis_raster'</note> | ||
+ | * {{:teaching:infoh415:tp11.zip|TP2}} | ||
+ | * {{:teaching:infoh415:alt_10m_raster.zip|Alt_10m_bil_raster SQL script}} | ||
+ | |||
+ | ==== Session 3 ==== | ||
+ | |||
+ | * {{:undefined:tp12.zip|TP3}} | ||
+ | * [[https://drive.google.com/file/d/1nRqOoLbDFL2pfSxn5bzWva5dMYFjtEWZ/view?usp=sharing|GeoNorthwind PostGIS 3 Database File]] | ||
+ | |||
+ | |||
+ | ===== Mobility databases ===== | ||
==== Sessions 4, 5, 6 ==== | ==== Sessions 4, 5, 6 ==== | ||
+ | ... | ||
+ | |||
+ | /* | ||
+ | {{:teaching:infoh415:graphdb-ulb-2021.zip|Material for Graph databases sessions}} | ||
+ | |||
+ | The slides and exercise sessions are available here above. The actual database dumps for the third exercise session are too large for this website and are available on the UV. | ||
+ | Please note that you should download and use Neo4j 4.2.19. | ||
+ | Solutions: | ||
+ | - {{:teaching:infoh415:graphdb_solutions.zip|}} | ||
+ | */ | ||
+ | |||
+ | |||
+ | /*{{:teaching:infoh415:introduction_to_graph_databases_-_ulb.zip|}} | ||
+ | |||
+ | Please be sure to install the correct version of Neo4J as indicated in the installation document. | ||
+ | |||
+ | /* | ||
The commands needed to start the server are written here under. Do not forget to first select the correct databasa as written in the assignment. | The commands needed to start the server are written here under. Do not forget to first select the correct databasa as written in the assignment. | ||
Line 48: | Line 83: | ||
* {{:teaching:infoh415:assigment_graph.pdf|Exercices on Graph Databases}} | * {{:teaching:infoh415:assigment_graph.pdf|Exercices on Graph Databases}} | ||
- | /* * {{:teaching:infoh415:data.zip| databases used}} */ | ||
* {{:teaching:infoh415:graph_databases_updated.zip| databases used UPDATED}} | * {{:teaching:infoh415:graph_databases_updated.zip| databases used UPDATED}} | ||
* {{:teaching:infoh415:part_3_-_neo4j-practice.pdf| introductory slides }} | * {{:teaching:infoh415:part_3_-_neo4j-practice.pdf| introductory slides }} | ||
- | /* * {{:teaching:infoh415:graph_db_solutions_1819.pdf|Corrections}} */ | ||
+ | |||
+ | */ | ||
===== Temporal databases ===== | ===== Temporal databases ===== | ||
- | ==== Sessions 7, 8 and 9 ==== | + | ==== Sessions 7 and 8 ==== |
- | * {{:teaching:infoh415:infoh415_tp04_05_06_slides1.pdf|Recap}} | + | |
- | * {{:teaching:infoh415:infoh415_tp04_05_06_exercices.pdf|Exercises and solutions}} | + | * {{:teaching:infoh415:2021_infoh415_tp04_05_06_slides.pdf|Recap}} |
- | * {{:teaching:infoh415:infoh415_1415_tp04_05_06_scripts.zip|SQL Server Scripts}} | + | * {{:teaching:infoh415:temporal_difference_example.pdf| Drawing temporal difference}} |
+ | * {{:teaching:infoh415:temporal_join_example.pdf| Drawing temporal join}} | ||
+ | * {{:teaching:infoh415:temporal_coalescing_example.pdf| Drawing temporal coalescing}} | ||
+ | * {{:teaching:infoh415:2021_translationea.pdf| Traduction of EA schemas}} | ||
+ | * {{:teaching:infoh415:temporal_database_exercises.pdf|Exercises and solutions}} | ||
+ | * {{:teaching:infoh415:postgresql_scripts.zip|PostgreSQL Scripts}} | ||
* {{:teaching:infoh415:infoh415_tp05_ex10.pdf|Explanation of 10th query exercise}} | * {{:teaching:infoh415:infoh415_tp05_ex10.pdf|Explanation of 10th query exercise}} | ||
* {{:teaching:infoh415:ex10_aggregation_step_by_step.pdf|10th query step by step drawing}} | * {{:teaching:infoh415:ex10_aggregation_step_by_step.pdf|10th query step by step drawing}} | ||
+ | * Planning: | ||
+ | * Session 7: Exercice 1 (relational schema) and queries 1 to 8 | ||
+ | * Session 8: Queries 9 to 13 | ||
+ | |||
+ | ==== Sessions 9 : MobilityDB and temporal databases ==== | ||
+ | |||
+ | * {{:teaching:infoh415:sql_script_tmpmobdb.zip|MobilityDB Scripts}} | ||
+ | * {{:teaching:infoh415:tempcompany_mobdb.pdf|Exercises}} | ||
+ | |||
+ | |||
+ | ===== Active databases ===== | ||
+ | |||
+ | ==== Before Session 10 ==== | ||
+ | Please download and install the following before the first exercise session. | ||
+ | * For windows: | ||
+ | * Server: [[https://www.microsoft.com/en-us/sql-server/sql-server-downloads|SQL Server Express]] | ||
+ | * GUI: [[https://docs.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver15| Azure studio]] or [[https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017|SQL Server Management Studio]] or [[https://www.jetbrains.com/datagrip/| DataGrip]] | ||
+ | * For linux: | ||
+ | * Server: [[https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-overview?view=sql-server-ver15&viewFallbackFrom=azuresqldb-current|SQL Server]]. While choosing the "edition", please select the free "Express" edition. | ||
+ | * GUI: [[https://docs.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver15| Azure studio]] or [[https://www.jetbrains.com/datagrip/| DataGrip]]. To connect to your SQL Server express, please indicate server: "localhost", login: "SA" and the password selected during the installation of SQL Server. | ||
+ | * Using Docker (only option for Mac): | ||
+ | * [[https://database.guide/how-to-install-sql-server-on-a-mac/|Follow this tutorial]]. Tutorial for Mac but should work for any platform since it is using docker. | ||
+ | |||
+ | |||
+ | ==== Session 10 : Exercises "PhD" ==== | ||
+ | |||
+ | * {{:teaching:infoh415:intro_active_databases.pdf|Slides: Intro}} | ||
+ | * {{:teaching:infoh415:2021_adb_tp1_exercices.pdf|Exercises + Solutions}} | ||
+ | * {{:teaching:infoh415:2021_adb_tp1_sql.zip|SQL Server Scripts}} | ||
+ | |||
+ | |||
+ | ==== Sessions 11 and 12 : Exercises "Employees Departments Projects" ==== | ||
+ | | ||
+ | |||
+ | * {{:teaching:infoh415:2021_adb_tp02_03_slides.pdf|Recap}} | ||
+ | * {{:teaching:infoh415:2021_adb_exercices.pdf|Exercises + Solutions}} | ||
+ | * {{:teaching:infoh415:Adb_2_3.zip|New scripts}} | ||
+ | /* | ||
+ | ==== Session 12 ==== | ||
+ | * {{:teaching:infoh415:temporal_constraints_exercises.pdf|Exercises + Solutions}} | ||
+ | * {{:teaching:infoh415:infoh415_tp12_scripts.zip|TP12 scripts}} | ||
+ | */ | ||
/* | /* | ||
===== Object databases ===== | ===== Object databases ===== | ||
- | ==== Session 7 : LINQ (SQL) ==== | + | ==== Session 10 : LINQ (SQL) ==== |
* {{:teaching:infoh415:sdi_object_linq_sql_slides.pdf|Slides}} | * {{:teaching:infoh415:sdi_object_linq_sql_slides.pdf|Slides}} | ||
* {{:teaching:infoh415:sdi_object_linq_sql.pdf|Exercises and solutions}} | * {{:teaching:infoh415:sdi_object_linq_sql.pdf|Exercises and solutions}} | ||
- | ==== Session 8 : LINQ (XML) ==== | + | ==== Session 11 : LINQ (XML) ==== |
* {{:teaching:infoh415:infoh415_tp08_linq-xml_slides.pdf|Slides}} | * {{:teaching:infoh415:infoh415_tp08_linq-xml_slides.pdf|Slides}} | ||
* {{:teaching:infoh415:infoh415_tp08_linq-xml_exercises.pdf|Exercises and solutions}} | * {{:teaching:infoh415:infoh415_tp08_linq-xml_exercises.pdf|Exercises and solutions}} | ||
* {{:teaching:infoh415:dblp-100k.zip|DPLP Xml file}} | * {{:teaching:infoh415:dblp-100k.zip|DPLP Xml file}} | ||
- | ==== Session 9 : Object relational databases (Oracle) ==== | + | ==== Session 12 : Object relational databases (Oracle) ==== |
* {{:teaching:infoh415:sdi_object_slides_oracle.pdf|Slides}} | * {{:teaching:infoh415:sdi_object_slides_oracle.pdf|Slides}} | ||
Line 83: | Line 165: | ||
* [[https://docs.oracle.com/cd/B28359_01/appdev.111/b28371/toc.htm|On-line Oracle documentation]] | * [[https://docs.oracle.com/cd/B28359_01/appdev.111/b28371/toc.htm|On-line Oracle documentation]] | ||
*/ | */ | ||
- | |||
- | ===== Spatial databases (PostGIS) ===== | ||
- | |||
- | ==== Session 10 ==== | ||
- | |||
- | * {{:teaching:infoh415:infoh415_tp_10_exercices_solutions_2018.pdf|Exercises}} | ||
- | * {{:teaching:infoh415:infoh415_postgis_insertion.zip|}} | ||
- | * {{:teaching:infoh415:shapefiles.zip}} | ||
- | * {{:teaching:infoh415:tp_10_txt_corrections.zip|}} | ||
- | * {{:teaching:infoh415:shapefiles.tar.gz}} | ||
- | * [[http://postgis.net/docs/index.html|On-line PostGIS documentation]] | ||
- | * [[http://postgis.net/docs/reference.html#Management_Functions|On-line PostGIS documentation - Command reference]] | ||
- | |||
- | ==== Session 11 ==== | ||
- | |||
- | * {{:teaching:infoh415:infoh415_postgis_bel_alt.zip|bel_alt.vrt}} | ||
- | * {{:teaching:infoh415:infoh415_postgis_generate.sql.zip|}} | ||
- | * {{:teaching:infoh415:infoh415_tp11_exercices.pdf|Exercices}} | ||
- | * {{:teaching:infoh415:infoh415_tp11_slides.pdf|Slides}} | ||
- | * {{:teaching:infoh415:infoh415_tp11_commands_and_corrections.zip|Corrections and commands}} | ||
- | |||
- | ==== Session 12 ==== | ||
- | |||
- | * {{:teaching:infoh415:infoh415_2018_tp12_exercices.pdf|Exercices}} | ||
- | * {{:teaching:infoh415:initialisation.zip|Initialisation script}} | ||
- | * {{:teaching:infoh415:spatial_reference_guide.pdf|References}} |