CREATE TABLE [Computer_center]( 	[Name] [nvarchar](30) NOT NULL, 	[Description] [nchar](50) NULL, 	[computer_center_id] [int] NULL, 	[center_id] [int] NOT NULL,  CONSTRAINT [PK_Computer_center] PRIMARY KEY CLUSTERED  ( 	[center_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],  CONSTRAINT [IX_Computer_center] UNIQUE NONCLUSTERED  ( 	[computer_center_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],  CONSTRAINT [IX_Computer_center_1] UNIQUE NONCLUSTERED  ( 	[center_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]  GO  ALTER TABLE [Computer_center]  WITH CHECK ADD  CONSTRAINT [FK_Computer_center_Supercomputer] FOREIGN KEY([computer_center_id]) REFERENCES [Supercomputer] ([computer_center_id]) GO  ALTER TABLE [Computer_center] CHECK CONSTRAINT [FK_Computer_center_Supercomputer] GO   /****** Object:  Table [Supercomputer]    Script Date: 16.05.2013 19:24:34 ******/ SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE TABLE [Supercomputer]( 	[Projected_capacity] [nvarchar](40) NULL, 	[RAM] [int] NULL, 	[FLOP] [decimal](18, 5) NULL, 	[computer_center_id] [int] NULL, 	[supercomputer_id] [int] NOT NULL,  CONSTRAINT [PK_Supercomputer] PRIMARY KEY CLUSTERED  ( 	[supercomputer_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],  CONSTRAINT [IX_Supercomputer] UNIQUE NONCLUSTERED  ( 	[computer_center_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],  CONSTRAINT [IX_Supercomputer_1] UNIQUE NONCLUSTERED  ( 	[supercomputer_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]  GO   /****** Object:  Table [Node]    Script Date: 16.05.2013 20:05:26 ******/ SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE TABLE [Node]( 	[Number] [int] NULL, 	[Number_of_CPU] [int] NOT NULL, 	[RAM] [int] NULL, 	[total_computing_power] [int] NULL, 	[Hard_Drive] [nchar](10) NULL, 	[supercomputer_id] [int] NULL, 	[node_id] [int] NOT NULL,  CONSTRAINT [PK_Node] PRIMARY KEY CLUSTERED  ( 	[node_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]  GO  ALTER TABLE [Node]  WITH CHECK ADD  CONSTRAINT [FK_Node_Supercomputer] FOREIGN KEY([supercomputer_id]) REFERENCES [Supercomputer] ([supercomputer_id]) GO  ALTER TABLE [Node] CHECK CONSTRAINT [FK_Node_Supercomputer] GO    /****** Object:  Table [supervisor]    Script Date: 16.05.2013 20:06:06 ******/ SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE TABLE [supervisor]( 	[Surname] [nvarchar](30) NOT NULL, 	[Name] [nvarchar](20) NULL, 	[Position] [nvarchar](15) NULL, 	[center_id] [int] NOT NULL, 	[supervisor_id] [int] NOT NULL,  CONSTRAINT [PK_supervisor_1] PRIMARY KEY CLUSTERED  ( 	[supervisor_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],  CONSTRAINT [IX_supervisor_1] UNIQUE NONCLUSTERED  ( 	[supervisor_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]  GO  ALTER TABLE [supervisor]  WITH CHECK ADD  CONSTRAINT [FK_supervisor_Computer_center] FOREIGN KEY([center_id]) REFERENCES [Computer_center] ([center_id]) GO  ALTER TABLE [supervisor] CHECK CONSTRAINT [FK_supervisor_Computer_center] GO    /****** Object:  Table [research_program]    Script Date: 16.05.2013 20:06:22 ******/ SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE TABLE [research_program]( 	[Name_program] [nvarchar](30) NOT NULL, 	[description] [nvarchar](max) NULL, 	[supervisor_id] [int] NULL, 	[research_pr_id] [int] NOT NULL,  CONSTRAINT [PK_research_program] PRIMARY KEY CLUSTERED  ( 	[research_pr_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],  CONSTRAINT [IX_research_program_1] UNIQUE NONCLUSTERED  ( 	[research_pr_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]  GO  ALTER TABLE [research_program]  WITH CHECK ADD  CONSTRAINT [FK_research_program_supervisor] FOREIGN KEY([supervisor_id]) REFERENCES [supervisor] ([supervisor_id]) GO  ALTER TABLE [research_program] CHECK CONSTRAINT [FK_research_program_supervisor] GO    /****** Object:  Table [request]    Script Date: 16.05.2013 20:06:40 ******/ SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE TABLE [request]( 	[Surname] [nvarchar](30) NOT NULL, 	[Name] [nvarchar](20) NULL, 	[Last_name] [nvarchar](15) NULL, 	[research_pr_id] [int] NULL, 	[state_id] [int] NULL, 	[request_id] [int] NOT NULL,  CONSTRAINT [PK_request] PRIMARY KEY CLUSTERED  ( 	[request_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],  CONSTRAINT [IX_request_1] UNIQUE NONCLUSTERED  ( 	[state_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]  GO  ALTER TABLE [request]  WITH CHECK ADD  CONSTRAINT [FK_request_research_program] FOREIGN KEY([research_pr_id]) REFERENCES [research_program] ([research_pr_id]) GO  ALTER TABLE [request] CHECK CONSTRAINT [FK_request_research_program] GO   /****** Object:  Table [State_conditions]    Script Date: 16.05.2013 20:07:06 ******/ SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE TABLE [State_conditions]( 	[State] [nvarchar](20) NULL, 	[state_id] [int] NULL,  CONSTRAINT [IX_State_conditions] UNIQUE NONCLUSTERED  ( 	[state_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]  GO  ALTER TABLE [State_conditions]  WITH CHECK ADD  CONSTRAINT [FK_State_conditions_request] FOREIGN KEY([state_id]) REFERENCES [request] ([state_id]) GO  ALTER TABLE [State_conditions] CHECK CONSTRAINT [FK_State_conditions_request] GO