1 / 8

Progettazione di una base di dati

Abilità Informatiche Avanzate CdL Magistrali. Progettazione di una base di dati.

ansel
Télécharger la présentation

Progettazione di una base di dati

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. Abilità Informatiche AvanzateCdL Magistrali Progettazione di una base di dati

  2. Il proprietario da la possibilità ai suoi amici di prendere in prestito i suoi libri. Nella biblioteca non ci sono “doppioni”. Ogni amico potrà prendere in prestito “N” libri e contemporaneamente ogni libro potrà essere letto da “N” amici. Essendo una relazione di tipo N:N sarà necessario introdurre una terza entità che sia correlata alle altre (AMICI e LIBRI) con relazioni N:1.

  3. Schema entità relazioni LIBRI AMICI N:N N:1 N:1 LIBRO IN RIENTRO • Entità: • AMICI • LIBRI • LIBRO IN PRESTITO

  4. Progettazione concettuale • Attributi AMICI: • Soprannome: soprannome dell’amico, per evitare omonimie • Nome cognome: nomi degli amici che usufruiscono della biblioteca • Attributi LIBRI: • Id_libro: codice univoco di Libri • Titolo: titolo dei libri prestati • Attributi LIBRO IN RIENTRO: • Id_prestito: codice univoco di Prestiti • Data_rientro.: data di restituzione del libro • Soprannome: foreign key • Id_libro: foreign key

  5. DEFINIZIONE DELLE CARATTERISTICHE DEGLI ATTRIBUTI Tabella AMICI Tabella LIBRI Tabella PRESTITI

  6. ESEMPIO ESEMPIO LIBRI AMICI LIBRO IN RIENTRO

  7. Secondo punto

  8. SECONDO PUNTO 1. le chiavi primarie e le chiavi esterne sonoPAZIENTI (Cod)REPARTI(Cod)entrambe chiavi esterne in RICOVERIMEDICI(Matr)2. Vincoli referenziali: le chiavi esterne non possono essere nulle altrimenti le tabelle non potrebbero essere collegate tra loro3. Campi che possiamo ammettere nulli:tutti tranne le chiavi primarie e le chiavi esterne.

More Related