Seudocodigo
use Hogar_de_Fe
create table Huerfano--------
(
[id_Huerfano] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[id_Tutor] int foreign key references Tutor(id_Tutor) not null,
[id_FormularioAdmision] int foreign key references FormularioAdmision(id_formularioAdmision) not null,
[PrimerNombre] [nvarchar](30) not NULL,
[SegundoNombre] [nvarchar](30) not NULL,
[PrimerApellido] [nvarchar](30) not NULL,
[SegundoApellido] [nvarchar](30) not NULL,
[edad] [int] not NULl
)
GO
--------------------------------------------------------------------------
create table Tutor-----
(
[id_Tutor] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[PrimerNombre] [nvarchar](30) not NULL,
[SegundoNombre] [nvarchar](30) not NULL,
[PrimerApellido] [nvarchar](30) not NULL,
[SegundoApellido] [nvarchar](30) not NULL,
[direccion] [nvarchar](100) not NULl,
[NumTelefono] [nvarchar](10) not NULl,
[cedula] [nvarchar](45) not NULl,
[relacion] [nvarchar](100) not NULl,
)
GO
---------------------------------------------------------------------------
create table Administrador
(
[id_Administrador] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[id_Areas] int foreign key references Areas(id_Areas) not null,
[PrimerNombre] [nvarchar](30) not NULL,
[SegundoNombre] [nvarchar](30) not NULL,
[PrimerApellido] [nvarchar](30) not NULL,
[SegundoApellido] [nvarchar](30) not NULL,
[direccion] [nvarchar](100) not NULl,
[NumTelefono] [nvarchar](10) not NULl,
[especificacion] [nvarchar](100) not NULl,
)
GO
--------------------------------------------------------------------------
create table JuntaDirectiva
(
[id_Junta] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[id_Areas] int foreign key references Areas(id_Areas) not null,
[PrimerNombre] [nvarchar](30) not NULL,
[SegundoNombre] [nvarchar](30) not NULL,
[PrimerApellido] [nvarchar](30) not NULL,
[SegundoApellido] [nvarchar](30) not NULL,
[direccion] [nvarchar](100) not NULl,
[NumTelefono] [nvarchar](10) not NULl,
[cargo] [nvarchar](50) not NULl,
)
GO
create table JuntaDirectiva
(
[id_Junta] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[id_Areas] int foreign key references Areas(id_Areas) not null,
[PrimerNombre] [nvarchar](30) not NULL,
[SegundoNombre] [nvarchar](30) not NULL,
[PrimerApellido] [nvarchar](30) not NULL,
[SegundoApellido] [nvarchar](30) not NULL,
[direccion] [nvarchar](100) not NULl,
[NumTelefono] [nvarchar](10) not NULl,
[cargo] [nvarchar](50) not NULl,
)
GO
--------------------------------------------------------------------------
create table Nutricionista
(
[id_Nutricionista] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[id_Areas] int foreign key references Areas(id_Areas) not null,
[PrimerNombre] [nvarchar](30) not NULL,
[SegundoNombre] [nvarchar](30) not NULL,
[PrimerApellido] [nvarchar](30) not NULL,
[SegundoApellido] [nvarchar](30) not NULL,
[direccion] [nvarchar](100) not NULl,
[NumTelefono] [nvarchar](10) not NULl,
[tipoNutricionista] [nvarchar](50) not NULl,
[planAlimentacon] [nvarchar](300) not NULl,
)
GO
--------------------------------------------------------------------------
create table Medico
(
[id_Medico] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[id_Areas] int foreign key references Areas(id_Areas) not null,
[PrimerNombre] [nvarchar](30) not NULL,
[SegundoNombre] [nvarchar](30) not NULL,
[PrimerApellido] [nvarchar](30) not NULL,
[SegundoApellido] [nvarchar](30) not NULL,
[direccion] [nvarchar](100) not NULl,
[NumTelefono] [nvarchar](10) not NULl,
[Especialidad] [nvarchar](50) not NULl,
)
GO
create table EducadorSocial
(
[id_Educador] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[id_Areas] int foreign key references Areas(id_Areas) not null,
[PrimerNombre] [nvarchar](30) not NULL,
[SegundoNombre] [nvarchar](30) not NULL,
[PrimerApellido] [nvarchar](30) not NULL,
[SegundoApellido] [nvarchar](30) not NULL,
[direccion] [nvarchar](100) not NULl,
[NumTelefono] [nvarchar](10) not NULl,
[NumNiños] [int] not NULl,
)
GO
---------------------------------------------------------------------------
create table Maestro------------
(
[id_Maestro] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[id_Areas] int foreign key references Areas(id_Areas) not null,
[PrimerNombre] [nvarchar](30) not NULL,
[SegundoNombre] [nvarchar](30) not NULL,
[PrimerApellido] [nvarchar](30) not NULL,
[SegundoApellido] [nvarchar](30) not NULL,
[direccion] [nvarchar](100) not NULl,
[NumTelefono] [nvarchar](10) not NULl,
)
GO
---------------------------------------------------------------------------
create table Psicologo
(
[id_Psicologo] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[id_Areas] int foreign key references Areas(id_Areas) not null,
[PrimerNombre] [nvarchar](30) not NULL,
[SegundoNombre] [nvarchar](30) not NULL,
[PrimerApellido] [nvarchar](30) not NULL,
[SegundoApellido] [nvarchar](30) not NULL,
[direccion] [nvarchar](100) not NULl,
[NumTelefono] [nvarchar](10) not NULl,
[tipoPsicologia] [nvarchar](50) not NULl,
)
GO
----------------------------------------------------------------------------
create table Alumnos----
(
[id_Alumno] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[id_Huerfano] int foreign key references Huerfano(id_Huerfano) not null,
[AñoEstudio] [int] not NULl,
)
GO
etc.....
No hay comentarios:
Publicar un comentario