Taller De Refuerzo. Llaves Primarias Y ForáNeas

  • 564 views
Uploaded on

 

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
564
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. JAVIER HUMBERTO CARDENAS DUQUE
    COD:2307016
    BASES DE DATOS

    Identificar las llaves primarias y foráneas
    BLOQUE(Cob,Nombre)
    SALON(Cos,Nombre, BLOQUE_ Cob)
    ASIGNATURA(Coa,Nombre,Creditos,Hti,Ac, SALON_ Cos,AREA_Coar,PROGRAMA_Cop,DOCENTE_Cod)
    AREA(Coar,Nombre)
    DOCENTE(Cod,Nombre,FechaNacimiento,Pregrado,Postgrado,FechaIngreso)
    PROGRAMA(Cop,Nombre,FACULTAD_Cof)
    FACULTAD(Cof,Nombre)
    PREREQUISISTOS(Copre,Nombreasignatura)
    ASIGNATURA_has_ PREREQUISISTOS (ASIGNATURA_ Coa, PREREQUISISTOS_ Copre)
    CODIGO DE PROGRAMA:
    CREATE TABLE " AREA"
    (" COAR" NUMBER NOT NULL ENABLE,
    " NOMBRE" CHAR(35) NOT NULL ENABLE,
    CONSTRAINT " AREA_PK" PRIMARY KEY (" COAR" ) ENABLE
    )
    /
    CREATE TABLE " DOCENTE"
    (" COD" NUMBER NOT NULL ENABLE,
    " NOMBRE" CHAR(60),
    " FECHANACIMIENTO" CHAR(20),
    " PREGRADO" CHAR(100),
    " POSTGRADO" CHAR(100),
    " FECHAINGRESO" CHAR(20),
    CONSTRAINT " DOCENTE_PK" PRIMARY KEY (" COD" ) ENABLE
    )
    /
    CREATE TABLE " PROGRAMA"
    (" COP" NUMBER NOT NULL ENABLE,
    " NOMBRE" CHAR(60),
    " FACULTAD_COF" NUMBER,
    CONSTRAINT " PROGRAMA_PK" PRIMARY KEY (" COP" ) ENABLE,
    CONSTRAINT " PROGRAMA_FK" FOREIGN KEY (" FACULTAD_COF" )
    REFERENCES " FACULTAD" (" COF" ) ENABLE
    )
    /
    CREATE TABLE " SALON"
    (" COS" NUMBER NOT NULL ENABLE,
    " NOMBRE" CHAR(20) NOT NULL ENABLE,
    " BLOQUE_COB" NUMBER,
    CONSTRAINT " SALON_PK" PRIMARY KEY (" COS" ) ENABLE,
    CONSTRAINT " SALON_FK" FOREIGN KEY (" BLOQUE_COB" )
    REFERENCES " BLOQUE" (" COB" ) ENABLE
    )
    /
    CREATE TABLE " ASIGNATURAS"
    (" COA" NUMBER NOT NULL ENABLE,
    " NOMBRE" CHAR(30) NOT NULL ENABLE,
    " CREDITOS" CHAR(20) NOT NULL ENABLE,
    " HTI" CHAR(1) NOT NULL ENABLE,
    " AC" CHAR(1) NOT NULL ENABLE,
    " AREA_COAR" NUMBER,
    " DOCENTE_COD" NUMBER,
    " PROGRAMA_COP" NUMBER,
    " SALON_COS" NUMBER,
    CONSTRAINT " ASIGNATURAS_PK" PRIMARY KEY (" COA" ) ENABLE,
    CONSTRAINT " ASIGNATURAS_FK" FOREIGN KEY (" AREA_COAR" )
    REFERENCES " AREA" (" COAR" ) ENABLE,
    CONSTRAINT " AREA_FK2" FOREIGN KEY (" DOCENTE_COD" )
    REFERENCES " DOCENTE" (" COD" ) ENABLE,
    CONSTRAINT " AREA_FK3" FOREIGN KEY (" PROGRAMA_COP" )
    REFERENCES " PROGRAMA" (" COP" ) ENABLE,
    CONSTRAINT " AREA_FK4" FOREIGN KEY (" SALON_COS" )
    REFERENCES " SALON" (" COS" ) ENABLE
    )
    /
    CREATE TABLE " PREREQUISITOS"
    (" COPRE" NUMBER NOT NULL ENABLE,
    " NOMBREASIGNATURA" CHAR(30) NOT NULL ENABLE,
    CONSTRAINT " PREREQUISITOS_PK" PRIMARY KEY (" COPRE" ) ENABLE
    )
    /
    CREATE TABLE " ASIG_PRE"
    (" ASIGNATURAS_COA" NUMBER,
    " PREREQUISITOS_COPRE" NUMBER,
    CONSTRAINT " ASIG_PRE_FK" FOREIGN KEY (" ASIGNATURAS_COA" )
    REFERENCES " ASIGNATURAS" (" COA" ) ENABLE,
    CONSTRAINT " PREREQUISITOS_FK2" FOREIGN KEY (" PREREQUISITOS_COPRE" )
    REFERENCES " PREREQUISITOS" (" COPRE" ) ENABLE
    )
    /
    CREATE TABLE " BLOQUE"
    (" COB" NUMBER NOT NULL ENABLE,
    " NOMBRE" CHAR(20),
    CONSTRAINT " BLOQUE_PK" PRIMARY KEY (" COB" ) ENABLE
    )
    /
    CREATE TABLE " FACULTAD"
    (" COF" NUMBER NOT NULL ENABLE,
    " NOMBRE" CHAR(30),
    CONSTRAINT " FACULTAD_PK" PRIMARY KEY (" COF" ) ENABLE
    )
    /