Advertisement
adventuretimeh

aereoporto.sql

Jul 6th, 2022
3,936
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 1.35 KB | None | 0 0
  1. DATABASE: `aereoporti`
  2. --
  3.  
  4. -- --------------------------------------------------------
  5.  
  6. --
  7. -- Struttura della tabella `aereo`
  8. --
  9.  
  10. CREATE TABLE `aereo` (
  11.   `tipoaereo` CHAR(255) NOT NULL,
  12.   `numeropassegerei` CHAR(255) NOT NULL,
  13.   `quotamerci` INT(10) NOT NULL
  14. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  15.  
  16. -- --------------------------------------------------------
  17.  
  18. --
  19. -- Struttura della tabella `aereopoto`
  20. --
  21.  
  22. CREATE TABLE `aereopoto` (
  23.   `città` CHAR(255) NOT NULL,
  24.   `nazione` CHAR(255) NOT NULL,
  25.   `numeroospite` INT(10) NOT NULL
  26. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  27.  
  28. -- --------------------------------------------------------
  29.  
  30. --
  31. -- Struttura della tabella `volo`
  32. --
  33.  
  34. CREATE TABLE `volo` (
  35.   `idvolo` INT(55) NOT NULL,
  36.   `giornosettimana` CHAR(255) NOT NULL,
  37.   `cittapartenza` CHAR(255) NOT NULL,
  38.   `orariopartenza` CHAR(255) NOT NULL,
  39.   `cittaarrivo` CHAR(255) NOT NULL,
  40.   `orarioarrivo` CHAR(255) NOT NULL,
  41.   `tipoaereo` CHAR(255) NOT NULL
  42. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  43.  
  44. --
  45. -- Indici per le tabelle scaricate
  46. --
  47.  
  48. --
  49. -- Indici per le tabelle `aereo`
  50. --
  51. ALTER TABLE `aereo`
  52.   ADD PRIMARY KEY (`tipoaereo`);
  53.  
  54. --
  55. -- Indici per le tabelle `aereopoto`
  56. --
  57. ALTER TABLE `aereopoto`
  58.   ADD PRIMARY KEY (`città`);
  59.  
  60. --
  61. -- Indici per le tabelle `volo`
  62. --
  63. ALTER TABLE `volo`
  64.   ADD PRIMARY KEY (`idvolo`);
  65. COMMIT;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement