Colegio_bd

Post on 29-Sep-2015

214 views 1 download

description

colegio base de datos

Transcript of Colegio_bd

COLEGIOCrear la base de datos COLEGIO y agregar dos tablas ALUMNO y MATRICULA, utilizando las herramientas del SQLYog. Agregar 5 registros a la tabla ALUMNO. Esta actividad debes realizarla en un archivo de Word en donde copiars el cdigo ingresado en el SQL YOG para crear tu base de datos y tablas. Enva esta actividad a travs de Colegio, en la parte inferior de esta pgina.

DESARROLLOUse colegiogo---creamos la tabla alumnoCREATE TABLE alumno(codalumno char (6) not null,nombre char (15) not null,apellidochar (15) not null,direccion char (35) not null,distrito char (35) not null)go

---Creamos la tabla matricula ---CREATE TABLE matricula(idmatricula char (4) null,codalumno char (6) not null,fecha date not null,grado char (10)not null) go

--- insertar valores a la tabla alumno ----insert into alumno(codalumno,nombre,apellido,direccion,distrito)values ('C101','JUAN CARLOS','GONZALES RUIZ','calle luis pardo 350','SAN LUIS')insert into alumno(codalumno,nombre,apellido,direccion,distrito)values ('C102','DENNIS','RAMIREZ CASTRO','calle los ramales 503','LOS OLIVOS')insert into alumno(codalumno,nombre,apellido,direccion,distrito)values ('C103','MANUEL','DIAZ RAMIREZ','pasaje los dominicos 666','CHOSICA')insert into alumno(codalumno,nombre,apellido,direccion,distrito)values ('C104','JOSE','DIAZ MORALES','pasaje carrion 290','SAN JUAN DE LURIGANCHO')insert into alumno(codalumno,nombre,apellido,direccion,distrito)values ('C105','MARIO','GONZALES ROBLES','pasaje la flor 167','SAN JUAN DE MIRAFLORES')