CREATE DATABASE [ISurveyU] ON  PRIMARY 
( NAME = N'ISurveyU', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\ISurveyU.mdf' , SIZE = 3072KB , FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'ISurveyU_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\ISurveyU_log.ldf' , SIZE = 1024KB , FILEGROWTH = 10%)
GO
EXEC dbo.sp_dbcmptlevel @dbname=N'ISurveyU', @new_cmptlevel=90
GO
ALTER DATABASE [ISurveyU] SET ANSI_NULL_DEFAULT OFF 
GO
ALTER DATABASE [ISurveyU] SET ANSI_NULLS OFF 
GO
ALTER DATABASE [ISurveyU] SET ANSI_PADDING OFF 
GO
ALTER DATABASE [ISurveyU] SET ANSI_WARNINGS OFF 
GO
ALTER DATABASE [ISurveyU] SET ARITHABORT OFF 
GO
ALTER DATABASE [ISurveyU] SET AUTO_CLOSE OFF 
GO
ALTER DATABASE [ISurveyU] SET AUTO_CREATE_STATISTICS ON 
GO
ALTER DATABASE [ISurveyU] SET AUTO_SHRINK OFF 
GO
ALTER DATABASE [ISurveyU] SET AUTO_UPDATE_STATISTICS ON 
GO
ALTER DATABASE [ISurveyU] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO
ALTER DATABASE [ISurveyU] SET CURSOR_DEFAULT  GLOBAL 
GO
ALTER DATABASE [ISurveyU] SET CONCAT_NULL_YIELDS_NULL OFF 
GO
ALTER DATABASE [ISurveyU] SET NUMERIC_ROUNDABORT OFF 
GO
ALTER DATABASE [ISurveyU] SET QUOTED_IDENTIFIER OFF 
GO
ALTER DATABASE [ISurveyU] SET RECURSIVE_TRIGGERS OFF 
GO
ALTER DATABASE [ISurveyU] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO
ALTER DATABASE [ISurveyU] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO
ALTER DATABASE [ISurveyU] SET PARAMETERIZATION SIMPLE 
GO
ALTER DATABASE [ISurveyU] SET  READ_WRITE 
GO
ALTER DATABASE [ISurveyU] SET RECOVERY SIMPLE 
GO
ALTER DATABASE [ISurveyU] SET  MULTI_USER 
GO
ALTER DATABASE [ISurveyU] SET PAGE_VERIFY CHECKSUM  
GO
USE [ISurveyU]
GO
IF NOT EXISTS (SELECT name FROM sys.filegroups WHERE is_default=1 AND name = N'PRIMARY') ALTER DATABASE [ISurveyU] MODIFY FILEGROUP [PRIMARY] DEFAULT
GO
/****** 对象:  Table [dbo].[SheetInfo]    脚本日期: 11/07/2007 21:16:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SheetInfo](
	[SheetId] [varchar](50) NOT NULL,
	[OwnerId] [varchar](50) NOT NULL,
	[Title] [varchar](50) NOT NULL,
	[Description] [varchar](50) NOT NULL,
	[TotalVisited] [int] NOT NULL,
	[Tag1] [varchar](50) NULL,
	[Tag2] [varchar](50) NULL,
	[Tag3] [varchar](50) NULL,
 CONSTRAINT [PK_SheetInfo_1] PRIMARY KEY CLUSTERED 
(
	[SheetId] 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
SET ANSI_PADDING OFF
GO
/****** 对象:  Table [dbo].[ItemInfo]    脚本日期: 11/07/2007 21:16:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ItemInfo](
	[ItemId] [varchar](50) NOT NULL,
	[QuestionId] [varchar](50) NULL,
	[Title] [varchar](50) NULL,
	[TotalSelected] [int] NULL,
 CONSTRAINT [PK_ItemInfo] PRIMARY KEY CLUSTERED 
(
	[ItemId] 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
SET ANSI_PADDING OFF
GO
/****** 对象:  Table [dbo].[UserInfo]    脚本日期: 11/07/2007 21:16:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[UserInfo](
	[UserId] [varchar](50) NOT NULL,
	[Password] [varchar](50) NOT NULL,
	[Email] [varchar](50) NULL,
	[Blog] [varchar](50) NULL,
	[QQMSN] [varchar](50) NULL,
	[NumberOfSheetHasBefore] [int] NOT NULL,
	[IsAdmin] [bit] NOT NULL,
 CONSTRAINT [PK_UserInfo] PRIMARY KEY CLUSTERED 
(
	[UserId] 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
SET ANSI_PADDING OFF
GO
/****** 对象:  Table [dbo].[QuestionInfo]    脚本日期: 11/07/2007 21:16:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[QuestionInfo](
	[QuestionId] [varchar](50) NOT NULL,
	[SheetId] [varchar](50) NOT NULL,
	[Title] [varchar](50) NOT NULL,
	[Style] [int] NOT NULL,
 CONSTRAINT [PK_QuestionInfo] PRIMARY KEY CLUSTERED 
(
	[QuestionId] 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
SET ANSI_PADDING OFF
GO
