Dynamic Top Menu Positioning
Enviado por josue1207 • 16 de Septiembre de 2014 • 245 Palabras (1 Páginas) • 252 Visitas
create database bdmatricula;
use bdmatricula;
drop table if exists nota;
drop table if exists matricula;
drop table if exists alumno;
drop table if exists curso;
drop table if exists profesor;
drop table if exists titulos;
#creacion de tablas
create table alumno(
coda smallint(4) unsigned not null primary key auto_increment,
noma varchar(20),
apea varchar(30),
unique i_nomape(noma,apea)
);
create table curso(
codc smallint(4) unsigned not null primary key auto_increment,
nomc varchar(30) unique,
credito tinyint unsigned
);
create table profesor(
codp smallint(4) unsigned not null primary key auto_increment,
nomp varchar(20),
apep varchar(30),
titulo varchar(20),
unique i_verifp(nomp,apep)
);
create table matricula(
coda smallint(4) unsigned not null,
codc smallint(4) unsigned not null,
codp smallint(4) unsigned not null,
dia varchar(20),
hora time,
unique i_verif(coda,codc)
);
create table nota(
coda smallint(4) unsigned not null ,
codc smallint(4) unsigned not null ,
pr1 tinyint unsigned,
pr2 tinyint unsigned,
efinal tinyint unsigned,
unique i_verfifN(coda,codc)
);
create table titulos(
nom varchar(30) not null primary key
);
#Visualizar estructura de las tablas
#describe alumno;
#describe curso;
#describe nota;
#describe profesor;
#describe matricula;
show tables;
insert into titulos values ('Administrador'),('Abogado'),('Ing. Sistemas'),('Ing. Industrial'),('Ing. Economico'),('Ing.
Electrico'),('Ing. Software'),('Arquitecto'),('Doctor'),('Psicologo'),('Analista'),('Contador');
insert into alumno values(101,'Anthony','Garay');
insert into alumno values(null,'Josue','Costa');
insert into alumno values(null,'Carla','Diaz');
insert into curso values(301,'Lenguaje de Programacion II',4);
insert into curso values(null,'Analisis Matematico IV',5);
insert into curso values(null,'Optimizacion I',3);
insert into profesor values(501,'Laura','Figueroa','Ing. Sistemas');
insert into profesor values(null,'Carlos','Frederick','Ing. Industrial');
insert into profesor values(null,'Sandra','Ramirez','Abogado');
...