Está en la página 1de 6

UNIVERSIDAD NACIONAL JOSÉ FAUSTINO SÁNCHEZ

CARRIÓN

FACULTAD DE INGENIERÍA INDUSTRIAL, SISTEMAS E INFORMÁTICA

ESCUELA ACADÉMICO PROFESIONAL DE INGENIERÍA DE SISTEMAS

Implementación y Gestión de Base de Datos

Modulo I

Estudiante:

DE LA CRUZ MORENO, Hugo Adrián

Docente:

Ing. RIOS HERRERA, Josue Joel

Huacho – Perú

2023
DIAGRAMA CONCEPTUAL

MODELO LOGICO
DIAGRAMA SQL SERVER
CODIGO SQL SERVER
CREATE DATABASE COLEGIO;
USE COLEGIO;

CREATE TABLE DEPARTAMENTOADMINISTRATIVO(


codigo int primary key,
nomb_dep_adm varchar(30) not null,
codigo_ESTUDIANTE INT not null,
codigo_TUTOR INT not null,
codigo_ESCUELAPROFESIONAL INT not null,
foreign key (codigo_ESTUDIANTE) references ESTUDIANTE(codigo),
foreign key (codigo_TUTOR) references TUTOR(codigo),
foreign key (codigo_ESCUELAPROFESIONAL) references ESCUELAPROFESIONAL(codigo)
);

CREATE TABLE REGISTROACADEMICO(


codigo int primary key,
fech_reg_aca date not null,
nota_reg_aca char(20) not null,
codigo_ESTUDIANTE INT not null,
codigo_ESCUELAPROFESIONAL INT not null,
foreign key (codigo_ESTUDIANTE) references ESTUDIANTE(codigo),
foreign key (codigo_ESCUELAPROFESIONAL) references ESCUELAPROFESIONAL(codigo)
);

CREATE TABLE ESCUELAPROFESIONAL(


codigo int primary key,
nomb_esc varchar(30) not null,
);
CREATE TABLE KARDEX(
codigo int primary key,
nota_kar char(20) not null,
codigo_TUTOR INT not null,
foreign key (codigo_TUTOR) references TUTOR(codigo)
);

CREATE TABLE TUTOR(


codigo int primary key,
nomb_tut varchar(30) not null,
apel_tut varchar(30) not null,
codigo_CICLO INT not null,
foreign key (codigo_CICLO) references CICLO(codigo)
);

CREATE TABLE CICLO(


codigo int primary key,
num_cic char(10) not null,
);

CREATE TABLE FICHAMATRICULA(


codigo int primary key,
fecha_fic_mat date not null,
esta_fic_mat varchar (30) not null,
codigo_TUTOR INT not null,
foreign key (codigo_TUTOR) references TUTOR(codigo)
);

CREATE TABLE PAGO(


codigo int primary key,
fech_pag date not null,
mont_pag money not null,
meto_pag varchar(30) not null,
codigo_ESTUDIANTE INT not null,
codigo_TUTOR INT not null,
foreign key (codigo_ESTUDIANTE) references ESTUDIANTE(codigo),
foreign key (codigo_TUTOR) references TUTOR(codigo)
);

CREATE TABLE ESTUDIANTE(


codigo int primary key,
nomb_est varchar(30) not null,
apel_est varchar(30) not null,
dire_Est varchar(40) not null,
telf_est char(9) not null,
fena_est date not null,
);

CREATE TABLE CURSO(


codigo int primary key,
nomb_cur varchar(30) not null,
desc_cur varchar(50) not null,
cred_cur char(10) not null,
codigo_ESTUDIANTE INT not null,
foreign key (codigo_ESTUDIANTE) references ESTUDIANTE(codigo)
);

CREATE TABLE MATRICULA(


codigo int primary key,
codigo_COMPROMISOPAGO INT not null,
codigo_DEUDAS INT not null,
foreign key (codigo_COMPROMISOPAGO) references COMPROMISOPAGO(codigo),
foreign key (codigo_DEUDAS) references DEUDAS(codigo)
);

CREATE TABLE DEUDAS(


codigo int primary key,
mont_deu money not null,
desc_deu varchar(60) not null,
);

CREATE TABLE ENTIDADBANCARIA(


codigo int primary key,
nomb_ent_ban varchar(30) not null,
num_cuen char(15) not null,
codigo_ESTUDIANTE INT not null,
foreign key (codigo_ESTUDIANTE) references ESTUDIANTE(codigo)
);

CREATE TABLE COMPROMISOPAGO(


codigo int primary key,
fech_com date not null,
desc_com_pag varchar(80) not null,
codigo_ESTUDIANTE INT not null,
foreign key (codigo_ESTUDIANTE) references ESTUDIANTE(codigo)
);

CREATE TABLE BOLETANOTAS(


codigo int primary key,
fech_bol_not date not null,
promedio char(20) not null,
codigo_ESTUDIANTE INT not null,
foreign key (codigo_ESTUDIANTE) references ESTUDIANTE(codigo)
);

También podría gustarte