MySchool
USE [MySchool]
GO
/****** Object: Table [dbo].[Grade] Script Date: 08/06/2014 15:03:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Grade](
[GradeId] [int] IDENTITY(1,1) NOT NULL,
[GradeName] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_Grade_1] PRIMARY KEY CLUSTERED
(
[GradeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [IX_Grade_GradeName] UNIQUE NONCLUSTERED
(
[GradeId] 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 IDENTITY_INSERT [dbo].[Grade] ON
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (1, N'S1')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (2, N'S2')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (3, N'Y2')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (4, N'精英班')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (11, N'zhanan')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (12, N'S1288无敌班')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (13, N'高一二班')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (14, N'高一三班')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (15, N'高一一班')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (16, N'高一1班')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (17, N'高一2班')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (18, N'高一3班')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (19, N'aa')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (20, N'mine')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (21, N'mine')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (22, N'mine')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (23, N'mine')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (26, N'无敌S2214')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (27, N'无敌S2214')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (28, N'好人2214')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (30, N'aa')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (31, N'bb')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (32, N'cc')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (33, N'dd')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (34, N'S2216')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (48, N'S2216第二个班')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (49, N'S2216终结版')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (51, N'JDBC测试啊啊啊啊')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (52, N'JDBC测试啊啊啊啊2')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (53, N'JDBC测试啊啊啊啊2')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (54, N'DBC啊速度速度')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (55, N'DBC阿萨德完全')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (56, N'DBC阿萨德完全')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (57, N'DBC阿萨德完全')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (58, N'aa')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (59, N'bb')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (60, N'aaa''')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (61, N'ccc')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (62, N'')
INSERT [dbo].[Grade] ([GradeId], [GradeName]) VALUES (63, N's1')
SET IDENTITY_INSERT [dbo].[Grade] OFF
/****** Object: Table [dbo].[Subject] Script Date: 08/06/2014 15:03:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Subject](
[SubjectId] [int] IDENTITY(1,1) NOT NULL,
[SubjectName] [nchar](10) NOT NULL,
[ClassHour] [int] NULL,
[GradeId] [int] NOT NULL,
CONSTRAINT [PK_Subject] PRIMARY KEY CLUSTERED
(
[SubjectId] 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 IDENTITY_INSERT [dbo].[Subject] ON
INSERT [dbo].[Subject] ([SubjectId], [SubjectName], [ClassHour], [GradeId]) VALUES (1, N'oop ', 78, 1)
INSERT [dbo].[Subject] ([SubjectId], [SubjectName], [ClassHour], [GradeId]) VALUES (2, N'java ', 67, 2)
INSERT [dbo].[Subject] ([SubjectId], [SubjectName], [ClassHour], [GradeId]) VALUES (3, N'C# ', 78, 3)
INSERT [dbo].[Subject] ([SubjectId], [SubjectName], [ClassHour], [GradeId]) VALUES (4, N'分层开发 ', 24, 2)
SET IDENTITY_INSERT [dbo].[Subject] OFF
/****** Object: Table [dbo].[Student] Script Date: 08/06/2014 15:03:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Student](
[StudentNo] [int] IDENTITY(1000,1) NOT NULL,
[LoginPwd] [nvarchar](50) NOT NULL,
[StudentName] [nvarchar](50) NOT NULL,
[Gender] [char](1) NULL,
[GradeId] [int] NOT NULL,
[Phone] [nvarchar](255) NULL,
[Address] [nvarchar](255) NULL,
[Birthday] [datetime] NULL,
[Email] [nvarchar](50) NULL,
[MyTT] [int] NULL,
CONSTRAINT [PK_Student] PRIMARY KEY CLUSTERED
(
[StudentNo] 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
SET IDENTITY_INSERT [dbo].[Student] ON
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23, N'', N'灰太狼2222', N'', 2, N'', N'中国平安啊啊', CAST(0x0000759800000000 AS DateTime), N'好@3', 1)
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23213, N'', N'李金香好人', N'', 3, N'13835231533/13503542995', N'北京海淀区北宫门', CAST(0x0000759800000000 AS DateTime), N'1@3', NULL)
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23219, N'', N'美洋洋222', N'', 2, N'', N'北京市海淀区', CAST(0x000081D500000000 AS DateTime), N'1@3', NULL)
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23225, N'', N'张靓颖', N'', 2, N'', N'北京市海淀区', CAST(0x0000A1E5009B6025 AS DateTime), N'1@3', NULL)
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23268, N'', N'张玲', N'', 2, N'', N'北京', CAST(0x0000A0BA011CBBCC AS DateTime), N'1@3', NULL)
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23270, N'', N'李小龙', N'', 2, NULL, N'武汉', CAST(0x0000A227011C8BC0 AS DateTime), N'1@3', NULL)
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23311, N'', N'微冷的雨', N'', 1, N'', N'', CAST(0x0000A2D000C38D54 AS DateTime), N'yymqqc@126.com', NULL)
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23316, N'', N'习小平', N'', 4, N'010-1234567', N'北京人民大会堂', CAST(0x00008D8900FBB008 AS DateTime), N'xinjinping@126.com', NULL)
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23317, N'', N'', N'', 1, N'', N'', CAST(0x0000A2F000FCE310 AS DateTime), N'@', NULL)
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23318, N'', N'习小平222', N'', 4, N'', N'北京任命', CAST(0x0000A2F000FD4DB4 AS DateTime), N'yymqqc@126.com', NULL)
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23322, N'', N'张靓颖', N'', 1, N'010-123', N'中国', CAST(0x0000A2FE00A0C0BC AS DateTime), N'zly@', 11)
INSERT [dbo].[Student] ([StudentNo], [LoginPwd], [StudentName], [Gender], [GradeId], [Phone], [Address], [Birthday], [Email], [MyTT]) VALUES (23323, N'', N'张靓颖', N'', 1, N'010-123', N'中国', CAST(0x0000A2FE00A0C0BC AS DateTime), N'zly@', 11)
SET IDENTITY_INSERT [dbo].[Student] OFF
/****** Object: Table [dbo].[Result] Script Date: 08/06/2014 15:03:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Result](
[StudentNo] [int] NOT NULL,
[SubjectId] [int] NOT NULL,
[StudentResult] [int] NOT NULL,
[ExamDate] [datetime] NOT NULL,
[Id] [int] IDENTITY(1,1) NOT NULL,
CONSTRAINT [PK_Result] PRIMARY KEY CLUSTERED
(
[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
SET IDENTITY_INSERT [dbo].[Result] ON
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23219, 2, 92, CAST(0x0000A215010D13FC AS DateTime), 1)
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23213, 1, 58, CAST(0x00009C8200000000 AS DateTime), 2)
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23213, 1, 92, CAST(0x0000A215010D13FC AS DateTime), 3)
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23219, 2, 82, CAST(0x00009C9D00000000 AS DateTime), 4)
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23231, 1, 93, CAST(0x0000A1ED009052E0 AS DateTime), 5)
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23231, 2, 97, CAST(0x0000A1ED00905C40 AS DateTime), 6)
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23213, 1, 96, CAST(0x00009C7F00000000 AS DateTime), 9)
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23213, 2, 93, CAST(0x00009C7F00000000 AS DateTime), 10)
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23225, 1, 62, CAST(0x0000A215010D13FC AS DateTime), 11)
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23225, 2, 48, CAST(0x0000A215010D27E8 AS DateTime), 12)
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23225, 3, 98, CAST(0x0000A2DA00C441CC AS DateTime), 16)
INSERT [dbo].[Result] ([StudentNo], [SubjectId], [StudentResult], [ExamDate], [Id]) VALUES (23213, 3, 98, CAST(0x0000A2DB00CAB4F8 AS DateTime), 17)
SET IDENTITY_INSERT [dbo].[Result] OFF
/****** Object: Default [DF_Student_GradeId] Script Date: 08/06/2014 15:03:17 ******/
ALTER TABLE [dbo].[Student] ADD CONSTRAINT [DF_Student_GradeId] DEFAULT ((1)) FOR [GradeId]
GO
/****** Object: Check [CK_Student_Birthday] Script Date: 08/06/2014 15:03:17 ******/
ALTER TABLE [dbo].[Student] WITH CHECK ADD CONSTRAINT [CK_Student_Birthday] CHECK (([BirthDay]>'1970-01-01'))
GO
ALTER TABLE [dbo].[Student] CHECK CONSTRAINT [CK_Student_Birthday]
GO
/****** Object: Check [CK_Student_Email] Script Date: 08/06/2014 15:03:17 ******/
ALTER TABLE [dbo].[Student] WITH CHECK ADD CONSTRAINT [CK_Student_Email] CHECK (([Email] like '%@%'))
GO
ALTER TABLE [dbo].[Student] CHECK CONSTRAINT [CK_Student_Email]
GO
/****** Object: Check [CK_Student_Gender] Script Date: 08/06/2014 15:03:17 ******/
ALTER TABLE [dbo].[Student] WITH CHECK ADD CONSTRAINT [CK_Student_Gender] CHECK (([Gender]=(0) OR [Gender]=''))
GO
ALTER TABLE [dbo].[Student] CHECK CONSTRAINT [CK_Student_Gender]
GO
/****** Object: Check [CK_Student_LoginPwd] Script Date: 08/06/2014 15:03:17 ******/
ALTER TABLE [dbo].[Student] WITH CHECK ADD CONSTRAINT [CK_Student_LoginPwd] CHECK ((len([LoginPwd])>=(6)))
GO
ALTER TABLE [dbo].[Student] CHECK CONSTRAINT [CK_Student_LoginPwd]
GO
/****** Object: Check [CK_studentname] Script Date: 08/06/2014 15:03:17 ******/
ALTER TABLE [dbo].[Student] WITH CHECK ADD CONSTRAINT [CK_studentname] CHECK (([studentname] IS NOT NULL))
GO
ALTER TABLE [dbo].[Student] CHECK CONSTRAINT [CK_studentname]
GO
/****** Object: Check [CK_Result_StudentResult] Script Date: 08/06/2014 15:03:17 ******/
ALTER TABLE [dbo].[Result] WITH CHECK ADD CONSTRAINT [CK_Result_StudentResult] CHECK (([StudentResult]>=(0) AND [Studentresult]<=(100)))
GO
ALTER TABLE [dbo].[Result] CHECK CONSTRAINT [CK_Result_StudentResult]
GO
/****** Object: ForeignKey [FK_Student_GradeId] Script Date: 08/06/2014 15:03:17 ******/
ALTER TABLE [dbo].[Student] WITH CHECK ADD CONSTRAINT [FK_Student_GradeId] FOREIGN KEY([GradeId])
REFERENCES [dbo].[Grade] ([GradeId])
GO
ALTER TABLE [dbo].[Student] CHECK CONSTRAINT [FK_Student_GradeId]
GO
/****** Object: ForeignKey [FK_Subject_Grade] Script Date: 08/06/2014 15:03:17 ******/
ALTER TABLE [dbo].[Subject] WITH CHECK ADD CONSTRAINT [FK_Subject_Grade] FOREIGN KEY([GradeId])
REFERENCES [dbo].[Grade] ([GradeId])
GO
ALTER TABLE [dbo].[Subject] CHECK CONSTRAINT [FK_Subject_Grade]
GO
/****** Object: ForeignKey [FK_Result_Subject] Script Date: 08/06/2014 15:03:17 ******/
ALTER TABLE [dbo].[Result] WITH CHECK ADD CONSTRAINT [FK_Result_Subject] FOREIGN KEY([SubjectId])
REFERENCES [dbo].[Subject] ([SubjectId])
GO
ALTER TABLE [dbo].[Result] CHECK CONSTRAINT [FK_Result_Subject]
GO
MySchool的更多相关文章
- 优化MySchool数据库设计之【巅峰对决】
优化MySchool数据库设计 之独孤九剑 船舶停靠在港湾是很安全的,但这不是造船的目的 By:北大青鸟五道口原玉明老师 1.学习方法: 01.找一本好书 初始阶段不适合,可以放到第二个阶段,看到知识 ...
- 优化MySchool数据库设计总结
数据库的设计 一:什么是数据库设计? 数据库设计就是将数据库中的数据实体以及这些数据实体之间的关系,进行规范和结构化的过程. 二:为什么要实施数据库设计? 1:良好的数据库设计可以有效的解决数据冗 ...
- 分层开发(MySchool总结)
由于分层之间存在各层之间的关系窗体之间的方法跳转,故有需要者可以进行下载本地文件 MySchool.rar 3304KB 5/22/2016 9:43:28 AM ,代码中有注释, 上述代码,属个人所 ...
- 学员信息录入(StuInfoManager) 用分层实现(既MySchool后的一个案例)
数据库 数据表名 Student 中文表名 学员信息表 字段显示 字段名 数据类型 字段大小 备注和说明 编号 stu_id int 主键,自增1 学生姓名 stu_name varchar 50 不 ...
- 分层开发MySchool总结
由于分层之间存在各层之间的关系窗体之间的方法跳转,故有需要者可以进行下载本地文件 MySchool.rar 3304KB 5/22/2016 9:43:28 AM ,代码中有注释,
- C#分层开发MySchool
分层开发之MYSCHOOL No.1实现登陆功能,验证用户名和密码.从数据库里进行匹配,看是否有符合要求的数据. 在DAL层编写代码,返回值为布尔类型.方法参数为(student实体类对象),使用参数 ...
- Myschool乱码问题 和mysql 备份还原
show variables like 'character_set%'; alter table users modify username ) character set gbk; alter t ...
- WinForm窗体项目 之 MySchool管理系统终极版
学习WinForm窗体程序也有一段时间了,今天就来尝试着来一个项目热热身~ 在我们通常使用的MySchool管理中,不外乎这几种功能:增.删.改.查.改密码 在过去的C#中确实是挺简单的,但是在学习了 ...
- MySchool题目
题目: 1.查询所有学生记录,包含年级名称2.查询S1年级下的学生记录 一.项目目录 二.com.myschool.dao 2.1 BaseDao package com.myschool.dao; ...
随机推荐
- C#生成条形码 Code128算法
条形有很多种,Code128是比较常用的一种,是一种高密度条码, CODE128 码可表示从 ASCII 0 到ASCII 127 共128个字符,故称128码.其中包含了数字.字母和符号字符. Co ...
- [WCF REST] Web消息主体风格(Message Body Style)
对于Web HTTP编程模型来说,服务契约中作为操作的方法无须应用OperationContractAttribute特性,只需要根据需要应用WebGetAttribute与WebInvokeAttr ...
- 读书笔记2014第6本:《The Hunger Games》
以前从未读过一本完整的英文小说,所有就在今年的读书目标中增加了一本英文小说,但在头四个月内一直没有下定决定读哪一本.一次偶然从SUN的QQ空间中看到Mockingjay,说是不错的英文小说,好像已经是 ...
- Android 计算布局背景的透明度
1.#ff000000 此为16进制颜色代码,前2位ff为透明度,后6位为颜色值(000000为黑色,ffffff为白色,可以用ps等软件获取). 2.透明度分为256阶(0-255),计算机上用16 ...
- Jeff Somers's N Queens Solutions 最快的n皇后算法
/* Jeff Somers * * Copyright (c) 2002 * * jsomers@alumni.williams.edu * or * allagash98@yahoo.com * ...
- 【读书笔记】iOS网络-HTTP-URL百分号编码
代码: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, ty ...
- 解析plist文件(字典里包着数组,数组中又包含字典)
#import "RootTableViewController.h" #import "City.h" @interface RootTableViewCon ...
- Cocos2d入门--3--向量的应用
*:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...
- java网络---基本web概念
首先需要搞清楚web中的3个关键概念. 一.HTTP,HTML,URL. HTML 全称是Hypertext Markup Language,是用来描述一个网页的语言.或者说,该语言是用来描述网页的“ ...
- windows 2008 r2 下面搭建 iis+sql server +php5.6 环境遇见的一些问题记录一下
由于web服务器以前在iis下部署有几个网站,现在这个项目开发又是用的php,本来php+mysql+iis应该很简单随便在网上能搜索出来很多,但是,由于以前那个web网站是用的sqlserver数据 ...