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 (20)

Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMS
 
Stacks and Queue - Data Structures
Stacks and Queue - Data StructuresStacks and Queue - Data Structures
Stacks and Queue - Data Structures
 
Lab2 ddl commands
Lab2 ddl commandsLab2 ddl commands
Lab2 ddl commands
 
File organization
File organizationFile organization
File organization
 
STACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data StructureSTACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data Structure
 
Null / Not Null value
Null / Not Null valueNull / Not Null value
Null / Not Null value
 
Dbms keys
Dbms keysDbms keys
Dbms keys
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
 
SAP BW - Data store objects
SAP BW - Data store objectsSAP BW - Data store objects
SAP BW - Data store objects
 
Sap Adobe Form
Sap Adobe FormSap Adobe Form
Sap Adobe Form
 
joins in database
 joins in database joins in database
joins in database
 
Stack - Data Structure
Stack - Data StructureStack - Data Structure
Stack - Data Structure
 
normaliztion
normaliztionnormaliztion
normaliztion
 
Index in SAP ABAP
Index in SAP ABAPIndex in SAP ABAP
Index in SAP ABAP
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Stack of Data structure
Stack of Data structureStack of Data structure
Stack of Data structure
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts
 
ABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection ScreenABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection Screen
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionary
 
Abap dictionary 1
Abap dictionary 1Abap dictionary 1
Abap dictionary 1
 

Viewers also liked (13)

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
 
DATABASE (Basi di dati)
DATABASE (Basi di dati)DATABASE (Basi di dati)
DATABASE (Basi di dati)
 
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
 
Basi di Dati - A1 - Introduzione alle basi di dati
Basi di Dati - A1 - Introduzione alle basi di datiBasi di Dati - A1 - Introduzione alle basi di dati
Basi di Dati - A1 - Introduzione alle basi di dati
 
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
 
Database introduzione
Database introduzioneDatabase introduzione
Database introduzione
 

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 (9)

Progettazione n
Progettazione nProgettazione n
Progettazione n
 
Progettazione di un database relazionale
Progettazione di un database relazionaleProgettazione di un database relazionale
Progettazione di un database relazionale
 
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