用SQLserver语句建立一个高校科研管理系统
时间: 2023-07-18 18:27:15 浏览: 150
好的,我将提供一个简单的高校科研管理系统的SQL Server建表示例,包括用户表、项目表、论文表和成果表。
1. 用户表
```
CREATE TABLE [dbo].[User](
[UserID] [int] NOT NULL, -- 用户ID
[UserName] [nvarchar](50) NOT NULL, -- 用户名
[Gender] [nvarchar](10) NOT NULL, -- 性别
[Title] [nvarchar](50) NOT NULL, -- 职称
[Department] [nvarchar](50) NOT NULL, -- 所属部门
[ContactInfo] [nvarchar](50) NOT NULL, -- 联系方式
[Role] [nvarchar](50) NOT NULL, -- 用户角色
CONSTRAINT [PK_User] 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]
```
2. 项目表
```
CREATE TABLE [dbo].[Project](
[ProjectID] [int] NOT NULL, -- 项目ID
[ProjectName] [nvarchar](50) NOT NULL, -- 项目名称
[Principal] [nvarchar](50) NOT NULL, -- 项目负责人
[Member] [nvarchar](max) NOT NULL, -- 项目成员
[Funding] [decimal](18, 2) NOT NULL, -- 项目经费
[Status] [nvarchar](50) NOT NULL, -- 项目状态
CONSTRAINT [PK_Project] PRIMARY KEY CLUSTERED
(
[ProjectID] 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]
```
3. 论文表
```
CREATE TABLE [dbo].[Paper](
[PaperID] [int] NOT NULL, -- 论文ID
[PaperTitle] [nvarchar](50) NOT NULL, -- 论文标题
[Author] [nvarchar](max) NOT NULL, -- 作者
[Journal] [nvarchar](50) NOT NULL, -- 期刊名称
[SubmissionTime] [datetime] NOT NULL, -- 投稿时间
[ReviewStatus] [nvarchar](50) NOT NULL, -- 审稿状态
CONSTRAINT [PK_Paper] PRIMARY KEY CLUSTERED
(
[PaperID] 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]
```
4. 成果表
```
CREATE TABLE [dbo].[Achievement](
[AchievementID] [int] NOT NULL, -- 成果ID
[AchievementName] [nvarchar](50) NOT NULL, -- 成果名称
[AchievementType] [nvarchar](50) NOT NULL, -- 成果类型
[Principal] [nvarchar](50) NOT NULL, -- 成果负责人
[Member] [nvarchar](max) NOT NULL, -- 成果成员
[Award] [nvarchar](50) NOT NULL, -- 成果获奖情况
CONSTRAINT [PK_Achievement] PRIMARY KEY CLUSTERED
(
[AchievementID] 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]
```
以上是一个简单的高校科研管理系统的SQL Server建表示例,具体实现还需要根据实际情况进行调整和完善。
阅读全文