/****** Object: Table [dbo].[Companies] Script Date: 09/26/2010 09:23:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Companies]( [CompanyId] [int] IDENTITY(1,1) NOT NULL, [Name] [nvarchar](50) COLLATE Latin1_General_CI_AS NULL, [Address] [nvarchar](150) COLLATE Latin1_General_CI_AS NULL, [IsPublic] [bit] NULL, [PhoneNumbers] [int] NULL, CONSTRAINT [PK_Companies] PRIMARY KEY CLUSTERED ( [CompanyId] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO /****** Object: Table [dbo].[CompanyEvents] Script Date: 09/26/2010 09:23:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[CompanyEvents]( [EventId] [int] IDENTITY(1,1) NOT NULL, [Event] [nvarchar](50) COLLATE Latin1_General_CI_AS NULL, [Event Date] [datetime] NULL, [CompanyId] [int] NULL, CONSTRAINT [PK_CompanyEvents] PRIMARY KEY CLUSTERED ( [EventId] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[CompanyEvents] WITH CHECK ADD CONSTRAINT [FK_CompanyEvents_Companies] FOREIGN KEY([CompanyId]) REFERENCES [dbo].[Companies] ([CompanyId]) GO /****** Object: Table [dbo].[CompanyNews] Script Date: 09/26/2010 09:23:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[CompanyNews]( [NewsId] [int] IDENTITY(1,1) NOT NULL, [News] [nvarchar](500) COLLATE Latin1_General_CI_AS NULL, [DateTime] [datetime] NULL, [CompanyId] [int] NULL, CONSTRAINT [PK_CompanyNews] PRIMARY KEY CLUSTERED ( [NewsId] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[CompanyNews] WITH CHECK ADD CONSTRAINT [FK_CompanyNews_CompanyNews] FOREIGN KEY([CompanyId]) REFERENCES [dbo].[Companies] ([CompanyId]) GO /****** Object: Table [dbo].[CompanyPolicies] Script Date: 09/26/2010 09:24:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[CompanyPolicies]( [PolicyId] [int] IDENTITY(1,1) NOT NULL, [PolicyName] [nvarchar](50) COLLATE Latin1_General_CI_AS NULL, [StartDate] [datetime] NULL, [EndDate] [datetime] NULL, [CompanyId] [int] NULL, CONSTRAINT [PK_CompanyPolicies] PRIMARY KEY CLUSTERED ( [PolicyId] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[CompanyPolicies] WITH CHECK ADD CONSTRAINT [FK_CompanyPolicies_Companies] FOREIGN KEY([CompanyId]) REFERENCES [dbo].[Companies] ([CompanyId]) INSERT INTO [dbo].[Companies] ([Name] ,[Address] ,[IsPublic] ,[PhoneNumbers]) VALUES ('Company1' ,'West Park Drive, MA' ,1 ,45788) GO INSERT INTO [dbo].[CompanyEvents] ([Event] ,[Event Date] ,[CompanyId]) VALUES ('Company Day' ,GetDate() ,1) GO INSERT INTO [dbo].[CompanyEvents] ([Event] ,[Event Date] ,[CompanyId]) VALUES ('Sports Event' ,GetDate() ,1) GO INSERT INTO [dbo].[CompanyEvents] ([Event] ,[Event Date] ,[CompanyId]) VALUES ('Friday Movie' ,GetDate() ,1) GO INSERT INTO [dbo].[CompanyNews] ([News] ,[DateTime] ,[CompanyId]) VALUES ('Acquired new logo' ,GetDate() ,1) GO INSERT INTO [dbo].[CompanyNews] ([News] ,[DateTime] ,[CompanyId]) VALUES ('Company is going to public' ,GetDate() ,1) GO INSERT INTO [dbo].[CompanyNews] ([News] ,[DateTime] ,[CompanyId]) VALUES ('Good profits in Q1 quarter' ,GetDate() ,1) GO INSERT INTO [dbo].[CompanyPolicies] ([PolicyName] ,[StartDate] ,[EndDate] ,[CompanyId]) VALUES ('Leave Policy' ,GetDate() ,GetDate() ,1) GO INSERT INTO [dbo].[CompanyPolicies] ([PolicyName] ,[StartDate] ,[EndDate] ,[CompanyId]) VALUES ('Travel Policy' ,GetDate() ,GetDate() ,1) GO INSERT INTO [dbo].[CompanyPolicies] ([PolicyName] ,[StartDate] ,[EndDate] ,[CompanyId]) VALUES ('Finance Policy' ,GetDate() ,GetDate() ,1)