Beruflich Dokumente
Kultur Dokumente
Distancia
Base de Datos Avanzadas
V Ciclo
Ingeniera de Sistemas
DATOS DE IDENTIFICACIN
INSTRUCCIONES
El presente examen estar basado en un caso de Estudio, teniendo como base haber
aprobado el curso de Base de Datos I.
CASO DE ESTUDIOS
Para este proyecto la empresa lo ha contratado a Ud. Como Ing. De Sistema para el anlisis
y elaboracin de su motor de datos para este Sistema, para lo cual le ha brindado lo
siguiente:
Se solicita a Ud. Desarrollar el modelo adecuado para este caso de Estudio, brindando el
modelo de Datos, y los Script correspondiente para creacin de los Objetos.
Script:
- Tablas
- Restricciones
- Claves forneas y Primarias.
- Modelo de Datos
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
GO
SET QUOTED_IDENTIFIER ON
GO
GO
-- tipo personal
USE [Service_X]
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
SET QUOTED_IDENTIFIER ON
GO
GO
--Personal
USE [Service_X]
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
GO
--Atencion
USE [Service_X]
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
GO
----------------------------------------------------------------------------------------------------------
-------------------
--7.-
--8.-
create procedure listarPersonalAtendido
@area_ int ,
@sexo_ int
AS
BEGIN
Select DatosPersonal,DNI,Emails from Personal where IDPersonal
in (Select idpersonal from Solicitud sol inner join Atencion ate
on sol.IDSolicitud=ate.IDSolicitud and Estado=1 and IDArea=@area_)
AND idsexo=@sexo_;
END
GO
--9.- Mostrar todo el personal mayor de 30 aos atendidas en enero 2014