Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 9aa4c196 rédigé par Nils MOREAU--THOMAS's avatar Nils MOREAU--THOMAS :skull:
Parcourir les fichiers

maj

parent 884b0083
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Fichier ajouté
//dep 53 pour moi
//EX0
//1
create table CommuneMA as (select *
from basetd.commune co where co.code_insee like '53%');
create table OperateurMA as (select *
from basetd.operateur o
where o.generation like '4G' or o.generation like '5G';
create table DistributionMA as (select *
from basetd.distribution di
where di.code_insee in(select code_insee
from CommuneMA)and di.numfo in (select numfo from OperateurMA));
alter table CommuneMA add constraint pk_commune
primary key(code_insee);
alter table OperateurMA add constraint pk_operateur
primary key(numfo);
alter table DistributionMA add constraint pk_distribution
primary key(ID);
alter table DistributionMA add constraint fk_distribution1
foreign key(code_insee) references CommuneMA(code_insee);
alter table DistributionMA add constraint fk_distribution2
foreign key(numfo) references OperateurMA(numfo);
//EX1
//1
grant select on CommuneMA to s2c11b;
grant select on OperateurMA to s2c11b;
grant select on DistributionMA to s2c11b;
grant select on CommuneMA to s2c13b;
grant select on OperateurMA to s2c13b;
grant select on DistributionMA to s2c13b;
//2
grant update (adresse) on DistributionMA to s2c11b;
grant update (adresse) on DistributionMA to s2c13b;
//3
grant insert on DistributionMA to s2c11b;
grant insert on DistributionMA to s2c13b;
//4
revoke insert,select on DistributionMA from s2c13b;
revoke insert,select on DistributionMA from s2c11b;
revoke select on OperateurMA from s2c13b;
revoke select on OperateurMA from s2c11b;
revoke select on CommuneMA from s2c13b;
revoke select on CommuneMA from s2c11b;
,E221936K,U-INF-J-E113-17.ad.iut-nantes.univ-nantes.prive,14.03.2023 11:12,file:///home/E221936K/.config/libreoffice/4;
\ No newline at end of file
,E221936K,U-INF-J-E113-17.ad.iut-nantes.univ-nantes.prive,14.03.2023 11:12,file:///home/E221936K/.config/libreoffice/4;
\ No newline at end of file
CLI_CHOIX,ENT_ID,CLI_ANNEE,ENT_PRIX
1,1,1,11634000
1,1,2,12369500
2,2,1,9895500
2,2,2,15448500
3,3,1,15974600
3,3,2,8860400
4,4,1,12822000
4,4,2,11107900
5,5,1,4248300
5,5,2,11472900
Ce diff est replié.
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter