Identificar Las Llaves Primarias Y ForáNeas
Upcoming SlideShare
Loading in...5
×
 

Identificar Las Llaves Primarias Y ForáNeas

on

  • 1,345 views

 

Statistics

Views

Total Views
1,345
Views on SlideShare
1,345
Embed Views
0

Actions

Likes
0
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Identificar Las Llaves Primarias Y ForáNeas Identificar Las Llaves Primarias Y ForáNeas Document Transcript

  • -729615318770

    Identificar las llaves primarias y foráneas
    BLOQUE (COB, NOMBRE).
    PROYECTO (COS, NOMBRE, COB)
    ASIGNATURA (COA, NOMBRE, CREDITOS, HIT, AC, HP, COS, COP,COD,COAR,).
    FACULTAD (COF, NOMBRE).
    PROGRAMA (COP, NOMBRE, COF)
    DOCENTE (COD, NOMBRE, FECHANACIMIENTO, PREGRADO, POSTGRADO, FECHAINGRESO)
    AREA (COAR, NOMBRE)
    PRERREQUISITO_has_ASIGNATURA(COD_PRE, COA)
    PRERREQUISITO(COD_PRE, NOMBRE)
    CODIGO DDL
    CREATE TABLE " AREA"
    (" COAR" CHAR(20),
    " NOMBRE" CHAR(20),
    CONSTRAINT " AREA_PK" PRIMARY KEY (" COAR" ) ENABLE
    )
    /
    CREATE TABLE " DOCENTE"
    (" COD" CHAR(20),
    " NOMBRE" CHAR(20),
    " FECHANACIMIENTO" CHAR(20),
    " POSTGRADO" CHAR(30),
    " FECHAINGRESO" CHAR(20),
    CONSTRAINT " DOCENTE_PK" PRIMARY KEY (" COD" ) ENABLE
    )
    /
    CREATE TABLE " PROGRAMA"
    (" COP" CHAR(20),
    " NOMBRE" CHAR(20),
    CONSTRAINT " PROGRAMA_PK" PRIMARY KEY (" COP" ) ENABLE
    )
    /
    CREATE TABLE " FACULTAD"
    (" COF" CHAR(20),
    " NOMBRE" CHAR(20),
    " COP" CHAR(20),
    CONSTRAINT " FACULTAD_PK" PRIMARY KEY (" COF" ) ENABLE,
    CONSTRAINT " FACULTAD_FK" FOREIGN KEY (" COP" )
    REFERENCES " PROGRAMA" (" COP" ) ENABLE
    )
    /
    CREATE TABLE " SALON"
    (" COS" CHAR(20),
    " NOMBRE" CHAR(20),
    " COB" CHAR(20),
    CONSTRAINT " SALON_PK" PRIMARY KEY (" COS" ) ENABLE,
    CONSTRAINT " SALON_FK" FOREIGN KEY (" COB" )
    REFERENCES " BLOQUE" (" COB" ) ENABLE
    )
    /
    CREATE TABLE " ASIGNATURA"
    (" COA" CHAR(20),
    " NOMBRE" CHAR(20),
    " CREDITOS" CHAR(20),
    " HTI" CHAR(20),
    " AC" CHAR(20),
    " HP" CHAR(20),
    " COAR" CHAR(20),
    " COD" CHAR(20),
    " COF" CHAR(20),
    " COS" CHAR(20),
    CONSTRAINT " ASIGNATURA_PK" PRIMARY KEY (" COA" ) ENABLE,
    CONSTRAINT " ASIGNATURA_FK" FOREIGN KEY (" COAR" )
    REFERENCES " AREA" (" COAR" ) ENABLE,
    CONSTRAINT " ASIGNATURA_FK2" FOREIGN KEY (" COD" )
    REFERENCES " DOCENTE" (" COD" ) ENABLE,
    CONSTRAINT " ASIGNATURA_FK3" FOREIGN KEY (" COF" )
    REFERENCES " FACULTAD" (" COF" ) ENABLE,
    CONSTRAINT " ASIGNATURA_FK4" FOREIGN KEY (" COS" )
    REFERENCES " SALON" (" COS" ) ENABLE
    )
    /
    CREATE TABLE " PRERREQUISITOS"
    (" COD_PRE" NUMBER,
    " NOMBRE" CHAR(20),
    CONSTRAINT " PRERREQUISITOS_PK" PRIMARY KEY (" COD_PRE" ) ENABLE
    )
    /
    CREATE TABLE " ASIG_PRE"
    (" COA" CHAR(20),
    " COD_PRE" NUMBER,
    CONSTRAINT " ASIG_PRE_FK" FOREIGN KEY (" COA" )
    REFERENCES " ASIGNATURA" (" COA" ) ENABLE,
    CONSTRAINT " ASIG_PRE_FK2" FOREIGN KEY (" COD_PRE" )
    REFERENCES " PRERREQUISITOS" (" COD_PRE" ) ENABLE
    )
    /
    CREATE TABLE " BLOQUE"
    (" COB" CHAR(20) NOT NULL ENABLE,
    " NOMBRE" CHAR(20),
    CONSTRAINT " BLOQUE_PK" PRIMARY KEY (" COB" ) ENABLE
    )
    /
    Vista por oracle
    -1175385175260