Академический Документы
Профессиональный Документы
Культура Документы
Carrera/Semestre: Sistemas 5 A1
Fecha:
24/05/16
Tarea N1:
Creacin de tablas y
Repaso de sentencias de bsicas de Select
1. Escribir el cdigo necesario, para crear las tablas, las restricciones de
referencia a otras tablas (relaciones).
--------------------------------CREACION DE LA BASE DE DATOS
------------------------------Create Database BD_Biblioteca
use BD_Biblioteca
----------------------------------CREACION DE LAS TABLAS FUERTES
--------------------------------Create Table Estudiante
(IdEstudiante int primary key identity(1,1),
nombre varchar(50) not null,
facultad varchar(25) not null,
carrera varchar(20) not null)
Create Table Autor
(IdAutor int primary key identity(1,1),
nombre varchar(15) not null,
apellido varchar (15) not null)
Create Table Editorial
(IdEditorial int primary key identity(1,1),
nomEditorial varchar(50) not null,
pais varchar(10) not null)
----------------------------------CREACION DE LAS TABLAS DEBILES
--------------------------------Create Table Libro
(IdLibro int primary key identity(1,1),
titulo varchar(50) not null,
ao int not null,
IdAutor int not null,
IdEditorial int not null)