반응형
USE [BlogDataBase]
GO
/****** Object: Table [dbo].[BLOG_ARCHIVES] Script Date: 03/09/2009 09:09:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BLOG_ARCHIVES](
[archivesdate] [varchar](7) NOT NULL,
[archivescount] [int] NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
USE [BlogDataBase]
GO
/****** Object: Table [dbo].[BLOG_CATEGORIES] Script Date: 03/09/2009 09:09:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BLOG_CATEGORIES](
[categoryid] [int] IDENTITY(1,1) NOT NULL,
[categoryname] [nvarchar](50) NOT NULL,
[sortkey] [smallint] NOT NULL,
[createdate] [datetime] NOT NULL,
[deletedate] [datetime] NULL,
CONSTRAINT [PK_BLOG_CATEGORIES] PRIMARY KEY CLUSTERED
(
[categoryid] 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
USE [BlogDataBase]
GO
/****** Object: Table [dbo].[BLOG_COMMENTS] Script Date: 03/09/2009 09:09:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BLOG_COMMENTS](
[commentid] [int] IDENTITY(1,1) NOT NULL,
[postid] [nvarchar](100) NOT NULL,
[name] [nvarchar](100) NOT NULL,
[password] [varchar](50) NOT NULL,
[homepage] [varchar](100) NULL,
[comment] [ntext] NOT NULL,
[createdate] [datetime] NOT NULL,
CONSTRAINT [PK_BLOG_COMMENTS] PRIMARY KEY CLUSTERED
(
[commentid] 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
SET ANSI_PADDING OFF
GO
USE [BlogDataBase]
GO
/****** Object: Table [dbo].[BLOG_COUNTS] Script Date: 03/09/2009 09:09:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BLOG_COUNTS](
[IP] [varchar](30) NOT NULL,
[VisitDate] [datetime] NOT NULL,
CONSTRAINT [PK_BLOG_COUNTS] PRIMARY KEY CLUSTERED
(
[IP] ASC,
[VisitDate] 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
USE [BlogDataBase]
GO
/****** Object: Table [dbo].[BLOG_LINKS] Script Date: 03/09/2009 09:09:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BLOG_LINKS](
[linkid] [int] IDENTITY(1,1) NOT NULL,
[linkname] [nvarchar](50) NOT NULL,
[linkurl] [varchar](100) NOT NULL,
[sortkey] [smallint] NOT NULL,
[createdate] [datetime] NOT NULL,
[deletedate] [datetime] NULL,
CONSTRAINT [PK_BLOG_LINKS] PRIMARY KEY CLUSTERED
(
[linkid] 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
USE [BlogDataBase]
GO
/****** Object: Table [dbo].[BLOG_NOTICES] Script Date: 03/09/2009 09:09:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BLOG_NOTICES](
[noticeid] [int] NOT NULL,
[noticename] [nvarchar](100) NOT NULL,
[noticecontent] [ntext] NOT NULL,
[createdate] [datetime] NOT NULL,
[deletedate] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
USE [BlogDataBase]
GO
/****** Object: Table [dbo].[BLOG_POSTS] Script Date: 03/09/2009 09:09:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BLOG_POSTS](
[postid] [nvarchar](100) NOT NULL,
[categoryid] [int] NOT NULL,
[postname] [nvarchar](100) NOT NULL,
[postcontent] [ntext] NOT NULL,
[createdate] [datetime] NOT NULL,
[deletedate] [datetime] NULL,
[viewcount] [int] NOT NULL,
[commentcount] [int] NOT NULL,
[tag] [nvarchar](300) NOT NULL,
CONSTRAINT [PK_BLOG_POSTS] PRIMARY KEY CLUSTERED
(
[postid] 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
USE [BlogDataBase]
GO
/****** Object: Table [dbo].[BLOG_TAGS] Script Date: 03/09/2009 09:09:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BLOG_TAGS](
[tagname] [nvarchar](50) NOT NULL,
[tagcount] [int] NOT NULL
) ON [PRIMARY]
GO
USE [BlogDataBase]
GO
/****** Object: Table [dbo].[BLOG_USERINFO] Script Date: 03/09/2009 09:09:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BLOG_USERINFO](
[AdminID] [varchar](50) NOT NULL,
[AdminPWD] [varchar](30) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[BLOG_CATEGORIES] WITH CHECK ADD CONSTRAINT [FK_BLOG_CATEGORIES_BLOG_CATEGORIES] FOREIGN KEY([categoryid])
REFERENCES [dbo].[BLOG_CATEGORIES] ([categoryid])
GO
ALTER TABLE [dbo].[BLOG_CATEGORIES] CHECK CONSTRAINT [FK_BLOG_CATEGORIES_BLOG_CATEGORIES]
GO
ALTER TABLE [dbo].[BLOG_COMMENTS] WITH CHECK ADD CONSTRAINT [FK_BLOG_COMMENTS_BLOG_POSTS] FOREIGN KEY([postid])
REFERENCES [dbo].[BLOG_POSTS] ([postid])
GO
ALTER TABLE [dbo].[BLOG_COMMENTS] CHECK CONSTRAINT [FK_BLOG_COMMENTS_BLOG_POSTS]
GO
ALTER TABLE [dbo].[BLOG_POSTS] WITH CHECK ADD CONSTRAINT [FK_BLOG_POSTS_BLOG_CATEGORIES] FOREIGN KEY([categoryid])
REFERENCES [dbo].[BLOG_CATEGORIES] ([categoryid])
GO
ALTER TABLE [dbo].[BLOG_POSTS] CHECK CONSTRAINT [FK_BLOG_POSTS_BLOG_CATEGORIES]
GO
반응형
'Program > ASP.NET' 카테고리의 다른 글
VS 2008을 이용한 블로그 프로그래밍 - Part10 (0) | 2009.06.16 |
---|---|
VS 2008을 이용한 블로그 프로그래밍 - Part9 (0) | 2009.06.16 |
VS 2008을 이용한 블로그 프로그래밍 - Part8 (0) | 2009.06.16 |
VS 2008을 이용한 블로그 프로그래밍 - Part7 (0) | 2009.06.16 |
VS 2008을 이용한 블로그 프로그래밍 - Part6 (0) | 2009.06.16 |