1 / 50

INFORMATICA UMANISTICA B

INFORMATICA UMANISTICA B. STRUTTURE DATI BASI DI DATI RAPPRESENTAZIONE DELLA CONOSCENZA ONTOLOGIE. VARIABILI SCALARI O ATOMICHE. function MCD(M,N) while M ≠ N if M > N then M  M - N else N  N - M return M. RAPPRESENTAZIONE DELLE INFORMAZIONI IN PROGRAMMI.

livvy
Download Presentation

INFORMATICA UMANISTICA B

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. INFORMATICA UMANISTICA B STRUTTURE DATI BASI DI DATI RAPPRESENTAZIONE DELLA CONOSCENZA ONTOLOGIE

  2. VARIABILI SCALARI O ATOMICHE function MCD(M,N) while M ≠ N if M > N then M  M - N else N  N - M return M

  3. RAPPRESENTAZIONE DELLE INFORMAZIONI IN PROGRAMMI • La lezione precedente si sono visti solo esempi di variabili che assumono valori ATOMICI (numeri, simboli) • Molti programmi trattano pero’ informazioni con una struttura piu’ complessa : • Dati sulle immagini da rappresentare sullo schermo • Tabelle degli orari

  4. INFORMAZIONI DA VISUALIZZARE SULLO SCHERMO

  5. ORARI

  6. TABELLE • Ambedue gli esempi appena visti sono esempi di informazione con struttura TABULARE • Le TABELLE sono una delle strutture dati usate piu’ comunemente in informatica

  7. PROGETTAZIONE DI STRUTTURE DATI • Identificare la struttura dati piu’ appropriata per rappresentare un certo tipo di informazioni all’interno di un programma e’ uno dei problemi centrali dell’informatica

  8. TIPI DI STRUTTURE DATI • Temporanee: • Tabelle • Records • Alberi • Permanenti: database

  9. VETTORI E TABELLE • I vettori sono strutture dati che permettono di manipolare sequenze di oggetti dello stesso tipo • Le tabelle permettono di creare spazi multidimensionali • In ambedue i casi, i dati vengono ritrovati tramite INDICI

  10. tabella[i,j] VETTORI E TABELLE

  11. ALBERI • Una delle strutture dati piu’ usate sono gli ALBERI • Vengono usati, per esempio, • Per rappresentare la struttura di un documento HTML / XML • Per rappresentare l’analisi sintattica di un enunciato

  12. LA STRUTTURA AD ALBERO DEI DOCUMENTI HTML (ED XML) <html> <head> <title> My first HTML</title> </head> <body> <p> Hello, World! </p> </body> </html>

  13. LA STRUTTURA AD ALBERO DEI DOCUMENTI HTML html head body title p

  14. LA STRUTTURA AD ALBERO DEGLI ENUNCIATI

  15. html figlie madre head body title p ACCESSO AD UN ALBERO

  16. RECORDS • I records sono strutture dati usate per rappresentare oggetti che hanno ATTRIBUTI

  17. esame.materia ESEMPIO: ESAME ESAME

  18. RECORDS IN XML <poem title=“paradise lost” author="jm" year="1667"> <verse> Seest thou yon dreary Plain, forlorn and wild,</verse> <verse>The seat of desolation, void of light,</verse> <verse>Save what the glimmering of these livid flames</verse> <verse>Casts pale and dreadful?</verse> </poem> TITLE: Paradise Lost AUTHOR: John Milton YEAR: 1667

  19. STRUTTURE DATI MISTE: ALBERI + RECORDS IN XML poemtitle = Paradise Lostauthor = jmauthor= 1667 verse verse verse Seest thou yon dreary Plain, forlorn and wild,

  20. ALTRE STRUTTURE DATI • Liste • Tabelle ‘hash’

  21. STRUTTURE DATI TEMPORANEE E PERMANENTI • Per potere rappresentare informazioni in modo duraturo occorre sviluppare delle tecniche per mantenerle in memoria secondaria • Lo strumento informatico utilizzato per questo scopo sono le BASI DI DATI

  22. BASI DI DATI • Un database e’ una collezione di dati immagazzinati in modo PERMANENTE su disco • ACCESS e’ uno strumento che permette di creare basi di dati

  23. TABELLE E RELAZIONI • L’informazione e’ rappresentata nelle basi di dati sotto forma di TABELLE e RELAZIONI

  24. ESEMPIO: SINGOLA TABELLA

  25. RITROVAMENTO INFORMAZIONI • Le informazioni in una base di dati possono essere ritrovate mediante INTERROGAZIONI

  26. INTERROGAZIONE SELECT Materia, Data, Matricola FROM Esami;

  27. RELAZIONI TRA TABELLE

  28. CREARE UNA BASE DI DATI IN ACCESS • Creare le tabelle usando ‘Create Table in Design View’ • Salvare • Cambiare a Datasheet view per inserire i dati • Continuare a creare altre tabelle • Linkare le tabelle

  29. 1. TABLE DESIGN VIEW

  30. 1. TABLE DESIGN VIEW

  31. 2. DATASHEET VIEW

  32. RITROVARE LE INFORMAZIONI • Standard linguaggio di interrogazione per database relazionali: SQL

  33. SINTASSI DI SQL • Diversi tipi di comandi: • INTERROGAZIONE • UPDATE • Comando di interrogazione: SELECT • Clausole piu’ usate: • FROM (specifica la tabella) • WHERE (specifica restrizioni)

  34. SQL: Esempio base SELECT isbn, title, price FROM books WHERE price > 100.00 ORDER BY title;

  35. INTERROGAZIONI CHE COINVOLGONO PIU’ TABELLE

  36. AGGIUNGERE TABELLE

  37. INTERROGAZIONE A TABELLE MULTIPLE

  38. SQL VIEW

  39. SQL: ESEMPIO DI INTERROGAZIONE DA TABELLE LINKATE SELECT Studenti.Nome, Studenti.Cognome FROM Studenti INNER JOIN Esami ON Studenti.Matricola=Esami.Matricola WHERE Esami.Materia='IUB' And Esami.Voto>25;

  40. RAPPRESENTAZIONE DELLA CONOSCENZA ED ONTOLOGIE • La ricerca sul modo ‘ideale’ per rappresentare le informazioni ha portato alla nascita di ricerca sulla KNOWLEDGE ENGINEERING o rappresentazione della conoscenza anche in senso non applicato • Particolarmente interessante per domini piu’ complessi che ‘studenti’ e gli ‘esami’? • L’area della KNOWLEDGE ENGINEERING raggruppa ricercatori da database, Intelligenza Artificiale, e nell’area del Semantic Web • Un area molto legata allo studio delle ONTOLOGIE

  41. ONTOLOGIE IN INFORMATICA In FILOSOFIA, ONTOLOGIA e’ lo studio di cio’ che esiste – una delle aree piu’ importanti della METAFISICA In INFORMATICA, un’ ONTOLOGIA e’ una DEFINIZIONE dei TERMINI usati in un certo dominio e delle relazioni tra di loro

  42. Disegno di ontologie • Identificazione dei CONCETTI • Identificazione dei loro ATTRIBUTI • Identificazione delle relazioni di dipendenza tra questi concetti

  43. ONTOLOGIA APPLICATA • La ricerca sulle ontologie e’ al momento molto attiva nelle aree • Scientifiche • Semantic Web

  44. UN ESEMPIO DI ONTOLOGIA SCIENTIFICA • Protein Ontology: un’ontologia sviluppata per codificare la nostra conoscenza sulle proteine in modo sistematico • http://proteinontology.info/

  45. SEMANTIC WEB • Il Semantic Web e’ un progetto per realizzare una versione del Web in cui i testi sono annotati SEMANTICAMENTE e quindi e’ possibile ritrovarli sulla base del CONTENUTO invece che di keywords

  46. INGREDIENTI DEL SEMANTIC WEB • XML come linguaggio di markup • RDF per la rappresentazione di informazioni • OWL (Web Ontology Language) per rappresentare concetti, attributi, e relazioni • Una o piu’ ontologie

  47. OWL <owl:Class rdf:ID="ProteinComplex"> <owl:disjointWith> <owl:Class rdf:ID="SiteGroup"/> </owl:disjointWith> <owl:disjointWith> <owl:Class rdf:about="#Chains"/> </owl:disjointWith> <owl:disjointWith> <owl:Class rdf:about="#Residues"/> </owl:disjointWith>

  48. Ontologie ‘generali’ ed ontologie ‘di dominio’ • Esistono ora molte ontologie per domini specifici • Esistono anche tentativi di ‘riunificare’ queste ontologie tramite cosiddette ‘ontologie di livello superiore’ • SUMO • DOLCE

  49. ESEMPIO DI ONTOLOGIA USATA IN AI (SUMO)

  50. LETTURE • Strutture dati: Wikipedia • http://it.wikipedia.org/wiki/Struttura_dati • ACCESS: http://office.microsoft.com/ • Ontologie: • http://www.ontologyportal.org/ • http://www.loa-cnr.it/ • Semantic Web: • http://www.sciam.com/article.cfm?articleID=00048144-10D2-1C70-84A9809EC588EF21

More Related