Académique Documents
Professionnel Documents
Culture Documents
SENA
FUSAGASUGÁ
TABLA DE CONTENIDO
INTRODUCCIÓN
1. EJECUCIÓN DE LOS SCRIPTS PARA LA CREACIÓN DE LAS DIFERENTES
BASES DE DATOS SUMINISTRADAS.
2. CONSTRUCCION DE LA BASE DE DATOS PRESENTADA.
3. PRESENTACIÓN DE LOS SCRIPTS.
4.
5.
6.
7.
8.
INTRODUCCION
Ya en el SQL server Manangement Studio nos dirigimos al menú archivo opción abrir
archivo donde localizaremos y seleccionaremos el script alcaldía_scrip_general.sql, donde
posteriormente daremos sobre la opción ejecutar y se crearan las bases de datos.
Para la creación de la base de datos de la secretaria de planeación y obras públicas se ejecutó el SQL
sever Manangement Studio y en la opción base de datos, dando click derecho y seleccionando nueva
base de datos.
Ilustración 7. Creación de la base de datos.
USE [master]
GO
LOG ON
GO
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
end
GO
GO
GO
GO
GO
GO
ALTER DATABASE [SecPlaneacion] SET AUTO_CLOSE OFF
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
USE [SecPlaneacion]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_empresa] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_departamento] ASC
) ON [PRIMARY]
GO
GO
/****** Object: Table [dbo].[localidad] Script Date: 08/06/2019 19:14:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_localidad] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_guarderia] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_nivel_socioeconomico] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_tipo_habitacion] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
(
[id_plantel_educativo] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_enfermedad] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_barrio] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_municipio] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_persona] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_empresa_persona] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
[id_plantel_e_persona] ASC
) ON [PRIMARY]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
[id_persona_guarderia] ASC
) ON [PRIMARY]
GO
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_familia] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[id_enfermedad_persona] ASC
) ON [PRIMARY]
GO
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
[id_barrio_familia] ASC
) ON [PRIMARY]
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
GO
/****** Object: ForeignKey [FK_persona_guarderia_guarderia] Script Date: 08/06/2019
19:14:23 ******/
GO
GO
GO
GO
GO
GO
GO
GO
/****** Object: ForeignKey [FK_enfermedad_persona_Persona] Script Date: 08/06/2019
19:14:23 ******/
GO
GO
GO
GO
GO
GO
4. INSERCION DE DATOS EN LAS TABLAS