lign="justify"> [YaGl] smallint NULL,
[RW] smallint NULL,
[EzhDisp] smallint NULL,
[NTalon] smallint NULL,
[DateOBL] smalldatetime NULL,
[DateZBL] smalldatetime NULL,
[BLVydan] varchar (1) NULL,
[KodPol] smallint NULL,
[VozrBL] smallint NULL,
[Date] smalldatetime NULL,
[UKL] varchar (4) NULL,
[profKoika] int NULL,
[prizPost] smallint NULL,
[kodOtd] int NULL, KEY CLUSTERED ([id_stacionar])
) TABLE [dbo]. [SopZab] (
[id_Stacionar] bigint NULL,
[Soput] varchar (7) NULL
) TABLE [dbo]. [SprAnastez] (
[Id_Anastez] int NOT NULL,
[NameAnastez] varchar (100) NULL, KEY CLUSTERED ([Id_Anastez])
) TABLE [dbo]. [SprDop] (
[id] smallint NOT NULL,
[Gospit] varchar (10) NULL,
[Napr] varchar (14) NULL,
[IshodZabol] varchar (21) NULL, KEY CLUSTERED ([id])
) TABLE [dbo]. [SprOperac] (
[id_operac] int NOT NULL,
[NameOperac] varchar (200) NULL, KEY CLUSTERED ([id_operac])
) TABLE [dbo]. [SprProcedur] (
[KodProcedury] int NOT NULL,
[NameProcedury] varchar (100) NULL, KEY CLUSTERED ([KodProcedury])
) TABLE [dbo]. [SprVidStacionar] (
[Id_ VidStacionar] smallint NOT NULL,
[NameVidStacionar] varchar (33) NULL, KEY CLUSTERED ([Id_ VidStacionar])
) TABLE [dbo]. [SprZhitel] (
[Id_Zhitel] smallint NOT NULL,
[NameZhitel] varchar (12) NULL, KEY CLUSTERED ([Id_Zhitel])
) TABLE [dbo]. [StacionarOperac] (
[id_Stacionar] bigint NULL,
[DataO] smalldatetime NULL,
[id_operac] int NULL,
[id_Anastez] int NULL,
[KPosleO] varchar (7) NULL) TABLE [dbo]. [StacionarProc] (
[id_Stacionar] bigint NULL,
[id_Procedur] int NULL,
[Kolvo] int NULL)
В
Рисунок 2 - Даталогіческая модель схеми бази даних "Денний стаціонар"
Створення зв'язків:
TABLE [dbo]. [StacionarOperac] CONSTRAINT [StacionarOperac_fk] FOREIGN KEY ([id_Stacionar]) [Stacionar]. [dbo] ([id_stacionar]) UPDATE CASCADEDELETE CASCADETABLE [dbo]. [SopZab] CONSTRAIN...