create table Velisti
(
Codice varchar(5) PRIMARY KEY,
Cognome varchar(20) NOT NULL,
Nome varchar(20) NOT NULL,
Eta integer NOT NULL check (eta>=0),
Brevetto bit default 0,
Bonus decimal(6,2)
)

Insert into Velisti values('ve001','Traverso', 'Marina',22,1,1000);
Insert into Velisti values('ve002','Rosso', 'Mario',25,1,2000);
Insert into Velisti values('ve003','Velli', 'Antonio',15,0,240);
Insert into Velisti values('ve004','Caruso', 'Sara',17,1,100);
Insert into Velisti values('ve005','Cinelli', 'Aldo',38,0,500);
Insert into Velisti values('ve006','Rinaldi', 'Mauro',35,0,200);
Insert into Velisti values('ve007','DePalma', 'Alma',30,1,1200);
Insert into Velisti values('ve008','Derossi', 'Renzo',17,1,500);
Insert into Velisti values('ve009','Renzo', 'Lucia',16,0,200);
Insert into Velisti values('ve010','Porta', 'Paolo',45,1,1200);

Create table Barche
(
Targa varchar(6) PRIMARY KEY,
Nome varchar(20) NOT NULL,
Colore varchar(10) NOT NULL,
Categoria varchar(6) NOT NULL check( categoria in ('deriva', 'altura'))default 'deriva'
)


Insert into Barche values('ge2244','Nautilus', 'Blu','deriva');
Insert into Barche values('ge1666','Freccia del mare', 'Verde','deriva');
Insert into Barche values('ve0010','Uragano', 'Grigio','altura');
Insert into Barche values('ve0040','Buona speranza', 'Nero','altura');
Insert into Barche values('pi0050','Hawaii', 'Giallo','deriva');

