Bievenido

Bienvenido al Blog de Herman Aguilar!!!

Dedicado a compartir material para los alumnos de UJAT-DAIS

viernes, 8 de abril de 2016

Script para municipios y estados

create table ESTADOS
(
  ESTADO_ID NUMBER(10) not null,
  NOMBRE    VARCHAR2(100) not null
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
alter table ESTADOS
  add constraint ESTADOS_PK primary key (ESTADO_ID)
  using index
  tablespace USERS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );

prompt Creating MUNICIPIOS...
create table MUNICIPIOS
(
  MUNICIPIO_ID NUMBER(10) not null,
  NOMBRE       VARCHAR2(100) not null,
  ESTADO_ID    NUMBER(10) not null
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
alter table MUNICIPIOS
  add constraint MUNICIPIOS_PK primary key (MUNICIPIO_ID)
  using index
  tablespace USERS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
alter table MUNICIPIOS
  add constraint MUNICIPIOS_ESTADOS_FK foreign key (ESTADO_ID)

  references ESTADOS (ESTADO_ID);

Modelo de Ventas

Carpeta de Modelo de Ventas