Lecture 1
Lecture 1
-
Data management and storage
1. Introduction to databases.
2. Normal forms in relational database modelling.
3. Theory + Lab 1: Creating a database using MySQL language.
4. Theory + Lab 2: SQL queries (aggregation, sorting). Introduction to AI
tools.
5. Theory + Lab 3: SQL Joins. Working with AI tools.
6. Theory + Lab 4: SQL Views.
7. Types of NoSQL databases. CAP theorem. Wrap-up;
Rules:
• The score in the exam should at least 9.0 (out of 20).
• The teams are made of 4-5 students.
• Late deliveries for the project will be penalized with 1
point for each late day up to 5 points.
Source: Lemahieu, W., vanden Broucke, S., & Baesens, B. (2018). Principles of Database Management
(in
zettabytes)
Source: https://www.statista.com/statistics/871513/worldwide-data-created/
Source: https://www.statista.com/statistics/724611/worldwide-database-market/
Instituto Superior de Estatística e Gestão de Informação
Universidade Nova de Lisboa 12
DBMS ranking
Source: https://db-engines.com/en/ranking
Method of calculating the scores: https://db-engines.com/en/ranking_definition
Source https://insights.stackoverflow.com/survey/2021#most-popular-technologies-database
Ride-hailing
Ride-sharing
Is it a good idea?
Source: Lemahieu, W., vanden Broucke, S., & Baesens, B. (2018). Principles of Database Management
Instituto Superior de Estatística e Gestão de Informação
Universidade Nova de Lisboa 24
Why do we need a database? File-based approach
Source: Lemahieu, W., vanden Broucke, S., & Baesens, B. (2018). Principles of Database Management
Instituto Superior de Estatística e Gestão de Informação
Universidade Nova de Lisboa 25
Database approach
The DBMS
must support the ACID
(Atomicity, Consistency,
Isolation, Durability)
Source: Lemahieu, W., vanden Broucke, S., & Baesens, B. (2018). Principles of Database Management
Instituto Superior de Estatística e Gestão de Informação
Universidade Nova de Lisboa 26
The Three-Layer Architecture
The Three-Layer Architecture
Source: Lemahieu, W., vanden Broucke, S., & Baesens, B. (2018). Principles of Database Management
Instituto Superior de Estatística e Gestão de Informação
Universidade Nova de Lisboa 28
The Three-Layer Architecture
The conceptual and logical data models focus on the data items, their
characteristics, and relationships.
• user-friendly
• implementation-
independent
Source: Lemahieu, W., vanden Broucke, S., & Baesens, B. (2018). Principles of Database Management
Instituto Superior de Estatística e Gestão de Informação
Universidade Nova de Lisboa 29
The Three-Layer Architecture
The external data model offers a window on selected part of the logical
data model.
Source: Lemahieu, W., vanden Broucke, S., & Baesens, B. (2018). Principles of Database Management
Instituto Superior de Estatística e Gestão de Informação
Universidade Nova de Lisboa 30
The Three-Layer Architecture
The internal data model specifies how the data are stored or organized
physically.
Source: Lemahieu, W., vanden Broucke, S., & Baesens, B. (2018). Principles of Database Management
Instituto Superior de Estatística e Gestão de Informação
Universidade Nova de Lisboa 31
The Three-Layer Architecture - Example
Source: Lemahieu, W., vanden Broucke, S., & Baesens, B. (2018). Principles of Database Management
Instituto Superior de Estatística e Gestão de Informação
Universidade Nova de Lisboa 32
Database users
Database users
The aim is to understand the diferente steps and data needs of the
process. Techniques: interviews, surveys, inspections of documents,
etc
The logical data model is based upon the implementation environment. At this
stage it is already known what type of DBMS (e.g., RDBMS, OODBMS, etc.) will be
used, the product itself (e.g., Microsoft, IBM, Oracle) has not been decided yet.
Instituto Superior de Estatística e Gestão de Informação
Universidade Nova de Lisboa 41
The database design process
Finally: The logical data model
can be mapped to an internal
data model by the database
designer. In this step, the DBMS
product is known. The database
can then be populated with
data and is ready for use.
An attribute is an instance of an
attribute type
A relationship represents an
association between two or
more entities. A relationship
type then defines a set of
relationships among
instances of one, two, or
more entity types.
Think about the ENTITY TYPES that you may need for SOBER.
Think about the RELATIONSHIPS between those ENTITY TYPES.
Draw the diagram on paper.