Proyecto: asa fase: diseño físico (código sql generado automáticamente por versión: db-main)
0.1 10/04/2008
CODIGO SQL
CONTACTO LOCAL
createtable contacto_local ( ID_cont_loc char(20) not null, nombr char(20) not null, apell_s char(30) not null, tfno char(20), email char(30));
Primary identifier (IDContacto Local) alter tablecontacto_local add constraint N_contacto_local_IDContac_PRIM primary key (ID_cont_loc);
At-least-one (GRcontacto_local) alter table contacto_local add constraint C_contacto_local_GRcontac_ATLO check(tfno is not null or email is not null);
create or replace trigger T_con_ID__STABLE_AUR after update of ID_cont_loc on contacto_local for each row when (new.ID_cont_loc old.ID_cont_loc andold.ID_cont_loc is not null) begin raise_application_error(-20003,'Violation of stable attribute constraint') ; end;
PROYECTO
create table proyecto ( ID_proy char(100) not null, nombr char(100) not null,, descr char(300) not null, fech_solic date not null, durac char(50) not null,
Proyecto: ASA Fase: Diseño físico (código SQL generado automáticamente por Versión: DB-Main) Autor: Miriam Domingoy Nacho González Fecha:
0.1 10/04/2008
benef char(100) not null, final char(200) not null, tipo_proy char(100) not null, aport_contr float(20) not null, pres char(100) not null); create tableproyecto_aprobado ( fech_aprob date not null, presup_ASA float(5) not null);
Primary identifier (IDProyecto) alter table proyecto add constraint N_proyecto_IDProyecto_PRIM primary key (ID_proy);create or replace trigger T_pro_ID__STABLE_AUR after update of ID_proy on proyecto for each row when (new.ID_proy old.ID_proy and old.ID_proy is not null) beginraise_application_error(-20003,'Violation of stable attribute constraint') ; end;
ASOCIACIÓN
create table asociacion ( ID_asoc char(20) not null, nombr char(20) not null, tfno char(20), email char(30));
Primary identifier...
Regístrate para leer el documento completo.