DB Biblioteca

July 8, 2022 | Author: Anonymous | Category: N/A
Share Embed Donate


Short Description

Download DB Biblioteca...

Description

 

create database db_Biblioteca use db_Biblioteca

 create table carreras(   id int identity NOT NULL primary key,   nombre varchar(100 NOT NULL,   cantidad_ciclos int NOT NULL,   a�os in int t NOT NOT NULL NULL, ,   sitio_!eb varchar("# NOT NULL,   estado int NOT NULL,    create table alumnos(   id int identity(0,1 not null primary key,   codi$o varchar("# NOT NULL,   nombre varchar(100 NOT NULL,   ap_paterno varchar(100 NOT NULL,   ap_materno varchar(100 NOT NULL,   especialidad varchar(100 NOT NULL,   se%o varchar(1 NOT NULL,   turno varchar("0 NOT NULL,   celular varchar(1# NOT NULL,   id_carrera int,   &ON'T)*NT +_alumnos_idcarreras +O-*.N -/ (id_carrera -+--N&-' carreras(id      create table docentes(   id int identity(0,1 NOT NULL primary key,   nombre varchar(100 NOT NULL,   id_carrera int,   &ON'T)*NT +_decentes_idcarreras +O-*.N -/ (id_carrera -+--N&-' carreras(id             

create table empleados( id int identity NOT NULL primary key, nombre varchar(100 NOT NULL, apellido varchar(100 NOT NULL, 

  create table especialidades(   id int identity NOT NULL primary key,   nombre varchar(100 NOT NULL,   id_carrera int,   &ON'T)*NT +_especialidades_idcarreras +_especialidades_idcarrera s +O-*.N -/ (id_carrera -+--N&-' carreras(id                 

create table libros( id int identity NOT NULL primary key, codi$o varchar(## NOT NULL, titulo_libro te%t, autor_libro te%t, pais varchar(100 NOT NULL, editorial te%t,

  NOT NULL,   edicion ano int varchar(## NOT NULL,   echa_ad2uisicion date NOT NULL

 

     create table catalo$os(   id int identity NOT NULL primary key,   codi$o varchar(100 NOT NULL,   id_carrera int,   id_especialidad int,   id_libro int,   &ON'T)*NT +_catalo$os_idcarreras +O-*.N -/ (id_carrera -+--N&-' carreras(id,   &ON'T)*NT +_catalo$os_idespecialidades +_catalo$os_idespecialidad es +O-*.N -/ (id_especialidad -+--N&-' especialidades(id,   &ON'T)*NT +_catalo$os_idlibros +O-*.N -/ (id_libro -+--N&-' libros(id      create table usuarios(   id int identity NOT NULL primary key,   id_empleado int,   usuario varchar(#0 NOT NULL,   pass!ord varchar(#0 NOT NULL,   &ON'T)*NT +_usuarios_idempleados +O-*.N -/ (id_empleado -+--N&-' empleados(id      create table prestamos(   int identity date NOT NULL primary key,   id echa_prestamos NOT NULL,   hora_prestamo time NOT NULL,   echa_devolucion date NOT NULL,   hora_devolucion time NOT NULL,   estado int NOT NULL,   id_libro int,   id_alumno int,   id_docente int,   id_usuario int,   &ON'T)*NT +_prestamos_idlibros +O-*.N -/ (id_libro -+--N&-' libros(id,   &ON'T)*NT +_prestamos_idalumnos +O-*.N -/ (id_alumno -+--N&-' alumnos(id,   &ON'T)*NT +_prestamos_iddocentes +O-*.N -/ (id_docente -+--N&-' docentes(id,   &ON'T)*NT +_prestamos_idusuarios +O-*.N -/ (id_usuario -+--N&-' usuarios(id     

*N'-T *NTO carreras 3)LU-' (4)dministracion de -mpresas4,10,#,4!!!5adm5undc5edu5pe4,1,   (4)$ronomia4,10,#,4!!!5a$ronomia5undc5edu5pe4,1,   (4&ontabilidad4,10,#,4!!!5&ontabilidad5undc5edu5pe4,1,   (4*n$enieria de 'istemas4,10,#,4!!!5sistem 'istemas4,10,#,4!!!5sistemas5undc5edu5pe4,1, as5undc5edu5pe4,1,   (4Turismo y hoteleria4,10,#,4!!!5turismo5undc5edu5pe4,1, hoteleria4,10,#,4!!!5turis mo5undc5edu5pe4,1,   (4Nulo4,0,0,464,0

  *N'-T *NTO alumnos 3)LU-' (464,464,464,464,464,464,464,464,7, (464,464,464,464,464,464 ,464,464,7, (41"89#"11"4,4)N.-L-'4,4)NT-:U-)4,4&;)-')OLLO >'O+T?)-4,4+4,4T)>-4,4@A#"#7914,",   (41"18"1#94,4O'-4,4&)'T-L (41"18"1#94,4O'-4,4&)'T-LLO4,4C*NO4,4O LO4,4C*NO4,4O >&)C*T)L-'4,4U)T-4,4CL)N*+*&)&*ON O4,4>U)T-4,4CL)N*+*&)&*ON / >-')OLLO TU*'T*&O4,4+4,4)N*-L4,4&)> (41"18@9A#4,4>)N*-L4,4&)>O'O4,4&)-' O'O4,4&)-' >&O*N3-'*ON4,4-')OLLO '4,4*'L)'4,4>-')OLLO >'O+T?)-4,4-4,4@@99A"7"#4,"

       

*N'-T *NTO docentes 3)LU-' (4nulo4,7, (4.ardyn Olivera uiD4,, (43ictor )rce4,8,(4+rankli )rriola4,", (4>avid :uevedo4,#,(4enee ivera4,1

  *N'-T *NTO empleados 3)LU-' (4)>4,8,(4)>
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF