====== Decision Support Systems - Module I (6 ECTS): Decision Support Databases A.Y. 2024/25 ====== This is the first module of [[mds:dss:start|Decision Support Systems]] (801AA, 12 ECTS), previously called [[mds:dsd:2021|Decision Support Databases]] (662AA, 6 ECTS). The module presents the main approaches to the design and implementation of decision support databases, and the characteristics of business intelligence tools and computer based information systems used to produce summary information to facilitate appropriate decision-making processes and make them more quick and objectives. Specific attention will be paid to themes such as conceptual and logical Data Warehouses design, data analysis using analytic SQL, algorithms for selecting materialized views, data warehouse systems technology (indexes, star query optimization, physical design, query rewrite methods to use materialized views). A part of the course will be dedicated to a collection of case studies. =====Instructor===== * **Salvatore Ruggieri** * Università di Pisa * [[http://pages.di.unipi.it/ruggieri/]] * [[salvatore.ruggieri@unipi.it]] * **Office hours:** Tuesdays h 14:00 - 16:00 or by appointment, at the Department of Computer Science, room 321/DO, or via Teams. =====Hours and rooms===== The following is the timetable of the whole Decision Support Systems course. The two modules span differently over the semester. The first module will take most of the lessons in September-October. The second module will take most of the lessons in November-December. ^ Day of Week ^ Hour ^ Room ^ | Tuesday | 9:00 - 11:00 | Fib C | | Wednesday | 16:00 - 18:00 | Fib H-Lab | | Thursday | 11:00 - 13:00 | Fib A1 | | Friday | 11:00 - 13:00 | Fib C1 | A [[https://teams.microsoft.com/l/team/19%3AqCllWc8f7UVglFSVL_MhR4ZjaLlWkUjUvJ3ROQdLSOA1%40thread.tacv2/conversations?groupId=14d45f09-9ae8-4f9f-afd1-114348877094&tenantId=c7456b31-a220-47f5-be52-473828670aa1|Teams channel]] is used to post news, Q&A, and other stuff related to the course. The lectures will be only in presence and will **NOT** be live-streamed, but recordings of the lecture or of the previous years will be made available here for non-attending students. =====Mandatory teaching material ===== * **[DW]** A. Albano, S. Ruggieri. [[http://fondamentidibasididati.it/wp-content/uploads/2020/11/DWessential-2023-C21-12-23.pdf|Decision Support Databases Essentials]], University of Pisa, 21 December 2023. * **[DB]** A. Albano. [[http://fondamentidibasididati.it/wp-content/uploads/2020/11/DBEssential-2021-C30-11-21.pdf|DB Essentials]] and [[http://fondamentidibasididati.it/wp-content/uploads/2020/11/DBEssential-2020-Soluzioni-C30-11-21.pdf|solutions to exercises]], University of Pisa, 1 December 2020. This is a self-contained excerpt (in English) from the book [[http://fondamentidibasididati.it|Fondamenti di basi di dati]] (in Italian, free download). * Examples of {{ :mds:dsd:dsdsampleswithsolutions.pdf | written exams with solutions}} and {{ :mds:dsd:dsdsampleswithoutsolutions.pdf|written exams without solutions}}. =====Software===== * [[http://fondamentidibasididati.it/index.php/download/|JRS]] for practicing with logical and physical SQL query plans. JRS requires [[https://www.oracle.com/java/technologies/downloads/#java8|Java SE Runtime Environment 8u421]] (need to register to download) * [[https://docs.microsoft.com/en-us/sql/azure-data-studio/download|Azure Data Studio]] or [[https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms|SQL Server Management Studio]] client for connecting to SQL Server DBMS Foodmart database * [[https://start.unipi.it/en/help-ict/vpn/|Access to University digital services through VPN]] connect to unipi VPN (unless you are already in the unipi.it network) for accessing the Foodmart database =====Preliminary program and calendar===== * [[https://esami.unipi.it/programma.php?c=61299&aa=2023|Preliminary program]]. * [[https://didattica.di.unipi.it/en/master-programme-in-data-science-and-business-informatics/academic-calendar-2024-2025/|Calendar of lessons]]. =====Exams===== __//There are no mid-terms//.__ The exam of Decision Support Systems (801AA, 12 ECTS) consists of a written part and an oral part on the topics of the first module (50% of the final grade), and a lab project with discussion on the topics of the second module (50% of the final grade). The written part consists of open questions, small exercises, and a Data Warehouse design problem. Each question is assigned a grade, summing up to 30 points. Students are admitted to the oral part if they receive a grade of at least 18 points. Oral consists of critical discussion of the written part and of open questions and problem solving on the topics of the course. See [[mds:lbi:start|Module II: Laboratory of Data Science]] for the lab project. **The project of Module II can be discussed only after passing Module I and not later than one year since then.** Registration to the written exam is mandatory (pay attention at the deadlines!): [[https://esami.unipi.it/esami2/|register here]]\\ **Please indicate in the notes "Only Lab" for doing only the discussion of the lab project; "Only DSD" for doing only the written+oral part of the DSD module; or "DSD+Lab" for doing both. The date reported below is for the DSD written exam. The actual date of the discussion of the lab project will be communicated to you by email.** ^ Date ^ Hour ^ Room ^ Notes ^ | 6/11/2024 | 9:00 - 11:00 | Riunioni Ovest, Dept. Computer Science | [[https://didattica.di.unipi.it/en/appelli-straordinari/|Extra-ordinary exam]] | =====Class calendar ===== Lessons will be **NOT** be live-streamed, but recordings of past years are available here for non-attending students.\\ To watch the recordings online, you must be connected to the [[https://start.unipi.it/en/help-ict/vpn/|unipi.it VPN]]. Alternatively, right click on the link and download the whole file, then watch it locally on your device using e.g. [[http://www.videolan.org/vlc/|VLC media player]]. Slides and other material might be updated **after the classes** to align with actual content of lessons and to correct typos. Be sure to download the updated versions. ^ # ^ Date ^ Room ^ Topic ^ Mandatory teaching material ^ |01| 17/09 9-11 | Fib-C | Course overview. Need for Strategic Information. Information Systems in Organizations: Operational and Decision support. Data driven Decision support systems and Business Intelligence applications. [[http://131.114.72.230/dsd/video/dsd01_20220915.mp4|rec01 (.mp4)]] | **[DW: 1.1-1.2]** {{:mds:dsd:dsd01.pdf|slides01 (.pdf)}} | |02| 19/09 11-13 | Fib-A1 | The data warehouse (DW) and DW architectures. What to model in a DW: Facts, measures, dimensions and dimensional hierarchies. Examples of data analysis. Exercises on data analysis in SQL. [[http://131.114.72.230/dsd/video/dsd02_20180919.flv|rec02 (.flv)]] | **[DW: 1.3-1.7]** {{:mds:dsd:dsd02.pdf|slides02 (.pdf)}} | |03| 20/09 11-13 | Fib-L1 | Recalls: the Object Data Model. {{:mds:dsd:dsd03.assignments.pdf|Exercises at home (Assignments I and II) for the lesson 05}}. [[http://131.114.72.230/dsd/video/dsd03_20210921.mp4|rec03 (.mp4)]] | **[DB: 1.1, 2.1-2.5]** {{:mds:dsd:dsd03.pdf|slides03 (.pdf)}} | |04| 24/09 9-11 | Fib-C | DW modeling. Representation of facts, measures, dimensions, attributes and dimensional hierarchies. Key steps in conceptual design from business questions. How to identify facts, measures, dimensions, dimensional attributes and hierarchies. Examples. {{:mds:dsd:dsd04.assignments.pdf|Exercises at home (University exams) for the lesson 05}}. [[http://131.114.72.230/dsd/video/dsd04_20170929.flv|rec04 (.flv)]] | **[DW: 2.1]** {{:mds:dsd:dsd04.pdf|slides04 (.pdf)}} | |05| 26/09 11-13 | Fib-A1 | The example of a data model for Master program exams. Presentation and discussion of the Hospital case study. {{:mds:dsd:dsd05.assignments.pdf|Exercises at home (Assignment III) for the lesson 07}}. [[http://131.114.72.230/dsd/video/dsd05_20210928.mp4|rec05 (.mp4)]] | **[DW: 2.1, A.1]** {{:mds:dsd:dsd05.pdf|slides05 (.pdf)}} | |06| 27/09 11-13 | Fib-C1 | Recalls: the relational model and relational algebra. Exercises. {{:mds:dsd:dsd06.assignments.pdf|Exercises at home (Assignment IV) for the lesson 08}}. [[http://131.114.72.230/dsd/video/dsd06_20211001.mp4|rec06 (.mp4)]] | **[DB: 3.1-3.2]** {{:mds:dsd:dsd06.pdf|slides06 (.pdf)}} | |07| 01/10 9-11 | Fib-C | More about data mart conceptual design, changing dimensions and advanced data model features. From Conceptual design to relational logical design. Star model, snowflake, and constellation. Logical schema of the Hospital case study. {{:mds:dsd:dsd07.assignments.pdf|Exercises at home (Travel agency) for the lesson 09}}. [[http://131.114.72.230/dsd/video/dsd07_20211005.mp4|rec07 (.mp4)]] | **[DW: 2.1, 2.2, A.1, B.1]** {{:mds:dsd:dsd07.pdf|slides07 (.pdf)}} | |08| 03/10 11-13 | Fib-A1 | Recalls: the relational model and relational algebra. Logical trees. {{:mds:dsd:dsd08.jrsexercises.pdf|Exercises with JRS}}. {{:mds:dsd:dsd08.assignments.pdf|Exercises at home (Airline companies) for the lesson 09}}. [[http://131.114.72.230/dsd/video/dsd08_20211008.mp4|rec08 (.mp4)]] | **[DB: 3.2-3.4]** {{:mds:dsd:dsd08.pdf|slides08 (.pdf)}} | |09| 04/10 11-13 | Fib-C1 | Discussion of students' solutions of conceptual and logical design case studies. [[http://131.114.72.230/dsd/video/dsd09_20211012.mp4|rec09 (.mp4)]] | **[DW: A.2, B.2]** {{:mds:dsd:dsd09.pdf|slides09 (.pdf)}} | |10| 8/10 11-13 | Fib-C | Data Warehouse design approaches. Data mart logical design. [[http://131.114.72.230/dsd/video/dsd10_20211015.mp4|rec08 (.mp4)]] | **[DW: 3.1-3.5]** {{:mds:dsd:dsd10.pdf|slides10 (.pdf)}} | |11| 15/10 11-13 | Fib-C | Slowly changing dimensions, fast changing dimensions, shared dimensions. Recursive hierarchies. Multivalued dimensions. {{:mds:dsd:dsd11.assignments.pdf|Exercises at home (Travel agency extended) for the lesson 12}}. [[http://131.114.72.230/dsd/video/dsd11_20221020.mp4|rec09 (.mp4)]] | **[DW: 3.1-3.5]** {{:mds:dsd:dsd11.pdf|slides11 (.pdf)}} | |12| 16/10 16-18 | Fib-H | A DW to support Analytical CRM Analysis. Wrap up on DW design. {{:mds:dsd:dsd12.assignments.pdf|Exercises at home for the lesson 14}}. [[http://131.114.72.230/dsd/video/dsd12_20211022.mp4|rec12 (.mp4)]] | **[DW: 4.1-4.8]** {{:mds:dsd:dsd12.pdf|slides12 (.pdf)}} | |13| 17/10 11-13 | Fib-A1 | Multidimensional Cube model: OLAP Operations. The extended cube and the lattice of cuboids. Pivot tables in Excel. [[http://131.114.72.230/dsd/video/dsd13_20241017.mp4|rec13 (.mp4)]] **Additional learning material:** G. Harvey. Excel 2013 All-in-One For Dummies, 2013. [[http://131.114.72.230/dsd/PivotTable2013BookVIIchpt2.pdf|Chp. VII-2]] and [[http://131.114.72.230/dsd/HerbalTeas.xlsx|example data for pivot table]]. | **[DW: 2.3, 2.4]** {{:mds:dsd:dsd13.pdf|slides13 (.pdf)}} | |14| 18/10 11-13 | Fib-C1 | Recalls on: DBMS, from SQL to extended relational algebra. Exercises. {{:mds:dsd:dsd14.assignments.pdf|Exercises at home for the lesson 15}}. [[http://131.114.72.230/dsd/video/dsd14_20221102.mp4|rec14 (.mp4)]] | **[DB: 4.1-4.2,5.1-5.11]** {{:mds:dsd:dsd14.pdf|slides14 (.pdf)}} | |15| 22/10 9-11 | Fib-C | OLAP systems. Data Analysis Using SQL. Simple reports. Examples. Moderately Difficult Reports. Solutions in SQL. {{:mds:dsd:dsd15.foodmart.pdf|Foodmart datawarehouse schema}}. [[http://131.114.72.230/dsd/video/dsd15_20211102.mp4|rec15 (.mp4)]] | **[DW: 5.1-5.3]** {{:mds:dsd:dsd15.pdf|slides15 (.pdf)}} | |16| 25/10 11-13 | Fib-C1 | Examples of variance reports. Very Difficult Reports without Analytic SQL. Example of reports with ranks. Analytic Functions with the use of partitions and running totals. Examples. {{:mds:dsd:dsd16.assignments.pdf|Exercises at home for the lesson 17}}. [[http://131.114.72.230/dsd/video/dsd16_20211105.mp4|rec16 (.mp4)]] | **[DW: 5.4-5.5]** {{:mds:dsd:dsd16.pdf|slides16 (.pdf)}} | | | 31/10 11-13 | | **Lesson canceled due to a strike.** | | |17| 05/11 9-11 | Fib-C | Analytic Functions with the use of moving windows. Examples. Exercises on Analytic SQL. {{:mds:dsd:dsd17.assignments.pdf|Exercises during the lesson and at home}} and [[http://131.114.72.230/dsd/dsd.17.solutions.txt|solutions]]. [[http://131.114.72.230/dsd/video/dsd17_20211109.mp4|rec17 (.mp4)]] | **[DW: 5.5-5.6]** {{:mds:dsd:dsd17.pdf|slides17 (.pdf)}} | |18| 08/11 11-13 | Fib-C1 | Recalls of relational DBMS internals: Storage, Indexing and Query Evaluation. Physical operators and physical plans for projection, selection, joins and grouping. Examples. [[http://131.114.72.230/dsd/video/dsd18_20211112.mp4|rec18 (.mp4)]] | **[DB: 6.1-6.6, 6.8, 7.1-7.2]** {{:mds:dsd:dsd18.pdf|slides18 (.pdf)}} | |19| 12/11 9-11 | Fib-C | Data Warehouse Systems: Special-Purpose Indexes and Star Query Plan. Bitmap indexes. Join indexes. Star queries optimization and query plans. Examples. Table partitioning. [[http://131.114.72.230/dsd/video/dsd19_20211116.mp4|rec19 (.mp4)]] | **[DW: 6.1-6.4]** {{:mds:dsd:dsd19.pdf|slides19 (.pdf)}} | |20| 15/11 11-13 | Fib-C1 | The problem of materialized views selection. The lattice of views and the greedy algorithm HRU for the selection of materialized views. Examples. Other algorithms for the choice of the views to materialize with a workload and dimensional hierarchies. {{:mds:dsd:dsd20.assignments.pdf|Exercises at home for the lesson 21}}. [[http://131.114.72.230/dsd/video/dsd20_20211119.mp4|rec20 (.mp4)]] | **[DW: 7.1-7.7]** {{:mds:dsd:dsd20.pdf|slides20 (.pdf)}} | |21| 22/11 11-13 | Fib-C1 | Recalls of functional dependency properties and how they are used to reason about the properties of the result of a query. Properties of the group-by operator. [[http://131.114.72.230/dsd/video/dsd21_20221130.mp4|rec21 (.mp4)]] | **[DW: 8.1-8.2, DB: 3.5.1-3.5.4]** {{:mds:dsd:dsd21.pdf|slides21 (.pdf)}} | |22| 29/11 11-13 | Fib-C1 | The problem of evaluating the group-by before the join operator. First case: Invariant grouping. Examples. Other cases: double grouping, grouping and counting. Examples with star queries. [[http://131.114.72.230/dsd/video/dsd22_20221201.mp4|rec22 (.mp4)]] | **[DW: 8.3-8.6]** {{:mds:dsd:dsd22.pdf|slides22 (.pdf)}} | |23| 6/12 11-13 | Fib-C1 | The problem of query rewrite to use a materialized view. Hypothesis and two approaches: With a compensation on the logical view plan, and with a transformation of logical query plan. Examples. [[http://131.114.72.230/dsd/video/dsd23_20211130.mp4|rec23 (.mp4)]] | **[DW: 9.1-9.4]** {{:mds:dsd:dsd23.pdf|slides23 (.pdf)}} | |24| TBD | TBD | Data Warehousing trends: column-oriented DW, main-memory DW, Big Data framework. [[http://131.114.72.230/dsd/video/dsd24_20211203.mp4|rec24 (.mp4)]] | **[DW: 6.5-6.8]** {{:mds:dsd:dsd24.pdf|slides24 (.pdf)}} | =====Previous years===== * [[mds:dsd:2023|Decision Support Databases A.Y. 2023/24]] * [[mds:dsd:2022|Decision Support Databases A.Y. 2022/23]] * [[mds:dsd:2021|Decision Support Databases A.Y. 2021/22]] * [[mds:dsd:2020|Decision Support Databases A.Y. 2020/21]] (special edition)