SlideShare a Scribd company logo
1 of 36
PROGETTAZIONE CONCETTUALE  DI BASI DI DATI: INTRODUZIONE  E MODELLO ER Marco Brambilla http://home.dei.polimi.it/mbrambil   http://twitter.com/MarcoBrambi http://www.slideshare.net/mbrambil
Sommario della lezione ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Il contesto: progettazione sw ,[object Object],Modellazione  concettuale Analisi funzionale Specifica requisiti  non funzionali Progettazione  SW applicativo Progettazione  logica Progettazione  fisica
Fasi della progettazione ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],*  CIM = computation independent model PIM = platform independent model PSM = platform specific model
Ingredienti dei modelli concettuali ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Esempio... dall’asilo
Il modello ER ,[object Object],[object Object],[object Object],[object Object],[object Object]
Caso di studio ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Entità ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],nome dell’entità studente esempio:
Associazione (o Relazione) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Nome studente esempio: esame Sostenere
Rappresentazione grafica  delle istanze: relazione matematica! Studente Esame ,[object Object],[object Object],[object Object]
Attributi ,[object Object],[object Object],[object Object],[object Object],codice cognome voto
Come progettare? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Corrispondenza tra concetti  ed elementi ER ,[object Object],[object Object],[object Object],[object Object],[object Object]
Esempio: gestione viaggi autobus guidatore autobus percorso guidare servizio
Esempio: università dipartimento docente corso studente afferenza insegnamento frequenza
Ruoli e Cardinalità ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Associazione 1:1 con opzionalità direttore reparto direzione (0,1) (1,1) ,[object Object],[object Object],[object Object]
Associazione 1:1 con opzionalità Reparto Direttore
Auto-associazioni  impiegato controllato controllore controllo (0,n) (0,1) associazioni aventi come partecipanti istanze provenienti dalla stessa entità  (chiamate anche “ad anello”):
Associazioni ternarie guidatore (1,n) (0,n) autobus (0,n) percorso guida Pensaci N volte prima di introdurre una associazione di grado N Attenzione alle cardinalità
Associazioni ternarie Autobus Percorso Guidatore
Cardinalità degli attributi ,[object Object],[object Object],es.: matricola, cognome, voto   attributo  multiplo  (sono ammessi n valori) es.: qualifica, titolo, specialità (1,n) il simbolo (n,m) esprime la  cardinalità dell’attributo.  attributo  opzionale  (è ammessa la  “ non esistenza del valore ”) (0,n) es.: tel., qualifica, targa (0,1)
Attributi composti attributo  composto attributo  multiplo composto es.: data (gg,mm,aaaa), indirizzo (via, numero civico, città, provincia, cap) ,[object Object],es.: telefono (stato, città, numero) (1,1)
Identificatore Un  identificatore  caratterizza in modo univoco ciascuna istanza di entità  simbolo non è modificabile (in generale…) c.f.  dipendente macchina mat.  libro c.inv.
Identificatori composti L’identificatore di un’entità può essere composto località albergo nome stabilimento nome località società AUTO targa modello n. telaio n. produzione
Attributi – esempio completo D I P E N D E N T E c.f. nome cognome data_nascita data_assunzione livello stipendio indirizzo n_tel. qualifica (0,1) (1,2) (1,n) recapito
Entità deboli ,[object Object],[object Object],[object Object],[object Object],[object Object]
Simboli usati (0,n) parente CF dipendente (1,1) (0,n) parente CF dipendente (1,1) Ass. Ass. matr matr
Gerarchie di generalizzazione Ereditarietà ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Proprietà delle gerarchie:  t  vs.  p  ,  e  vs.  o ,[object Object],[object Object],[object Object],[object Object]
Esempio: personale d’azienda personale c_f cognome indirizzo impiegato dirigente consulente dipendente stipendio sindacato p_iva compenso mansione classe Contr. Dip. (1,1) (0,n) (0,n) (1,1)
Qualità di schemi concettuali ,[object Object],[object Object],[object Object],[object Object],[object Object]
Leggibilità concettuale Doc Ric Lez Eser Doc Ric Ins Lez Eser Mod I I I I I
Leggibilità grafica A C D B A B AB BC CD AB DA D C CD BC DA
Caso di studio - soluzione
[object Object],[object Object],[object Object],[object Object],http://home.dei.polimi.it/mbrambil   http://twitter.com/MarcoBrambi http://www.slideshare.net/mbrambil

More Related Content

What's hot

Introduzione al SQL e ai database
Introduzione al SQL e ai databaseIntroduzione al SQL e ai database
Introduzione al SQL e ai databaseMaurizio Napolitano
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML نبيله نواز
 
Database Keys & Relationship
Database Keys & RelationshipDatabase Keys & Relationship
Database Keys & RelationshipBellal Hossain
 
Advantages and disadvantages of relational databases
Advantages and disadvantages of relational databasesAdvantages and disadvantages of relational databases
Advantages and disadvantages of relational databasesSanthiNivas
 
Database System Concepts and Architecture
Database System Concepts and ArchitectureDatabase System Concepts and Architecture
Database System Concepts and Architecturesontumax
 
Data Modeling Basics
Data Modeling BasicsData Modeling Basics
Data Modeling Basicsrenuindia
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxparimala123
 
Database basics
Database basicsDatabase basics
Database basicsprachin514
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Jargalsaikhan Alyeksandr
 
Power pivot intro
Power pivot introPower pivot intro
Power pivot introasantaballa
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database ModelShishir Aryal
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization TechniquesNishant Munjal
 
Importance of Normalization
Importance of NormalizationImportance of Normalization
Importance of NormalizationShwe Yee
 

What's hot (20)

"Diffrence between RDBMS, OODBMS and ORDBMS"
"Diffrence between RDBMS, OODBMS and  ORDBMS""Diffrence between RDBMS, OODBMS and  ORDBMS"
"Diffrence between RDBMS, OODBMS and ORDBMS"
 
DATABASE (Basi di dati)
DATABASE (Basi di dati)DATABASE (Basi di dati)
DATABASE (Basi di dati)
 
Introduzione al SQL e ai database
Introduzione al SQL e ai databaseIntroduzione al SQL e ai database
Introduzione al SQL e ai database
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML
 
Erd chapter 3
Erd chapter 3Erd chapter 3
Erd chapter 3
 
Database Keys & Relationship
Database Keys & RelationshipDatabase Keys & Relationship
Database Keys & Relationship
 
Advantages and disadvantages of relational databases
Advantages and disadvantages of relational databasesAdvantages and disadvantages of relational databases
Advantages and disadvantages of relational databases
 
Database System Concepts and Architecture
Database System Concepts and ArchitectureDatabase System Concepts and Architecture
Database System Concepts and Architecture
 
Data Modeling Basics
Data Modeling BasicsData Modeling Basics
Data Modeling Basics
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptx
 
Introduction to odbms
Introduction to odbmsIntroduction to odbms
Introduction to odbms
 
Database basics
Database basicsDatabase basics
Database basics
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
Power pivot intro
Power pivot introPower pivot intro
Power pivot intro
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization Techniques
 
Object oriented database
Object oriented databaseObject oriented database
Object oriented database
 
Database relazionali
Database relazionaliDatabase relazionali
Database relazionali
 
Importance of Normalization
Importance of NormalizationImportance of Normalization
Importance of Normalization
 
Extracting keywords from texts - Sanda Martincic Ipsic
Extracting keywords from texts - Sanda Martincic IpsicExtracting keywords from texts - Sanda Martincic Ipsic
Extracting keywords from texts - Sanda Martincic Ipsic
 

Viewers also liked (10)

Progettazione Concettuale Database Ospedale
Progettazione Concettuale Database OspedaleProgettazione Concettuale Database Ospedale
Progettazione Concettuale Database Ospedale
 
progettazione concettuale database
progettazione concettuale databaseprogettazione concettuale database
progettazione concettuale database
 
esempio modello concettuale
esempio modello concettualeesempio modello concettuale
esempio modello concettuale
 
MODELLO ER
MODELLO ERMODELLO ER
MODELLO ER
 
Basi di dati e gis n
Basi di dati e gis nBasi di dati e gis n
Basi di dati e gis n
 
03 Progettazione Concettuale
03  Progettazione Concettuale03  Progettazione Concettuale
03 Progettazione Concettuale
 
Progetto di Basi di Dati
Progetto di Basi di DatiProgetto di Basi di Dati
Progetto di Basi di Dati
 
Traduzione dal modello ER al relazionale
Traduzione dal modello ER al relazionaleTraduzione dal modello ER al relazionale
Traduzione dal modello ER al relazionale
 
Soluzione generalizzazioni in diagrammi ER
Soluzione generalizzazioni in diagrammi ERSoluzione generalizzazioni in diagrammi ER
Soluzione generalizzazioni in diagrammi ER
 
Database, concetti di base
Database, concetti di baseDatabase, concetti di base
Database, concetti di base
 

Similar to Progettazione concettuale per le basi di dati - Introduzione e il modello ER

Similar to Progettazione concettuale per le basi di dati - Introduzione e il modello ER (8)

Progettazione n
Progettazione nProgettazione n
Progettazione n
 
Proprietà delle relazioni dello schema concettuale
Proprietà delle relazioni dello schema concettualeProprietà delle relazioni dello schema concettuale
Proprietà delle relazioni dello schema concettuale
 
Schema Logico Database
Schema Logico DatabaseSchema Logico Database
Schema Logico Database
 
WSMO Restricted
WSMO RestrictedWSMO Restricted
WSMO Restricted
 
Wsmo Restricted
Wsmo RestrictedWsmo Restricted
Wsmo Restricted
 
LEZ_10_IntroDB.pptx
LEZ_10_IntroDB.pptxLEZ_10_IntroDB.pptx
LEZ_10_IntroDB.pptx
 
Lezione 8 - Pratica - Il diagramma E-R
Lezione 8 - Pratica - Il diagramma E-RLezione 8 - Pratica - Il diagramma E-R
Lezione 8 - Pratica - Il diagramma E-R
 
Object oriented
Object orientedObject oriented
Object oriented
 

More from Marco Brambilla

M.Sc. Thesis Topics and Proposals @ Polimi Data Science Lab - 2024 - prof. Br...
M.Sc. Thesis Topics and Proposals @ Polimi Data Science Lab - 2024 - prof. Br...M.Sc. Thesis Topics and Proposals @ Polimi Data Science Lab - 2024 - prof. Br...
M.Sc. Thesis Topics and Proposals @ Polimi Data Science Lab - 2024 - prof. Br...Marco Brambilla
 
Thesis Topics and Proposals @ Polimi Data Science Lab - 2023 - prof. Brambill...
Thesis Topics and Proposals @ Polimi Data Science Lab - 2023 - prof. Brambill...Thesis Topics and Proposals @ Polimi Data Science Lab - 2023 - prof. Brambill...
Thesis Topics and Proposals @ Polimi Data Science Lab - 2023 - prof. Brambill...Marco Brambilla
 
Hierarchical Transformers for User Semantic Similarity - ICWE 2023
Hierarchical Transformers for User Semantic Similarity - ICWE 2023Hierarchical Transformers for User Semantic Similarity - ICWE 2023
Hierarchical Transformers for User Semantic Similarity - ICWE 2023Marco Brambilla
 
Exploring the Bi-verse. A trip across the digital and physical ecospheres
Exploring the Bi-verse.A trip across the digital and physical ecospheresExploring the Bi-verse.A trip across the digital and physical ecospheres
Exploring the Bi-verse. A trip across the digital and physical ecospheresMarco Brambilla
 
Conversation graphs in Online Social Media
Conversation graphs in Online Social MediaConversation graphs in Online Social Media
Conversation graphs in Online Social MediaMarco Brambilla
 
Trigger.eu: Cocteau game for policy making - introduction and demo
Trigger.eu: Cocteau game for policy making - introduction and demoTrigger.eu: Cocteau game for policy making - introduction and demo
Trigger.eu: Cocteau game for policy making - introduction and demoMarco Brambilla
 
Generation of Realistic Navigation Paths for Web Site Testing using RNNs and ...
Generation of Realistic Navigation Paths for Web Site Testing using RNNs and ...Generation of Realistic Navigation Paths for Web Site Testing using RNNs and ...
Generation of Realistic Navigation Paths for Web Site Testing using RNNs and ...Marco Brambilla
 
Analyzing rich club behavior in open source projects
Analyzing rich club behavior in open source projectsAnalyzing rich club behavior in open source projects
Analyzing rich club behavior in open source projectsMarco Brambilla
 
Analysis of On-line Debate on Long-Running Political Phenomena. The Brexit C...
Analysis of On-line Debate on Long-Running Political Phenomena.The Brexit C...Analysis of On-line Debate on Long-Running Political Phenomena.The Brexit C...
Analysis of On-line Debate on Long-Running Political Phenomena. The Brexit C...Marco Brambilla
 
Community analysis using graph representation learning on social networks
Community analysis using graph representation learning on social networksCommunity analysis using graph representation learning on social networks
Community analysis using graph representation learning on social networksMarco Brambilla
 
Available Data Science M.Sc. Thesis Proposals
Available Data Science M.Sc. Thesis Proposals Available Data Science M.Sc. Thesis Proposals
Available Data Science M.Sc. Thesis Proposals Marco Brambilla
 
Data Cleaning for social media knowledge extraction
Data Cleaning for social media knowledge extractionData Cleaning for social media knowledge extraction
Data Cleaning for social media knowledge extractionMarco Brambilla
 
Iterative knowledge extraction from social networks. The Web Conference 2018
Iterative knowledge extraction from social networks. The Web Conference 2018Iterative knowledge extraction from social networks. The Web Conference 2018
Iterative knowledge extraction from social networks. The Web Conference 2018Marco Brambilla
 
Driving Style and Behavior Analysis based on Trip Segmentation over GPS Info...
Driving Style and Behavior Analysis based on Trip Segmentation over GPS  Info...Driving Style and Behavior Analysis based on Trip Segmentation over GPS  Info...
Driving Style and Behavior Analysis based on Trip Segmentation over GPS Info...Marco Brambilla
 
Myths and challenges in knowledge extraction and analysis from human-generate...
Myths and challenges in knowledge extraction and analysis from human-generate...Myths and challenges in knowledge extraction and analysis from human-generate...
Myths and challenges in knowledge extraction and analysis from human-generate...Marco Brambilla
 
Harvesting Knowledge from Social Networks: Extracting Typed Relationships amo...
Harvesting Knowledge from Social Networks: Extracting Typed Relationships amo...Harvesting Knowledge from Social Networks: Extracting Typed Relationships amo...
Harvesting Knowledge from Social Networks: Extracting Typed Relationships amo...Marco Brambilla
 
Model-driven Development of User Interfaces for IoT via Domain-specific Comp...
Model-driven Development of  User Interfaces for IoT via Domain-specific Comp...Model-driven Development of  User Interfaces for IoT via Domain-specific Comp...
Model-driven Development of User Interfaces for IoT via Domain-specific Comp...Marco Brambilla
 
A Model-Based Method for Seamless Web and Mobile Experience. Splash 2016 conf.
A Model-Based Method for  Seamless Web and Mobile Experience. Splash 2016 conf.A Model-Based Method for  Seamless Web and Mobile Experience. Splash 2016 conf.
A Model-Based Method for Seamless Web and Mobile Experience. Splash 2016 conf.Marco Brambilla
 
Big Data and Stream Data Analysis at Politecnico di Milano
Big Data and Stream Data Analysis at Politecnico di MilanoBig Data and Stream Data Analysis at Politecnico di Milano
Big Data and Stream Data Analysis at Politecnico di MilanoMarco Brambilla
 
Web Science. An introduction
Web Science. An introductionWeb Science. An introduction
Web Science. An introductionMarco Brambilla
 

More from Marco Brambilla (20)

M.Sc. Thesis Topics and Proposals @ Polimi Data Science Lab - 2024 - prof. Br...
M.Sc. Thesis Topics and Proposals @ Polimi Data Science Lab - 2024 - prof. Br...M.Sc. Thesis Topics and Proposals @ Polimi Data Science Lab - 2024 - prof. Br...
M.Sc. Thesis Topics and Proposals @ Polimi Data Science Lab - 2024 - prof. Br...
 
Thesis Topics and Proposals @ Polimi Data Science Lab - 2023 - prof. Brambill...
Thesis Topics and Proposals @ Polimi Data Science Lab - 2023 - prof. Brambill...Thesis Topics and Proposals @ Polimi Data Science Lab - 2023 - prof. Brambill...
Thesis Topics and Proposals @ Polimi Data Science Lab - 2023 - prof. Brambill...
 
Hierarchical Transformers for User Semantic Similarity - ICWE 2023
Hierarchical Transformers for User Semantic Similarity - ICWE 2023Hierarchical Transformers for User Semantic Similarity - ICWE 2023
Hierarchical Transformers for User Semantic Similarity - ICWE 2023
 
Exploring the Bi-verse. A trip across the digital and physical ecospheres
Exploring the Bi-verse.A trip across the digital and physical ecospheresExploring the Bi-verse.A trip across the digital and physical ecospheres
Exploring the Bi-verse. A trip across the digital and physical ecospheres
 
Conversation graphs in Online Social Media
Conversation graphs in Online Social MediaConversation graphs in Online Social Media
Conversation graphs in Online Social Media
 
Trigger.eu: Cocteau game for policy making - introduction and demo
Trigger.eu: Cocteau game for policy making - introduction and demoTrigger.eu: Cocteau game for policy making - introduction and demo
Trigger.eu: Cocteau game for policy making - introduction and demo
 
Generation of Realistic Navigation Paths for Web Site Testing using RNNs and ...
Generation of Realistic Navigation Paths for Web Site Testing using RNNs and ...Generation of Realistic Navigation Paths for Web Site Testing using RNNs and ...
Generation of Realistic Navigation Paths for Web Site Testing using RNNs and ...
 
Analyzing rich club behavior in open source projects
Analyzing rich club behavior in open source projectsAnalyzing rich club behavior in open source projects
Analyzing rich club behavior in open source projects
 
Analysis of On-line Debate on Long-Running Political Phenomena. The Brexit C...
Analysis of On-line Debate on Long-Running Political Phenomena.The Brexit C...Analysis of On-line Debate on Long-Running Political Phenomena.The Brexit C...
Analysis of On-line Debate on Long-Running Political Phenomena. The Brexit C...
 
Community analysis using graph representation learning on social networks
Community analysis using graph representation learning on social networksCommunity analysis using graph representation learning on social networks
Community analysis using graph representation learning on social networks
 
Available Data Science M.Sc. Thesis Proposals
Available Data Science M.Sc. Thesis Proposals Available Data Science M.Sc. Thesis Proposals
Available Data Science M.Sc. Thesis Proposals
 
Data Cleaning for social media knowledge extraction
Data Cleaning for social media knowledge extractionData Cleaning for social media knowledge extraction
Data Cleaning for social media knowledge extraction
 
Iterative knowledge extraction from social networks. The Web Conference 2018
Iterative knowledge extraction from social networks. The Web Conference 2018Iterative knowledge extraction from social networks. The Web Conference 2018
Iterative knowledge extraction from social networks. The Web Conference 2018
 
Driving Style and Behavior Analysis based on Trip Segmentation over GPS Info...
Driving Style and Behavior Analysis based on Trip Segmentation over GPS  Info...Driving Style and Behavior Analysis based on Trip Segmentation over GPS  Info...
Driving Style and Behavior Analysis based on Trip Segmentation over GPS Info...
 
Myths and challenges in knowledge extraction and analysis from human-generate...
Myths and challenges in knowledge extraction and analysis from human-generate...Myths and challenges in knowledge extraction and analysis from human-generate...
Myths and challenges in knowledge extraction and analysis from human-generate...
 
Harvesting Knowledge from Social Networks: Extracting Typed Relationships amo...
Harvesting Knowledge from Social Networks: Extracting Typed Relationships amo...Harvesting Knowledge from Social Networks: Extracting Typed Relationships amo...
Harvesting Knowledge from Social Networks: Extracting Typed Relationships amo...
 
Model-driven Development of User Interfaces for IoT via Domain-specific Comp...
Model-driven Development of  User Interfaces for IoT via Domain-specific Comp...Model-driven Development of  User Interfaces for IoT via Domain-specific Comp...
Model-driven Development of User Interfaces for IoT via Domain-specific Comp...
 
A Model-Based Method for Seamless Web and Mobile Experience. Splash 2016 conf.
A Model-Based Method for  Seamless Web and Mobile Experience. Splash 2016 conf.A Model-Based Method for  Seamless Web and Mobile Experience. Splash 2016 conf.
A Model-Based Method for Seamless Web and Mobile Experience. Splash 2016 conf.
 
Big Data and Stream Data Analysis at Politecnico di Milano
Big Data and Stream Data Analysis at Politecnico di MilanoBig Data and Stream Data Analysis at Politecnico di Milano
Big Data and Stream Data Analysis at Politecnico di Milano
 
Web Science. An introduction
Web Science. An introductionWeb Science. An introduction
Web Science. An introduction
 

Progettazione concettuale per le basi di dati - Introduzione e il modello ER