CREATE TABLE `ADRESSE`(
`URL` varchar( 50 ) NOT NULL ,
`TYPEURL` varchar( 50 ) ,
PRIMARY KEY ( `URL` )
);
CREATE TABLE `UTILISATEUR`(
`NOMUTILISATEUR` varchar( 30 ) NOT NULL ,
`NOMDOMAINE` varchar( 30 ) ,
`QUOTASTELECHARGE` decimal,
PRIMARY KEY ( `NOMUTILISATEUR` )
);
CREATE TABLE `POSTE`(
`ADRESSEIPCLIENT` varchar( 12 ) NOT NULL ,
`NOMDUPOSTE` varchar( 30 ) ,
PRIMARY KEY ( `ADRESSEIPCLIENT` )
);
CREATE TABLE `CONNECTER` (
`URL` VARCHAR( 50 ) NOT NULL ,
`DATECONNEXION` DATE NOT NULL ,
`ADRESSEIPCLIENT` VARCHAR( 12 ) NOT NULL ,
`NOMUTILISATEUR` VARCHAR( 50 ) NOT NULL ,
`DATEHEURECONNEXION` DATETIME NOT NULL ,
`DEBUTCONNEXION` DATETIME NOT NULL ,
`FINCONNEXION` DATETIME NOT NULL ,
`TAILLE` DECIMAL NOT NULL ,
`METHODETRANSFERT` VARCHAR( 50 ) NOT NULL ,
`CACHERESULTAT` VARCHAR( 30 ) NOT NULL ,
`CACHEHTTP` VARCHAR( 30 ) NOT NULL ,
`ADRESSEIPSERVEUR` VARCHAR( 12 ) NOT NULL ,
`STATUSECHANGESERVEUR` VARCHAR( 30 ) NOT NULL ,
CONSTRAINT `PK_CONNECTER` PRIMARY KEY ( `URL` , `DATECONNEXION` , `ADRESSEIPCLIENT` , `NOMUTILISATEUR` , `DATEHEURECONNEXION` )
CONSTRAINT `FK_CONNECTER` FOREIGN KEY (`URL`) REFERENCES `ADRESSE` (`URL`)
CONSTRAINT `FK_CONNECTER2` FOREIGN KEY (`NOMUTILISATEUR`) REFERENCES `UTILISATEUR` (`NOMUTILISATEUR`)
CONSTRAINT `FK_CONNECTER3` FOREIGN KEY (`ADRESSEIPCLIENT`) REFERENCES `POSTE` (`ADRESSEIPCLIENT`)
);
Partager