Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table Istruttore(CodFisc char(16) not null primary key,
- Nome char(20) not null,
- Cognome char(20) not null,
- DataNascita datetime not null,
- Email char(20),
- Telefono char(15) default null unique);
- create table corsi(CodC char(5) not null primary key,
- Nome char(50) not null,
- Tipo char(20),
- Livello smallint check(Livello>0));
- create table Programma(CodFisc char(16) not null,
- Giorno char(10) not null,
- OraInizio time not null,
- Durata smallint not null check(Durata>0),
- Codc char(5) not null,
- Sala char(2) not null,
- primary key(CodFisc,Giorno,OraInizio),
- foreign key(CodFisc) references istruttore
- on delete cascade
- on update cascade,
- foreign key(CodC) references corsi
- on delete cascade
- on update cascade);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement