資源簡介
【實例簡介】
改良版迷你微博
【核心代碼】
USE [WeiBoDb]
GO
/****** Object: Table [dbo].[Z_MESSAGE] Script Date: 2015/4/21 10:39:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Z_MESSAGE](
[msg_id] [int] IDENTITY(1,1) NOT NULL,
[user_id] [int] NOT NULL,
[msg_content] [nvarchar](140) NOT NULL,
[reply_count] [int] NOT NULL,
[post_time] [datetime] NOT NULL,
CONSTRAINT [PK_Z_MESSAGE] PRIMARY KEY CLUSTERED
(
[msg_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 [dbo].[Z_REPLY] Script Date: 2015/4/21 10:39:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Z_REPLY](
[reply_id] [int] IDENTITY(1,1) NOT NULL,
[msg_id] [int] NOT NULL,
[reply_user_id] [int] NOT NULL,
[src_user_id] [int] NOT NULL,
[reply_content] [nvarchar](140) NULL,
[reply_time] [datetime] NOT NULL,
CONSTRAINT [PK_Z_REPLY] PRIMARY KEY CLUSTERED
(
[reply_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 [dbo].[Z_USER] Script Date: 2015/4/21 10:39:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Z_USER](
[user_id] [int] IDENTITY(1,1) NOT NULL,
[user_name] [nvarchar](50) NOT NULL,
[user_login] [varchar](50) NOT NULL,
[user_password] [varchar](20) NOT NULL,
[user_sex] [varchar](2) NOT NULL,
[user_photo] [image] NULL,
[user_email] [varchar](32) NULL,
[regist_time] [datetime] NOT NULL,
[user_address] [nvarchar](64) NULL,
[user_birthday] [datetime] NULL,
[user_telephone] [varchar](16) NULL,
[home_url] [varchar](20) NOT NULL,
[user_info] [nvarchar](64) NULL,
CONSTRAINT [PK_Z_USER] PRIMARY KEY CLUSTERED
(
[user_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
SET ANSI_PADDING ON
GO
/****** Object: Table [dbo].[Z_USER_FUN] Script Date: 2015/4/21 10:39:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Z_USER_FUN](
[fun_id] [int] IDENTITY(1,1) NOT NULL,
[user_id] [int] NOT NULL,
[fun_user_id] [int] NOT NULL,
CONSTRAINT [PK_Z_USER_FUN] PRIMARY KEY CLUSTERED
(
[fun_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 [dbo].[Z_MESSAGE] ADD CONSTRAINT [DF_Z_MESSAGE_post_time] DEFAULT (getdate()) FOR [post_time]
GO
ALTER TABLE [dbo].[Z_REPLY] ADD CONSTRAINT [DF_Z_REPLY_reply_time] DEFAULT (getdate()) FOR [reply_time]
GO
ALTER TABLE [dbo].[Z_USER] ADD CONSTRAINT [DF_Z_USER_regist_time] DEFAULT (getdate()) FOR [regist_time]
GO
ALTER TABLE [dbo].[Z_REPLY] WITH CHECK ADD CONSTRAINT [FK_Z_REPLY_Z_MESSAGE] FOREIGN KEY([msg_id])
REFERENCES [dbo].[Z_MESSAGE] ([msg_id])
GO
ALTER TABLE [dbo].[Z_REPLY] CHECK CONSTRAINT [FK_Z_REPLY_Z_MESSAGE]
GO
ALTER TABLE [dbo].[Z_USER_FUN] WITH CHECK ADD CONSTRAINT [FK_Z_USER_FUN_Z_USER] FOREIGN KEY([user_id])
REFERENCES [dbo].[Z_USER] ([user_id])
GO
ALTER TABLE [dbo].[Z_USER_FUN] CHECK CONSTRAINT [FK_Z_USER_FUN_Z_USER]
GO
ALTER TABLE [dbo].[Z_USER_FUN] WITH CHECK ADD CONSTRAINT [FK_Z_USER_FUN_Z_USER1] FOREIGN KEY([fun_user_id])
REFERENCES [dbo].[Z_USER] ([user_id])
GO
ALTER TABLE [dbo].[Z_USER_FUN] CHECK CONSTRAINT [FK_Z_USER_FUN_Z_USER1]
GO
代碼片段和文件信息
-----------?---------??----------?-----??----
?????目錄???????????0??2015-03-31?14:27??Myweb\
?????目錄???????????0??2015-03-31?15:04??Myweb\html\
?????目錄???????????0??2015-03-31?13:58??Myweb\html\1.files\
?????文件?????????314??2015-03-31?11:00??Myweb\html\1.files\colorschememapping.xm
?????文件?????????267??2015-03-31?11:00??Myweb\html\1.files\filelist.xm
?????文件????????1788??2015-03-31?11:00??Myweb\html\1.files\header.html
?????文件??????116857??2015-03-31?11:00??Myweb\html\1.files\image001.gif
?????文件????????3100??2015-03-31?11:00??Myweb\html\1.files\themedata.thmx
?????文件???????28160??2015-03-31?14:27??Myweb\html\1.html
?????目錄???????????0??2015-03-31?13:58??Myweb\html\2..files\
?????文件?????????314??2015-03-31?10:54??Myweb\html\2..files\colorschememapping.xm
?????文件?????????234??2015-03-31?10:54??Myweb\html\2..files\filelist.xm
?????文件????????1788??2015-03-31?10:54??Myweb\html\2..files\header.htm
?????文件????????3100??2015-03-31?10:54??Myweb\html\2..files\themedata.thmx
?????文件??????138087??2015-03-31?14:36??Myweb\html\2..htm
?????目錄???????????0??2015-03-31?13:58??Myweb\html\3.files\
?????文件?????????314??2015-03-31?11:19??Myweb\html\3.files\colorschememapping.xm
?????文件?????????361??2015-03-31?11:19??Myweb\html\3.files\filelist.xm
?????文件????????1787??2015-03-31?11:19??Myweb\html\3.files\header.htm
?????文件??????106540??2015-03-31?11:19??Myweb\html\3.files\image001.jpg
?????文件???????98344??2015-03-31?11:19??Myweb\html\3.files\image003.png
?????文件???????41886??2015-03-31?11:19??Myweb\html\3.files\image005.jpg
?????文件???????12989??2015-03-31?11:19??Myweb\html\3.files\image006.jpg
?????文件????????3087??2015-03-31?11:19??Myweb\html\3.files\themedata.thmx
?????文件???????27396??2015-03-31?11:19??Myweb\html\3.htm
?????目錄???????????0??2015-03-31?14:37??Myweb\html\4.files\
?????文件?????????314??2015-03-31?14:37??Myweb\html\4.files\colorschememapping.xm
?????文件????????2707??2015-03-31?14:37??Myweb\html\4.files\editdata.mso
?????文件?????????329??2015-03-31?14:37??Myweb\html\4.files\filelist.xm
?????文件????????1714??2015-03-31?14:37??Myweb\html\4.files\header.htm
?????文件?????????218??2015-03-31?14:37??Myweb\html\4.files\item0007.xm
............此處省略52個文件信息
評論
共有 條評論