daily pastebin goal
36%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. BANDO-CONCORSO 1-N
  2. COMMISSIONE-CONCORSO 1-N
  3. CONCORSO-PROVA 1-N
  4. CANDIDATO-PROVA N-N  HASOSTENUTO
  5. CONCORSO-CANDIDATO N-N FADOMANDA
  6. COMMISSIONE-COMMISSARIO 1-N
  7.  
  8. <CREATE TABLE> Bando(
  9.     CodBando INT(6) NOTNULL;
  10.     DataPub  INT(8);
  11.     DataScad INT(8);
  12.     PRIMARY KEY CodBando;
  13.     ON DELETE RESTRICT;
  14.     ON UPDATE RESTRICT;
  15. )
  16.  
  17. <CREATE TABLE> Concorso(
  18.     CodConc INT(6) NOTNULL;
  19.     DataConc INT(8);
  20.     NumVinc INT(4);
  21.     PRIMARY KEY CodConc;
  22.     FOREIGN KEY CodBando REFERENCES Bando(CodBando);
  23.     FOREIGN KEY CodCommis REFERENCES Commissione(CodCommis);
  24.     ON DELETE RESTRICT;
  25.     ON UPDATE RESTRICT;
  26. )
  27.  
  28. <CREATE TABLE> Commissione(
  29.     CodCommis INT(6) NOTNULL;
  30.     PRIMARY KEY CodCommis;
  31.     ON DELETE RESTRICT;
  32.     ON UPDATE RESTRICT;
  33. )
  34.  
  35. <CREATE TABLE> Commissario(
  36.     CodMembro INT(6) NOTNULL;
  37.     NomeCommissario CHAR(20);
  38.     CognomeCommissario CHAR(20);
  39.     CodiceFiscaleCommissario CHAR(16);
  40.     TelefonoCommissario INT(10);
  41.     Qualifica CHAR(30);
  42.     Indirizzo CHAR(30);
  43.     PRIMARY KEY CodMembro;
  44.     FOREIGN KEY CodCommis REFERENCES Commissione(CodCommis);
  45.     ON DELETE RESTRICT;
  46.     ON UPDATE RESTRICT;
  47. )
  48.  
  49. <CREATE TABLE> Prova(
  50.     CodPro INT(6) NOTNULL;
  51.     DataProva INT(8);
  52.     PuntiMax INT(3) CHECK (PuntiMax BETWEEN 0 AND 100);
  53.     PRIMARY KEY CodPro;
  54.     FOREIGN KEY CodConc REFERENCES Commissione(CodCommis);
  55.     ON DELETE RESTRICT;
  56.     ON UPDATE RESTRICT;
  57. )
  58.  
  59. <CREATE TABLE> Candidato(
  60.     CodCand INT(6) NOTNULL;
  61.     Nome CHAR(20);
  62.     Cognome CHAR(20);
  63.     CodiceFiscale CHAR(16);
  64.     PRIMARY KEY CodCand;
  65.     ON DELETE RESTRICT;
  66.     ON UPDATE RESTRICT;
  67. )
  68.  
  69. <CREATE TABLE> HaSostenuto(
  70.     PuntiProva INT(3) CHECK (PuntiProva) BETWEEN 0 AND 100;
  71.     FOREIGN KEY CodPro REFERENCES Prova(CodPro);
  72.     FOREIGN KEY CodCand REFERENCES Candidato(CodCand);
  73. )
  74.  
  75. <CREATE TABLE> FaDomanda(
  76.     FOREIGN KEY CodConc REFERENCES Concorso(CodConc);
  77.     FOREIGN KEY CodCand REFERENCES Candidato(CodCand);
  78. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top