├── .gitattributes
├── .gitignore
├── Csharp
├── CRUD
│ ├── CRUD.sln
│ ├── CRUD
│ │ ├── App.config
│ │ ├── CRUD.csproj
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── MrDavidDataSet.Designer.cs
│ │ ├── MrDavidDataSet.xsc
│ │ ├── MrDavidDataSet.xsd
│ │ ├── MrDavidDataSet.xss
│ │ ├── Program.cs
│ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ ├── UI.jpg
│ └── readme.md
├── Calculator
│ ├── Calculator.sln
│ ├── Calculator
│ │ ├── App.config
│ │ ├── Calculator.csproj
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Program.cs
│ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ ├── Readme.md
│ └── calculator.jpg
├── Curricula_Variable_System
│ ├── Curricula_Variable_System.sln
│ ├── Curricula_Variable_System
│ │ ├── App.config
│ │ ├── Curricula_Variable_System.csproj
│ │ ├── Login.Designer.cs
│ │ ├── Login.cs
│ │ ├── Login.resx
│ │ ├── Main.Designer.cs
│ │ ├── Main.cs
│ │ ├── Main.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── Register.Designer.cs
│ │ ├── Register.cs
│ │ ├── Register.resx
│ │ ├── curricula_variable_systemDataSet.Designer.cs
│ │ ├── curricula_variable_systemDataSet.xsc
│ │ ├── curricula_variable_systemDataSet.xsd
│ │ └── curricula_variable_systemDataSet.xss
│ ├── DB-table-trigger.sql
│ └── ReadMe.md
├── DBdemo
│ ├── DBdemo.sln
│ ├── DBdemo
│ │ ├── App.config
│ │ ├── DBdemo.csproj
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── TestDataSet.Designer.cs
│ │ ├── TestDataSet.xsc
│ │ ├── TestDataSet.xsd
│ │ └── TestDataSet.xss
│ ├── readme.md
│ └── ui.jpg
├── Login
│ ├── Login.sln
│ ├── Login
│ │ ├── App.config
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Form2.Designer.cs
│ │ ├── Form2.cs
│ │ ├── Login.csproj
│ │ ├── Program.cs
│ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ ├── Pic1.jpg
│ ├── Pic2.jpg
│ ├── Pic3.jpg
│ └── ReadMe.md
├── MD5_test
│ ├── MD5_test.sln
│ ├── MD5_test
│ │ ├── App.config
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── MD5_test.csproj
│ │ ├── Program.cs
│ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ ├── QQ截图20190617193429.png
│ ├── readme.md
│ └── usertable.jpg
├── ReadMe.md
├── School
│ ├── ReadMe.md
│ ├── School.sln
│ ├── School
│ │ ├── App.config
│ │ ├── FormAbout.Designer.cs
│ │ ├── FormAbout.cs
│ │ ├── FormAbout.resx
│ │ ├── FormCourse.Designer.cs
│ │ ├── FormCourse.cs
│ │ ├── FormCourse.resx
│ │ ├── FormMain.Designer.cs
│ │ ├── FormMain.cs
│ │ ├── FormMain.resx
│ │ ├── FormSC.Designer.cs
│ │ ├── FormSC.cs
│ │ ├── FormSC.resx
│ │ ├── FormStudent.Designer.cs
│ │ ├── FormStudent.cs
│ │ ├── FormStudent.resx
│ │ ├── MrDavidDataSet.Designer.cs
│ │ ├── MrDavidDataSet.xsc
│ │ ├── MrDavidDataSet.xsd
│ │ ├── MrDavidDataSet.xss
│ │ ├── Pic
│ │ │ ├── g1.ico
│ │ │ ├── 关于我们.png
│ │ │ ├── 关闭.png
│ │ │ ├── 学生.png
│ │ │ ├── 读书.png
│ │ │ ├── 课程.png
│ │ │ └── 选课.png
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ ├── Settings.settings
│ │ │ └── hbu.png
│ │ └── School.csproj
│ └── school_UI.jpg
└── VerificationCode
│ ├── VerificationCode.sln
│ └── VerificationCode
│ ├── App.config
│ ├── Form1.Designer.cs
│ ├── Form1.cs
│ ├── Form1.resx
│ ├── Program.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
│ └── VerificationCode.csproj
├── CsharpDB
├── C#数据库编程案例.pdf
├── CRUD
│ ├── CRUD.sln
│ ├── CRUD
│ │ ├── App.config
│ │ ├── CRUD.csproj
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── MrDavidDataSet.Designer.cs
│ │ ├── MrDavidDataSet.xsc
│ │ ├── MrDavidDataSet.xsd
│ │ ├── MrDavidDataSet.xss
│ │ ├── Program.cs
│ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ ├── UI.jpg
│ └── readme.md
├── ComboxTest
│ ├── ComboxTest.sln
│ ├── ComboxTest
│ │ ├── App.config
│ │ ├── ComboxTest.csproj
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Program.cs
│ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ └── ReadMe.md
├── DBdemo
│ ├── DBdemo.sln
│ └── DBdemo
│ │ ├── App.config
│ │ ├── DBdemo.csproj
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── TestDataSet.Designer.cs
│ │ ├── TestDataSet.xsc
│ │ ├── TestDataSet.xsd
│ │ └── TestDataSet.xss
├── ER1.jpg
├── Histogram
│ ├── EW
│ │ ├── EW.sln
│ │ └── EW
│ │ │ ├── App.config
│ │ │ ├── EW.csproj
│ │ │ ├── Form1.Designer.cs
│ │ │ ├── Form1.cs
│ │ │ ├── Form1.resx
│ │ │ ├── Program.cs
│ │ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ ├── Fengyanchao
│ │ ├── 124PPS090309_Feng
│ │ │ ├── 2005_05_20.txt
│ │ │ ├── LearnIing6.clw
│ │ │ ├── LearnIing6.cpp
│ │ │ ├── LearnIing6.dsp
│ │ │ ├── LearnIing6.dsw
│ │ │ ├── LearnIing6.h
│ │ │ ├── LearnIing6.rc
│ │ │ ├── LearnIing6.sln
│ │ │ ├── LearnIing6.vcxproj
│ │ │ ├── LearnIing6.vcxproj.filters
│ │ │ ├── LearnIing6Doc.cpp
│ │ │ ├── LearnIing6Doc.h
│ │ │ ├── LearnIing6View.cpp
│ │ │ ├── LearnIing6View.h
│ │ │ ├── MainFrm.cpp
│ │ │ ├── MainFrm.h
│ │ │ ├── ReadMe.txt
│ │ │ ├── StdAfx.cpp
│ │ │ ├── StdAfx.h
│ │ │ ├── TableName.cpp
│ │ │ ├── TableName.h
│ │ │ ├── res
│ │ │ │ ├── LearnIing6.ico
│ │ │ │ ├── LearnIing6.rc2
│ │ │ │ ├── LearnIing6Doc.ico
│ │ │ │ ├── Toolbar.bmp
│ │ │ │ ├── icon1.ico
│ │ │ │ └── icon2.ico
│ │ │ └── resource.h
│ │ └── PPS090402_Feng
│ │ │ ├── 2005_05_20.txt
│ │ │ ├── 2005_05_22.txt
│ │ │ ├── LearnIing6.clw
│ │ │ ├── LearnIing6.cpp
│ │ │ ├── LearnIing6.dsp
│ │ │ ├── LearnIing6.dsw
│ │ │ ├── LearnIing6.h
│ │ │ ├── LearnIing6.sln
│ │ │ ├── LearnIing6.vcxproj
│ │ │ ├── LearnIing6.vcxproj.filters
│ │ │ ├── StdAfx.cpp
│ │ │ └── StdAfx.h
│ ├── SelectivityEstimation
│ │ ├── SelectivityEstimation.sln
│ │ └── SelectivityEstimation
│ │ │ ├── App.config
│ │ │ ├── BlockIndexDataSet.Designer.cs
│ │ │ ├── BlockIndexDataSet.xsc
│ │ │ ├── BlockIndexDataSet.xsd
│ │ │ ├── BlockIndexDataSet.xss
│ │ │ ├── Form2.Designer.cs
│ │ │ ├── Form2.cs
│ │ │ ├── Form2.resx
│ │ │ ├── FormMain.Designer.cs
│ │ │ ├── FormMain.cs
│ │ │ ├── FormMain.resx
│ │ │ ├── Program.cs
│ │ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ │ └── SelectivityEstimation.csproj
│ └── instnwnd.sql
├── ImageToDB
│ ├── 1.jpg
│ ├── ReadMe.md
│ ├── WindowsFormsApp4.sln
│ ├── WindowsFormsApp4
│ │ ├── App.config
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ └── WindowsFormsApp4.csproj
│ └── pic.png
├── LoginDemo
│ ├── LoginDemo.sln
│ ├── LoginDemo
│ │ ├── App.config
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Form2.Designer.cs
│ │ ├── Form2.cs
│ │ ├── Form2.resx
│ │ ├── Form3.Designer.cs
│ │ ├── Form3.cs
│ │ ├── Form3.resx
│ │ ├── Form4.Designer.cs
│ │ ├── Form4.cs
│ │ ├── Form4.resx
│ │ ├── LoginDemo.csproj
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── TestDataSet.Designer.cs
│ │ ├── TestDataSet.xsc
│ │ ├── TestDataSet.xsd
│ │ └── TestDataSet.xss
│ ├── ReadMe.md
│ └── picture
│ │ ├── dataset.jpg
│ │ ├── login.jpg
│ │ └── main.jpg
├── NF.doc
├── NFanswer.doc
├── NewTable
│ ├── NewTable.sln
│ └── NewTable
│ │ ├── App.config
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── NewTable.csproj
│ │ ├── Program.cs
│ │ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
├── ReadMe.md
├── SQL答案.doc
├── SQL练习题.doc
├── WindowsFormsApp1
│ ├── WindowsFormsApp1.sln
│ └── WindowsFormsApp1
│ │ ├── App.config
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Form2.Designer.cs
│ │ ├── Form2.cs
│ │ ├── Form2.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── PythonDataSet.Designer.cs
│ │ ├── PythonDataSet.xsc
│ │ ├── PythonDataSet.xsd
│ │ ├── PythonDataSet.xss
│ │ └── WindowsFormsApp1.csproj
├── WindowsFormsApp2
│ ├── WindowsFormsApp2.sln
│ └── WindowsFormsApp2
│ │ ├── App.config
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Form2.Designer.cs
│ │ ├── Form2.cs
│ │ ├── Form2.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── PythonDataSet.Designer.cs
│ │ ├── PythonDataSet.xsc
│ │ ├── PythonDataSet.xsd
│ │ ├── PythonDataSet.xss
│ │ └── WindowsFormsApp2.csproj
├── db6课后题.doc
├── 实验界面参考图
│ ├── 0.bmp
│ ├── 1.bmp
│ ├── 2.bmp
│ ├── 3.bmp
│ ├── 4.bmp
│ ├── 5.bmp
│ ├── 6.bmp
│ ├── 7.bmp
│ └── ReadMe.md
├── 标准SQL与Tsql.wps
└── 标准SQL语言与Transact-SQL的部分差异.doc
├── PPT
├── PPT2019
│ ├── DB期末复习.ppt
│ ├── DB第01章.ppt
│ ├── DB第02章.ppt
│ ├── DB第03章(1).ppt
│ ├── DB第03章(2).ppt
│ ├── DB第03章(3).ppt
│ ├── DB第04章.ppt
│ ├── DB第05章.ppt
│ ├── DB第06章.ppt
│ ├── DB第07章(1).ppt
│ ├── DB第07章(2).ppt
│ ├── DB第08章.ppt
│ ├── DB第09章.ppt
│ ├── DB第10章.ppt
│ ├── DB第11章.ppt
│ └── 候选码求解.pptx
├── PPT2020
│ ├── 2019-2020春-数据库教学日历.doc
│ ├── DB期末复习.pptx
│ ├── DB第01章-2020.pptx
│ ├── DB第02章-2020.pptx
│ ├── DB第03章(1)-2020.pptx
│ ├── DB第03章(2)-2020.pptx
│ ├── DB第03章(3)-2020.pptx
│ ├── DB第04章.pptx
│ ├── DB第05章.pptx
│ ├── DB第06章.pptx
│ ├── DB第07章(1).pptx
│ ├── DB第07章(2).pptx
│ ├── DB第08章.pptx
│ ├── DB第09章.pptx
│ ├── DB第10章.pptx
│ ├── DB第11章.pptx
│ └── 候选码求解.pptx
└── PPT2021
│ ├── 2020-2021春-数据库教学日历.doc
│ ├── DB期末复习.pptx
│ ├── DB第01章-2021.pdf
│ ├── DB第01章-2021.pptx
│ ├── DB第02章-2021.pdf
│ ├── DB第02章-2021.pptx
│ ├── DB第03章(1)-2021.pdf
│ ├── DB第03章(1)-2021.pptx
│ ├── DB第03章(2).pptx
│ ├── DB第03章(3).pptx
│ ├── DB第04章.pptx
│ ├── DB第05章.pptx
│ ├── DB第06章.pptx
│ ├── DB第07章(1).pptx
│ ├── DB第07章(2).pptx
│ ├── DB第08章.pptx
│ ├── DB第09章.pptx
│ ├── DB第10章.pptx
│ ├── DB第11章.pptx
│ └── 候选码求解.pptx
├── README.md
├── SQL
├── CREATE-INSERT
│ ├── CREATE-TABLE-Course.sql
│ ├── CREATE-TABLE-SC.sql
│ ├── CREATE-TABLE-Student.sql
│ ├── Create_Schema_Table.sql
│ ├── INSERT-INTO-Course.sql
│ ├── INSERT-INTO-SC.sql
│ ├── INSERT-INTO-Student.sql
│ ├── INSERT-INTO-Student1.sql
│ ├── OneKeyCreateDB.sql
│ └── Readme.md
├── CURSOR.sql
├── Chapter03.sql
├── GRANT-REVOKE
│ ├── CREATE_USER.sql
│ ├── E4_1.sql
│ ├── E4_2.sql
│ ├── E4_3.sql
│ ├── E4_4.sql
│ ├── E4_5.sql
│ └── E4_6_7.sql
├── INSERT-UPDATE-DELETE
│ ├── E-3.72.sql
│ ├── E-3.73.sql
│ ├── E-3.74.sql
│ ├── E-3.75.sql
│ ├── E-3.80.sql
│ └── readme.md
├── Login_With_sa .md
├── OneKeyCreateThreeTable.sql
├── PROCEDURE
│ ├── CreateProc.sql
│ ├── CreateTableAccount.sql
│ ├── ReadMe.md
│ ├── TestProc.sql
│ └── proc.jpg
├── ReadMe.md
├── SELECT
│ ├── E-3.16-3.17.sql
│ ├── E-3.18.sql
│ ├── E-3.19-20-21.sql
│ ├── E-3.22-23-24.sql
│ ├── E-3.25-26.sql
│ ├── E-3.27-28.sql
│ ├── E-3.29-3.35.sql
│ ├── E-3.36-37-38.sql
│ ├── E-3.39.sql
│ ├── E-3.40.sql
│ ├── E-3.41-3.45.sql
│ ├── E-3.46.sql
│ ├── E-3.47.sql
│ ├── E-3.48.sql
│ ├── E-3.49.sql
│ ├── E-3.50.sql
│ ├── E-3.51.sql
│ ├── E-3.52.sql
│ ├── E-3.53.sql
│ ├── E-3.54-3.55.sql
│ ├── E-3.54.sql
│ ├── E-3.55.sql
│ ├── E-3.56.sql
│ ├── E-3.57+.sql
│ ├── E-3.57.sql
│ ├── E-3.58.sql
│ ├── E-3.59.sql
│ ├── E-3.60.sql
│ ├── E-3.61.sql
│ ├── E-3.62-HARD.sql
│ ├── E-3.63-HARD.sql
│ ├── E-3.64.sql
│ └── Readme.md
├── Trigger
│ ├── E-5.22 CreateTrigger.sql
│ ├── E-5.22 CreateTriggerLogTime.sql
│ ├── E-5.22 TestTrigger.sql
│ ├── ReadMe.md
│ └── trigger.jpg
├── VIEW
│ ├── E-3.84.sql
│ ├── E-3.89.sql
│ ├── E-3.94.sql
│ └── WithCheckOption.sql
└── pic
│ ├── database.jpg
│ ├── table.jpg
│ └── user.jpg
├── SQL_Injection
├── Login
│ └── Login
│ │ ├── Login.sln
│ │ └── Login
│ │ ├── Default.aspx
│ │ ├── Default.aspx.cs
│ │ ├── Default.aspx.designer.cs
│ │ ├── Login.csproj
│ │ ├── Main.aspx
│ │ ├── Main.aspx.cs
│ │ ├── Main.aspx.designer.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── PublishProfiles
│ │ │ └── CustomProfile.pubxml
│ │ ├── Web.Debug.config
│ │ ├── Web.Release.config
│ │ ├── Web.config
│ │ ├── about.html
│ │ └── packages.config
├── Login_sql_injection
│ ├── Login_sql_injection.sln
│ └── Login_sql_injection
│ │ ├── Default.aspx
│ │ ├── Default.aspx.cs
│ │ ├── Default.aspx.designer.cs
│ │ ├── Login_sql_injection.csproj
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── Web.Debug.config
│ │ ├── Web.Release.config
│ │ ├── Web.config
│ │ └── packages.config
└── readme.md
├── _config.yml
└── database.jpg
/Csharp/CRUD/CRUD.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27130.2036
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CRUD", "CRUD\CRUD.csproj", "{922C0A61-962C-466F-8550-D8EBCD9294E9}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {922C0A61-962C-466F-8550-D8EBCD9294E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {922C0A61-962C-466F-8550-D8EBCD9294E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {922C0A61-962C-466F-8550-D8EBCD9294E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {922C0A61-962C-466F-8550-D8EBCD9294E9}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {69BC186C-3B8C-4C0F-BBC7-ADCB3486C14D}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Csharp/CRUD/CRUD/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Csharp/CRUD/CRUD/MrDavidDataSet.xsc:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Csharp/CRUD/CRUD/MrDavidDataSet.xss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Csharp/CRUD/CRUD/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace CRUD
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Csharp/CRUD/CRUD/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("CRUD")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("CRUD")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("922c0a61-962c-466f-8550-d8ebcd9294e9")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Csharp/CRUD/CRUD/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace CRUD.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
29 | [global::System.Configuration.DefaultSettingValueAttribute("Data Source=.;Initial Catalog=MrDavid;User ID=sa;Password=sql")]
30 | public string MrDavidConnectionString {
31 | get {
32 | return ((string)(this["MrDavidConnectionString"]));
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Csharp/CRUD/CRUD/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <?xml version="1.0" encoding="utf-16"?>
7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8 | <ConnectionString>Data Source=.;Initial Catalog=MrDavid;User ID=sa;Password=sql</ConnectionString>
9 | <ProviderName>System.Data.SqlClient</ProviderName>
10 | </SerializableConnectionString>
11 | Data Source=.;Initial Catalog=MrDavid;User ID=sa;Password=sql
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Csharp/CRUD/UI.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/CRUD/UI.jpg
--------------------------------------------------------------------------------
/Csharp/CRUD/readme.md:
--------------------------------------------------------------------------------
1 | 
2 |
--------------------------------------------------------------------------------
/Csharp/Calculator/Calculator.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.28729.10
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calculator", "Calculator\Calculator.csproj", "{6412A7D8-1C6D-4397-AEF9-1FF69BFAB722}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {6412A7D8-1C6D-4397-AEF9-1FF69BFAB722}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {6412A7D8-1C6D-4397-AEF9-1FF69BFAB722}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {6412A7D8-1C6D-4397-AEF9-1FF69BFAB722}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {6412A7D8-1C6D-4397-AEF9-1FF69BFAB722}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {8AE46CD5-0455-4F19-A025-9EDF80C660A3}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Csharp/Calculator/Calculator/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Csharp/Calculator/Calculator/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Calculator
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Csharp/Calculator/Calculator/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Calculator")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Calculator")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("6412a7d8-1c6d-4397-aef9-1ff69bfab722")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
33 | //通过使用 "*",如下所示:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Csharp/Calculator/Calculator/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Calculator.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Csharp/Calculator/Calculator/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Csharp/Calculator/Readme.md:
--------------------------------------------------------------------------------
1 | ### 简单计算器
2 | Tools:visual studio 2019
3 |
4 | 仅供入门学习C#桌面程序使用。
5 |
6 |
7 | 代码较为精简,但程序健壮性不够,例如:对于“错误输入”未做处理。
8 |
9 | 
10 |
--------------------------------------------------------------------------------
/Csharp/Calculator/calculator.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/Calculator/calculator.jpg
--------------------------------------------------------------------------------
/Csharp/Curricula_Variable_System/Curricula_Variable_System.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29009.5
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Curricula_Variable_System", "Curricula_Variable_System\Curricula_Variable_System.csproj", "{D6E2E358-8E71-47C9-A12E-E71BFAEC0F3D}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {D6E2E358-8E71-47C9-A12E-E71BFAEC0F3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {D6E2E358-8E71-47C9-A12E-E71BFAEC0F3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {D6E2E358-8E71-47C9-A12E-E71BFAEC0F3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {D6E2E358-8E71-47C9-A12E-E71BFAEC0F3D}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {5616D13C-7562-465C-A805-D87A81B095F7}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Csharp/Curricula_Variable_System/Curricula_Variable_System/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Csharp/Curricula_Variable_System/Curricula_Variable_System/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Curricula_Variable_System
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Login());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Csharp/Curricula_Variable_System/Curricula_Variable_System/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Curricula_Variable_System")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Curricula_Variable_System")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("d6e2e358-8e71-47c9-a12e-e71bfaec0f3d")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
33 | //通过使用 "*",如下所示:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Csharp/Curricula_Variable_System/Curricula_Variable_System/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <?xml version="1.0" encoding="utf-16"?>
7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8 | <ConnectionString>Data Source=.;Initial Catalog=curricula_variable_system;User ID=sa;Password=sql</ConnectionString>
9 | <ProviderName>System.Data.SqlClient</ProviderName>
10 | </SerializableConnectionString>
11 | Data Source=.;Initial Catalog=curricula_variable_system;User ID=sa;Password=sql
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Csharp/Curricula_Variable_System/Curricula_Variable_System/curricula_variable_systemDataSet.xsc:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Csharp/Curricula_Variable_System/DB-table-trigger.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/Curricula_Variable_System/DB-table-trigger.sql
--------------------------------------------------------------------------------
/Csharp/Curricula_Variable_System/ReadMe.md:
--------------------------------------------------------------------------------
1 | 使用说明:
2 |
3 | 在SQLserver执行SQL语句,建库建表,建触发器,一键完成。
4 |
5 | 程序说明:
6 |
7 | https://www.cnblogs.com/hbuwyg/p/11062282.html
8 |
--------------------------------------------------------------------------------
/Csharp/DBdemo/DBdemo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27130.2036
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DBdemo", "DBdemo\DBdemo.csproj", "{4BCF9A60-DDD8-4159-AAB0-7A9F9002B4E1}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {4BCF9A60-DDD8-4159-AAB0-7A9F9002B4E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {4BCF9A60-DDD8-4159-AAB0-7A9F9002B4E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {4BCF9A60-DDD8-4159-AAB0-7A9F9002B4E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {4BCF9A60-DDD8-4159-AAB0-7A9F9002B4E1}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {809BD68A-2B02-4393-BFAD-156B76793C08}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Csharp/DBdemo/DBdemo/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Csharp/DBdemo/DBdemo/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace DBdemo
12 | {
13 | public partial class Form1 : Form
14 | {
15 | public Form1()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void Form1_Load(object sender, EventArgs e)
21 | {
22 | // TODO: 这行代码将数据加载到表“testDataSet.Student”中。您可以根据需要移动或删除它。
23 | this.studentTableAdapter.Fill(this.testDataSet.Student);
24 |
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Csharp/DBdemo/DBdemo/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace DBdemo
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Csharp/DBdemo/DBdemo/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("DBdemo")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DBdemo")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("4bcf9a60-ddd8-4159-aab0-7a9f9002b4e1")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Csharp/DBdemo/DBdemo/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DBdemo.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
29 | [global::System.Configuration.DefaultSettingValueAttribute("Data Source=.;Initial Catalog=Test;Persist Security Info=True;User ID=sa;Password" +
30 | "=sql")]
31 | public string TestConnectionString {
32 | get {
33 | return ((string)(this["TestConnectionString"]));
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Csharp/DBdemo/DBdemo/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <?xml version="1.0" encoding="utf-16"?>
7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8 | <ConnectionString>Data Source=.;Initial Catalog=Test;Persist Security Info=True;User ID=sa;Password=sql</ConnectionString>
9 | <ProviderName>System.Data.SqlClient</ProviderName>
10 | </SerializableConnectionString>
11 | Data Source=.;Initial Catalog=Test;Persist Security Info=True;User ID=sa;Password=sql
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Csharp/DBdemo/DBdemo/TestDataSet.xsc:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Csharp/DBdemo/DBdemo/TestDataSet.xss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Csharp/DBdemo/readme.md:
--------------------------------------------------------------------------------
1 | 
2 |
--------------------------------------------------------------------------------
/Csharp/DBdemo/ui.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/DBdemo/ui.jpg
--------------------------------------------------------------------------------
/Csharp/Login/Login.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.28803.156
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Login", "Login\Login.csproj", "{FFA6A320-6946-414B-9753-C636C83260D8}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {FFA6A320-6946-414B-9753-C636C83260D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {FFA6A320-6946-414B-9753-C636C83260D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {FFA6A320-6946-414B-9753-C636C83260D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {FFA6A320-6946-414B-9753-C636C83260D8}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {B33BC3C8-48E1-449A-8FD4-656CB95B0B63}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Csharp/Login/Login/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Csharp/Login/Login/Form2.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace Login
2 | {
3 | partial class Form2
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
33 | this.ClientSize = new System.Drawing.Size(800, 450);
34 | this.Text = "Form2";
35 | }
36 |
37 | #endregion
38 | }
39 | }
--------------------------------------------------------------------------------
/Csharp/Login/Login/Form2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace Login
12 | {
13 | public partial class Form2 : Form
14 | {
15 | public Form2()
16 | {
17 | InitializeComponent();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Csharp/Login/Login/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Login
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Csharp/Login/Login/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Login")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Login")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("ffa6a320-6946-414b-9753-c636c83260d8")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
33 | //通过使用 "*",如下所示:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Csharp/Login/Login/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Login.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Csharp/Login/Login/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Csharp/Login/Pic1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/Login/Pic1.jpg
--------------------------------------------------------------------------------
/Csharp/Login/Pic2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/Login/Pic2.jpg
--------------------------------------------------------------------------------
/Csharp/Login/Pic3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/Login/Pic3.jpg
--------------------------------------------------------------------------------
/Csharp/Login/ReadMe.md:
--------------------------------------------------------------------------------
1 | ### 登录
2 | Tools:visual studio 2019
3 |
4 | 简单的登录实例
5 |
6 | 连接后台数据库,验证用户名和密码(假设数据库的用户表已经存在:用户 abc,密码 123)
7 |
8 | 
9 |
10 | 登录成功:
11 |
12 | 
13 |
14 | 登录失败:
15 |
16 | 
17 |
18 |
19 | SQLserver数据库新建表,并插入一条数据
20 | ```
21 | CREATE TABLE [dbo].[usertable](
22 | [userid] [nchar](10) NOT NULL,
23 | [password] [nchar](10) NOT NULL
24 | )
25 |
26 | INSERT INTO [dbo].[usertable] ([userid] ,[password])
27 | VALUES ('abc' ,'123')
28 | ```
29 |
30 | C#代码中,更改数据库连接为自己的数据库
31 | ```
32 | 例如:Data Source=.;Initial Catalog=Test;Persist Security Info=True;User ID=sa;Password=sql
33 |
--------------------------------------------------------------------------------
/Csharp/MD5_test/MD5_test.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29009.5
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MD5_test", "MD5_test\MD5_test.csproj", "{CF581D61-F819-4B98-9CCF-2F7EF7BE19FE}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {CF581D61-F819-4B98-9CCF-2F7EF7BE19FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {CF581D61-F819-4B98-9CCF-2F7EF7BE19FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {CF581D61-F819-4B98-9CCF-2F7EF7BE19FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {CF581D61-F819-4B98-9CCF-2F7EF7BE19FE}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {A6ECF26E-2F67-406F-8BFF-E338A527053C}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Csharp/MD5_test/MD5_test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Csharp/MD5_test/MD5_test/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace MD5_test
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Csharp/MD5_test/MD5_test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("MD5_test")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MD5_test")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("cf581d61-f819-4b98-9ccf-2f7ef7be19fe")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
33 | //通过使用 "*",如下所示:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Csharp/MD5_test/MD5_test/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace MD5_test.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Csharp/MD5_test/MD5_test/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Csharp/MD5_test/QQ截图20190617193429.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/MD5_test/QQ截图20190617193429.png
--------------------------------------------------------------------------------
/Csharp/MD5_test/readme.md:
--------------------------------------------------------------------------------
1 | 
2 |
--------------------------------------------------------------------------------
/Csharp/MD5_test/usertable.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/MD5_test/usertable.jpg
--------------------------------------------------------------------------------
/Csharp/ReadMe.md:
--------------------------------------------------------------------------------
1 | # C# 数据库 DEMO
2 | 编程环境:
3 | - Windows 10
4 | - Visual Studio 2019 community (C#)
5 | - SQLserver 2019 Developer edition
6 |
7 | ----------------------------
8 |
9 | 学习顺序:
10 |
11 | 1. calculator 简单计算器,熟悉 控件 和 编程。
12 |
13 | 2. Login 登录系统。学习连接数据库。
14 |
15 | 3. DBdemo 窗口显示数据库中的内容。学习通过设置数据源,在datagridview中显示数据库中的数据。
16 |
17 | 4. CRUD 学习增、删、改、查操作。 能完成这部分,已达到基本要求,也就是拿到及格分数无忧。要求对Student、course、SC三张表完成增删改查。
18 |
19 | 5. School 采用MDI窗口类型。进一步完善系统。同学们需要增加:聚集函数、分组查询、模糊查询、触发器、存储过程的使用。完成这部分可以达到优秀。
20 |
21 | 5. MD5_test 敏感数据加密,采用密文存储。例如密码需要加密存储。
22 |
23 | 6. Curricula_Variable_System 正则表达式,验证码,触发器自动记录日志,程序记录日志,MD5加密。
24 |
25 | ---------------------------------
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Csharp/School/ReadMe.md:
--------------------------------------------------------------------------------
1 | ### 选课管理系统
2 | Tools:visual studio 2019
3 |
4 | 数据库操作
5 |
6 | - 采用MDI窗体实现。
7 | - 仅制作了学生表,课程表和选课表代码类似学生表,请同学们完成。
8 | - 未涉及 聚集函数、分组查询、模糊查询、触发器、存储过程的使用,建议同学们增加这部分的操作。
9 |
10 | 
11 |
--------------------------------------------------------------------------------
/Csharp/School/School.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.28729.10
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "School", "School\School.csproj", "{F85471AC-DF0D-4EE2-BF21-99620C3E4FB9}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {F85471AC-DF0D-4EE2-BF21-99620C3E4FB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {F85471AC-DF0D-4EE2-BF21-99620C3E4FB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {F85471AC-DF0D-4EE2-BF21-99620C3E4FB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {F85471AC-DF0D-4EE2-BF21-99620C3E4FB9}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {AB713FA2-1E31-4B48-839E-5EAF302E9019}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Csharp/School/School/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Csharp/School/School/FormAbout.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace School
12 | {
13 | public partial class FormAbout : Form
14 | {
15 | public FormAbout()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void Button1_Click(object sender, EventArgs e)
21 | {
22 | this.Close();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Csharp/School/School/FormCourse.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace School
2 | {
3 | partial class FormCourse
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.SuspendLayout();
32 | //
33 | // FormCourse
34 | //
35 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37 | this.ClientSize = new System.Drawing.Size(800, 450);
38 | this.Name = "FormCourse";
39 | this.Text = "课程表";
40 | this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
41 | this.ResumeLayout(false);
42 |
43 | }
44 |
45 | #endregion
46 | }
47 | }
--------------------------------------------------------------------------------
/Csharp/School/School/FormCourse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace School
12 | {
13 | public partial class FormCourse : Form
14 | {
15 | public FormCourse()
16 | {
17 | InitializeComponent();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Csharp/School/School/FormSC.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace School
2 | {
3 | partial class FormSC
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.SuspendLayout();
32 | //
33 | // FormSC
34 | //
35 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37 | this.ClientSize = new System.Drawing.Size(800, 450);
38 | this.Name = "FormSC";
39 | this.Text = "选课表";
40 | this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
41 | this.ResumeLayout(false);
42 |
43 | }
44 |
45 | #endregion
46 | }
47 | }
--------------------------------------------------------------------------------
/Csharp/School/School/FormSC.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace School
12 | {
13 | public partial class FormSC : Form
14 | {
15 | public FormSC()
16 | {
17 | InitializeComponent();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Csharp/School/School/MrDavidDataSet.xsc:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Csharp/School/School/MrDavidDataSet.xss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Csharp/School/School/Pic/g1.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/School/School/Pic/g1.ico
--------------------------------------------------------------------------------
/Csharp/School/School/Pic/关于我们.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/School/School/Pic/关于我们.png
--------------------------------------------------------------------------------
/Csharp/School/School/Pic/关闭.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/School/School/Pic/关闭.png
--------------------------------------------------------------------------------
/Csharp/School/School/Pic/学生.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/School/School/Pic/学生.png
--------------------------------------------------------------------------------
/Csharp/School/School/Pic/读书.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/School/School/Pic/读书.png
--------------------------------------------------------------------------------
/Csharp/School/School/Pic/课程.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/School/School/Pic/课程.png
--------------------------------------------------------------------------------
/Csharp/School/School/Pic/选课.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/School/School/Pic/选课.png
--------------------------------------------------------------------------------
/Csharp/School/School/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace School
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new FormMain());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Csharp/School/School/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("School")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("School")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("f85471ac-df0d-4ee2-bf21-99620c3e4fb9")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
33 | //通过使用 "*",如下所示:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Csharp/School/School/Properties/hbu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/School/School/Properties/hbu.png
--------------------------------------------------------------------------------
/Csharp/School/school_UI.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/Csharp/School/school_UI.jpg
--------------------------------------------------------------------------------
/Csharp/VerificationCode/VerificationCode.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30011.22
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VerificationCode", "VerificationCode\VerificationCode.csproj", "{734A48E5-31FD-4D4E-BCD5-80C091003209}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {734A48E5-31FD-4D4E-BCD5-80C091003209}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {734A48E5-31FD-4D4E-BCD5-80C091003209}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {734A48E5-31FD-4D4E-BCD5-80C091003209}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {734A48E5-31FD-4D4E-BCD5-80C091003209}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {460D393B-CDE7-4F8B-8B86-ED43F67D39B1}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Csharp/VerificationCode/VerificationCode/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Csharp/VerificationCode/VerificationCode/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace VerificationCode
12 | {
13 | public partial class Form1 : Form
14 | {
15 | public Form1()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | Random random = new Random();
21 | String verificationCode = "";
22 |
23 | private void button1_Click(object sender, EventArgs e)
24 | {
25 | if (verificationCode == textBox1.Text.Trim())
26 | MessageBox.Show("Right!", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
27 | else
28 | MessageBox.Show("Wrong!", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Error);
29 | }
30 |
31 | private void button2_Click(object sender, EventArgs e)
32 | {
33 | //Ref: https://blog.csdn.net/abraham_ly/article/details/105463889
34 | verificationCode = "";
35 | for (int i = 0; i < 4; i++)
36 | {
37 | int type = random.Next(0, 2);
38 | if (type == 0)
39 | {
40 | verificationCode += ((char)random.Next(65, 91)).ToString();
41 | }
42 | else
43 | {
44 | verificationCode = verificationCode + random.Next(0, 10).ToString();
45 | }
46 | }
47 | label1.Text = verificationCode;
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Csharp/VerificationCode/VerificationCode/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace VerificationCode
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Csharp/VerificationCode/VerificationCode/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("VerificationCode")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("VerificationCode")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("734a48e5-31fd-4d4e-bcd5-80c091003209")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
33 | //通过使用 "*",如下所示:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Csharp/VerificationCode/VerificationCode/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace VerificationCode.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Csharp/VerificationCode/VerificationCode/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CsharpDB/C#数据库编程案例.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/C#数据库编程案例.pdf
--------------------------------------------------------------------------------
/CsharpDB/CRUD/CRUD.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27130.2036
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CRUD", "CRUD\CRUD.csproj", "{922C0A61-962C-466F-8550-D8EBCD9294E9}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {922C0A61-962C-466F-8550-D8EBCD9294E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {922C0A61-962C-466F-8550-D8EBCD9294E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {922C0A61-962C-466F-8550-D8EBCD9294E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {922C0A61-962C-466F-8550-D8EBCD9294E9}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {69BC186C-3B8C-4C0F-BBC7-ADCB3486C14D}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CsharpDB/CRUD/CRUD/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/CsharpDB/CRUD/CRUD/MrDavidDataSet.xsc:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CsharpDB/CRUD/CRUD/MrDavidDataSet.xss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CsharpDB/CRUD/CRUD/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace CRUD
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CsharpDB/CRUD/CRUD/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("CRUD")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("CRUD")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("922c0a61-962c-466f-8550-d8ebcd9294e9")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CsharpDB/CRUD/CRUD/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace CRUD.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
29 | [global::System.Configuration.DefaultSettingValueAttribute("Data Source=.;Initial Catalog=MrDavid;User ID=sa;Password=sql")]
30 | public string MrDavidConnectionString {
31 | get {
32 | return ((string)(this["MrDavidConnectionString"]));
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/CsharpDB/CRUD/CRUD/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <?xml version="1.0" encoding="utf-16"?>
7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8 | <ConnectionString>Data Source=.;Initial Catalog=MrDavid;User ID=sa;Password=sql</ConnectionString>
9 | <ProviderName>System.Data.SqlClient</ProviderName>
10 | </SerializableConnectionString>
11 | Data Source=.;Initial Catalog=MrDavid;User ID=sa;Password=sql
12 |
13 |
14 |
--------------------------------------------------------------------------------
/CsharpDB/CRUD/UI.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/CRUD/UI.jpg
--------------------------------------------------------------------------------
/CsharpDB/CRUD/readme.md:
--------------------------------------------------------------------------------
1 | 
2 |
--------------------------------------------------------------------------------
/CsharpDB/ComboxTest/ComboxTest.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30517.126
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComboxTest", "ComboxTest\ComboxTest.csproj", "{8CD379AC-2295-4861-98F8-FB8C0EB0B9FD}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {8CD379AC-2295-4861-98F8-FB8C0EB0B9FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {8CD379AC-2295-4861-98F8-FB8C0EB0B9FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {8CD379AC-2295-4861-98F8-FB8C0EB0B9FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {8CD379AC-2295-4861-98F8-FB8C0EB0B9FD}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {36CF2768-684D-45AF-A9E2-89D6394EFFE0}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CsharpDB/ComboxTest/ComboxTest/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CsharpDB/ComboxTest/ComboxTest/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace ComboxTest
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CsharpDB/ComboxTest/ComboxTest/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("ComboxTest")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ComboxTest")]
13 | [assembly: AssemblyCopyright("Copyright © 2021")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("8cd379ac-2295-4861-98f8-fb8c0eb0b9fd")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
33 | //通过使用 "*",如下所示:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CsharpDB/ComboxTest/ComboxTest/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ComboxTest.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CsharpDB/ComboxTest/ComboxTest/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CsharpDB/ComboxTest/ReadMe.md:
--------------------------------------------------------------------------------
1 | # 程序功能:
2 | ### 加载时,从数据库读“省”的名字,写入combox1(“省”的名字);
3 | ### combox1(“省”的名字)选项发生变化时,combox2(“市”的名字)填写内容。
4 | -------------------------------------------
5 | ### 首先要在SQLserver中完成以下操作:
6 | 1. 建立数据库 MrDavid
7 | 2. 建立基本表 city:CREATE TABLE city(P_Name nchar(10) , C_Name nchar(10) )
8 | 3. 插入内容:
9 |
10 | P_Name C_Name
11 |
12 | 河北 保定
13 | 河北 石家庄
14 | 河北 唐山
15 | 北京 东城区
16 | 北京 西城区
17 | 北京 朝阳区
18 | 天津 河东区
19 | 天津 河西区
20 |
21 | ### 注意事项:数据库连接字符串要改成自己的相应参数
22 |
--------------------------------------------------------------------------------
/CsharpDB/DBdemo/DBdemo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27130.2036
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DBdemo", "DBdemo\DBdemo.csproj", "{4BCF9A60-DDD8-4159-AAB0-7A9F9002B4E1}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {4BCF9A60-DDD8-4159-AAB0-7A9F9002B4E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {4BCF9A60-DDD8-4159-AAB0-7A9F9002B4E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {4BCF9A60-DDD8-4159-AAB0-7A9F9002B4E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {4BCF9A60-DDD8-4159-AAB0-7A9F9002B4E1}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {809BD68A-2B02-4393-BFAD-156B76793C08}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CsharpDB/DBdemo/DBdemo/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/CsharpDB/DBdemo/DBdemo/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace DBdemo
12 | {
13 | public partial class Form1 : Form
14 | {
15 | public Form1()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void Form1_Load(object sender, EventArgs e)
21 | {
22 | // TODO: 这行代码将数据加载到表“testDataSet.S”中。您可以根据需要移动或删除它。
23 | this.sTableAdapter.Fill(this.testDataSet.S);
24 |
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/CsharpDB/DBdemo/DBdemo/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace DBdemo
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CsharpDB/DBdemo/DBdemo/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("DBdemo")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DBdemo")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("4bcf9a60-ddd8-4159-aab0-7a9f9002b4e1")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CsharpDB/DBdemo/DBdemo/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DBdemo.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
29 | [global::System.Configuration.DefaultSettingValueAttribute("Data Source=.;Initial Catalog=Test;Persist Security Info=True;User ID=sa;Password" +
30 | "=sql")]
31 | public string TestConnectionString {
32 | get {
33 | return ((string)(this["TestConnectionString"]));
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/CsharpDB/DBdemo/DBdemo/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <?xml version="1.0" encoding="utf-16"?>
7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8 | <ConnectionString>Data Source=.;Initial Catalog=Test;Persist Security Info=True;User ID=sa;Password=sql</ConnectionString>
9 | <ProviderName>System.Data.SqlClient</ProviderName>
10 | </SerializableConnectionString>
11 | Data Source=.;Initial Catalog=Test;Persist Security Info=True;User ID=sa;Password=sql
12 |
13 |
14 |
--------------------------------------------------------------------------------
/CsharpDB/DBdemo/DBdemo/TestDataSet.xsc:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CsharpDB/DBdemo/DBdemo/TestDataSet.xss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CsharpDB/ER1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/ER1.jpg
--------------------------------------------------------------------------------
/CsharpDB/Histogram/EW/EW.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27703.2026
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EW", "EW\EW.csproj", "{DB7DC8F5-9D0A-4D9A-BA99-89971C900DBD}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {DB7DC8F5-9D0A-4D9A-BA99-89971C900DBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {DB7DC8F5-9D0A-4D9A-BA99-89971C900DBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {DB7DC8F5-9D0A-4D9A-BA99-89971C900DBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {DB7DC8F5-9D0A-4D9A-BA99-89971C900DBD}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {3C97E0F8-C999-4AA4-A074-54844F6D0D13}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/EW/EW/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/EW/EW/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace EW
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/EW/EW/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("EW")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("EW")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("db7dc8f5-9d0a-4d9a-ba99-89971c900dbd")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/EW/EW/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace EW.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/EW/EW/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/2005_05_20.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/2005_05_20.txt
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/LearnIing6.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/LearnIing6.cpp
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/LearnIing6.dsw:
--------------------------------------------------------------------------------
1 | Microsoft Developer Studio Workspace File, Format Version 6.00
2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
3 |
4 | ###############################################################################
5 |
6 | Project: "LearnIing6"=.\LearnIing6.dsp - Package Owner=<4>
7 |
8 | Package=<5>
9 | {{{
10 | }}}
11 |
12 | Package=<4>
13 | {{{
14 | }}}
15 |
16 | ###############################################################################
17 |
18 | Global:
19 |
20 | Package=<5>
21 | {{{
22 | }}}
23 |
24 | Package=<3>
25 | {{{
26 | }}}
27 |
28 | ###############################################################################
29 |
30 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/LearnIing6.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27703.2035
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LearnIing6", "LearnIing6.vcxproj", "{88769170-B473-4203-A37C-151C4A15135B}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x86 = Debug|x86
11 | Release|x86 = Release|x86
12 | Template|x86 = Template|x86
13 | EndGlobalSection
14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
15 | {88769170-B473-4203-A37C-151C4A15135B}.Debug|x86.ActiveCfg = Debug|Win32
16 | {88769170-B473-4203-A37C-151C4A15135B}.Debug|x86.Build.0 = Debug|Win32
17 | {88769170-B473-4203-A37C-151C4A15135B}.Release|x86.ActiveCfg = Release|Win32
18 | {88769170-B473-4203-A37C-151C4A15135B}.Release|x86.Build.0 = Release|Win32
19 | {88769170-B473-4203-A37C-151C4A15135B}.Template|x86.ActiveCfg = Template|Win32
20 | {88769170-B473-4203-A37C-151C4A15135B}.Template|x86.Build.0 = Template|Win32
21 | EndGlobalSection
22 | GlobalSection(SolutionProperties) = preSolution
23 | HideSolutionNode = FALSE
24 | EndGlobalSection
25 | GlobalSection(ExtensibilityGlobals) = postSolution
26 | SolutionGuid = {335C1345-DC07-4BB7-9016-A0CBCC040A2B}
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/LearnIing6Doc.h:
--------------------------------------------------------------------------------
1 | // LearnIing6Doc.h : interface of the CLearnIing6Doc class
2 | //
3 | /////////////////////////////////////////////////////////////////////////////
4 |
5 | #if !defined(AFX_LEARNIING6DOC_H__0E549B4C_F818_4FE4_8E39_7CE7626198CD__INCLUDED_)
6 | #define AFX_LEARNIING6DOC_H__0E549B4C_F818_4FE4_8E39_7CE7626198CD__INCLUDED_
7 |
8 | #if _MSC_VER > 1000
9 | #pragma once
10 | #endif // _MSC_VER > 1000
11 |
12 |
13 | class CLearnIing6Doc : public CDocument
14 | {
15 | protected: // create from serialization only
16 | CLearnIing6Doc();
17 | DECLARE_DYNCREATE(CLearnIing6Doc)
18 |
19 | // Attributes
20 | public:
21 |
22 | // Operations
23 | public:
24 |
25 | // Overrides
26 | // ClassWizard generated virtual function overrides
27 | //{{AFX_VIRTUAL(CLearnIing6Doc)
28 | public:
29 | virtual BOOL OnNewDocument();
30 | virtual void Serialize(CArchive& ar);
31 | //}}AFX_VIRTUAL
32 |
33 | // Implementation
34 | public:
35 | virtual ~CLearnIing6Doc();
36 | #ifdef _DEBUG
37 | virtual void AssertValid() const;
38 | virtual void Dump(CDumpContext& dc) const;
39 | #endif
40 |
41 | protected:
42 |
43 | // Generated message map functions
44 | protected:
45 | //{{AFX_MSG(CLearnIing6Doc)
46 | // NOTE - the ClassWizard will add and remove member functions here.
47 | // DO NOT EDIT what you see in these blocks of generated code !
48 | //}}AFX_MSG
49 | DECLARE_MESSAGE_MAP()
50 | };
51 |
52 | /////////////////////////////////////////////////////////////////////////////
53 |
54 | //{{AFX_INSERT_LOCATION}}
55 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
56 |
57 | #endif // !defined(AFX_LEARNIING6DOC_H__0E549B4C_F818_4FE4_8E39_7CE7626198CD__INCLUDED_)
58 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/MainFrm.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/MainFrm.cpp
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/StdAfx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // LearnIing6.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/StdAfx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #if !defined(AFX_STDAFX_H__2A2DC332_EA9E_4F87_99CF_E74840AD7BEA__INCLUDED_)
7 | #define AFX_STDAFX_H__2A2DC332_EA9E_4F87_99CF_E74840AD7BEA__INCLUDED_
8 |
9 | #if _MSC_VER > 1000
10 | #pragma once
11 | #endif // _MSC_VER > 1000
12 |
13 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
14 |
15 | #include // MFC core and standard components
16 | #include // MFC extensions
17 | #include // MFC Automation classes
18 | #include // MFC support for Internet Explorer 4 Common Controls
19 | #ifndef _AFX_NO_AFXCMN_SUPPORT
20 | #include // MFC support for Windows Common Controls
21 | #endif // _AFX_NO_AFXCMN_SUPPORT
22 |
23 |
24 | //{{AFX_INSERT_LOCATION}}
25 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
26 |
27 | #endif // !defined(AFX_STDAFX_H__2A2DC332_EA9E_4F87_99CF_E74840AD7BEA__INCLUDED_)
28 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/TableName.h:
--------------------------------------------------------------------------------
1 | #if !defined(AFX_TABLENAME_H__4E76CFCB_054C_4BB9_889E_22492615C74B__INCLUDED_)
2 | #define AFX_TABLENAME_H__4E76CFCB_054C_4BB9_889E_22492615C74B__INCLUDED_
3 |
4 | #if _MSC_VER > 1000
5 | #pragma once
6 | #endif // _MSC_VER > 1000
7 | // TableName.h : header file
8 | //
9 |
10 | /////////////////////////////////////////////////////////////////////////////
11 | // CTableName dialog
12 |
13 | class CTableName : public CDialog
14 | {
15 | // Construction
16 | public:
17 | CTableName(CWnd* pParent = NULL); // standard constructor
18 |
19 | // Dialog Data
20 | //{{AFX_DATA(CTableName)
21 | enum { IDD = IDD_TABLE_NAME_DLG };
22 | CString m_DataSetTable;
23 | CString m_TableName;
24 | CString m_OutputTableName;
25 | CString m_WorkloadTable;
26 | int m_TopN;
27 | //}}AFX_DATA
28 |
29 |
30 | // Overrides
31 | // ClassWizard generated virtual function overrides
32 | //{{AFX_VIRTUAL(CTableName)
33 | protected:
34 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
35 | //}}AFX_VIRTUAL
36 |
37 | // Implementation
38 | protected:
39 |
40 | // Generated message map functions
41 | //{{AFX_MSG(CTableName)
42 | virtual void OnOK();
43 | virtual BOOL OnInitDialog();
44 | //}}AFX_MSG
45 | DECLARE_MESSAGE_MAP()
46 | };
47 |
48 | //{{AFX_INSERT_LOCATION}}
49 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
50 |
51 | #endif // !defined(AFX_TABLENAME_H__4E76CFCB_054C_4BB9_889E_22492615C74B__INCLUDED_)
52 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/res/LearnIing6.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/res/LearnIing6.ico
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/res/LearnIing6.rc2:
--------------------------------------------------------------------------------
1 | //
2 | // LEARNIING6.RC2 - resources Microsoft Visual C++ does not edit directly
3 | //
4 |
5 | #ifdef APSTUDIO_INVOKED
6 | #error this file is not editable by Microsoft Visual C++
7 | #endif //APSTUDIO_INVOKED
8 |
9 |
10 | /////////////////////////////////////////////////////////////////////////////
11 | // Add manually edited resources here...
12 |
13 | /////////////////////////////////////////////////////////////////////////////
14 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/res/LearnIing6Doc.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/res/LearnIing6Doc.ico
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/res/Toolbar.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/res/Toolbar.bmp
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/res/icon1.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/res/icon1.ico
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/res/icon2.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/res/icon2.ico
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/resource.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/124PPS090309_Feng/resource.h
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/PPS090402_Feng/2005_05_20.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/PPS090402_Feng/2005_05_20.txt
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/PPS090402_Feng/2005_05_22.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/PPS090402_Feng/2005_05_22.txt
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/PPS090402_Feng/LearnIing6.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/Fengyanchao/PPS090402_Feng/LearnIing6.cpp
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/PPS090402_Feng/LearnIing6.dsw:
--------------------------------------------------------------------------------
1 | Microsoft Developer Studio Workspace File, Format Version 6.00
2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
3 |
4 | ###############################################################################
5 |
6 | Project: "LearnIing6"=.\LearnIing6.dsp - Package Owner=<4>
7 |
8 | Package=<5>
9 | {{{
10 | }}}
11 |
12 | Package=<4>
13 | {{{
14 | }}}
15 |
16 | ###############################################################################
17 |
18 | Global:
19 |
20 | Package=<5>
21 | {{{
22 | }}}
23 |
24 | Package=<3>
25 | {{{
26 | }}}
27 |
28 | ###############################################################################
29 |
30 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/PPS090402_Feng/LearnIing6.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27703.2035
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LearnIing6", "LearnIing6.vcxproj", "{892CD882-DBA5-42BA-8BD5-1AABEE1BBB15}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x86 = Debug|x86
11 | Release|x86 = Release|x86
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {892CD882-DBA5-42BA-8BD5-1AABEE1BBB15}.Debug|x86.ActiveCfg = Debug|Win32
15 | {892CD882-DBA5-42BA-8BD5-1AABEE1BBB15}.Debug|x86.Build.0 = Debug|Win32
16 | {892CD882-DBA5-42BA-8BD5-1AABEE1BBB15}.Release|x86.ActiveCfg = Release|Win32
17 | {892CD882-DBA5-42BA-8BD5-1AABEE1BBB15}.Release|x86.Build.0 = Release|Win32
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {96D5D2F7-4588-4743-BBD1-154BE0E491E3}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/PPS090402_Feng/StdAfx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // LearnIing6.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/Fengyanchao/PPS090402_Feng/StdAfx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #if !defined(AFX_STDAFX_H__2A2DC332_EA9E_4F87_99CF_E74840AD7BEA__INCLUDED_)
7 | #define AFX_STDAFX_H__2A2DC332_EA9E_4F87_99CF_E74840AD7BEA__INCLUDED_
8 |
9 | #if _MSC_VER > 1000
10 | #pragma once
11 | #endif // _MSC_VER > 1000
12 |
13 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
14 |
15 | #include // MFC core and standard components
16 | #include // MFC extensions
17 | #include // MFC Automation classes
18 | #include // MFC support for Internet Explorer 4 Common Controls
19 | #ifndef _AFX_NO_AFXCMN_SUPPORT
20 | #include // MFC support for Windows Common Controls
21 | #endif // _AFX_NO_AFXCMN_SUPPORT
22 |
23 |
24 | //{{AFX_INSERT_LOCATION}}
25 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
26 |
27 | #endif // !defined(AFX_STDAFX_H__2A2DC332_EA9E_4F87_99CF_E74840AD7BEA__INCLUDED_)
28 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/SelectivityEstimation/SelectivityEstimation.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27703.2035
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SelectivityEstimation", "SelectivityEstimation\SelectivityEstimation.csproj", "{187E7AE0-A81F-484A-9E21-A241E204A472}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {187E7AE0-A81F-484A-9E21-A241E204A472}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {187E7AE0-A81F-484A-9E21-A241E204A472}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {187E7AE0-A81F-484A-9E21-A241E204A472}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {187E7AE0-A81F-484A-9E21-A241E204A472}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {B427D5B7-4FEC-4222-BB86-3E27032F67AE}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/SelectivityEstimation/SelectivityEstimation/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/SelectivityEstimation/SelectivityEstimation/BlockIndexDataSet.xsc:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/SelectivityEstimation/SelectivityEstimation/BlockIndexDataSet.xss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/SelectivityEstimation/SelectivityEstimation/Form2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace SelectivityEstimation
12 | {
13 | public partial class Form2 : Form
14 | {
15 | public Form2()
16 | {
17 | InitializeComponent();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/SelectivityEstimation/SelectivityEstimation/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace SelectivityEstimation
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new FormMain());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/SelectivityEstimation/SelectivityEstimation/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("SelectivityEstimation")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SelectivityEstimation")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("187e7ae0-a81f-484a-9e21-a241e204a472")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/SelectivityEstimation/SelectivityEstimation/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <?xml version="1.0" encoding="utf-16"?>
7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8 | <ConnectionString>Data Source=.;Initial Catalog=BlockIndex;Persist Security Info=True;User ID=sa;Password=sql</ConnectionString>
9 | <ProviderName>System.Data.SqlClient</ProviderName>
10 | </SerializableConnectionString>
11 | Data Source=.;Initial Catalog=BlockIndex;Persist Security Info=True;User ID=sa;Password=sql
12 |
13 |
14 |
--------------------------------------------------------------------------------
/CsharpDB/Histogram/instnwnd.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/Histogram/instnwnd.sql
--------------------------------------------------------------------------------
/CsharpDB/ImageToDB/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/ImageToDB/1.jpg
--------------------------------------------------------------------------------
/CsharpDB/ImageToDB/ReadMe.md:
--------------------------------------------------------------------------------
1 | # 数据库写入图片,读图片
2 |
3 | 效果图:
4 |
5 | 
6 |
--------------------------------------------------------------------------------
/CsharpDB/ImageToDB/WindowsFormsApp4.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27428.2011
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApp4", "WindowsFormsApp4\WindowsFormsApp4.csproj", "{86DA001F-2BD2-4768-ABC5-133CDFE8CF65}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {86DA001F-2BD2-4768-ABC5-133CDFE8CF65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {86DA001F-2BD2-4768-ABC5-133CDFE8CF65}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {86DA001F-2BD2-4768-ABC5-133CDFE8CF65}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {86DA001F-2BD2-4768-ABC5-133CDFE8CF65}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {3FD332F2-EC06-4A4D-BF0D-C144B3069E92}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CsharpDB/ImageToDB/WindowsFormsApp4/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CsharpDB/ImageToDB/WindowsFormsApp4/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace WindowsFormsApp4
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CsharpDB/ImageToDB/WindowsFormsApp4/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("WindowsFormsApp4")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("WindowsFormsApp4")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("86da001f-2bd2-4768-abc5-133cdfe8cf65")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CsharpDB/ImageToDB/WindowsFormsApp4/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WindowsFormsApp4.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CsharpDB/ImageToDB/WindowsFormsApp4/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CsharpDB/ImageToDB/pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/ImageToDB/pic.png
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/LoginDemo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27130.2036
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoginDemo", "LoginDemo\LoginDemo.csproj", "{042E51A9-8BBF-4089-91FE-141E93AA2CC7}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {042E51A9-8BBF-4089-91FE-141E93AA2CC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {042E51A9-8BBF-4089-91FE-141E93AA2CC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {042E51A9-8BBF-4089-91FE-141E93AA2CC7}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {042E51A9-8BBF-4089-91FE-141E93AA2CC7}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {3ED64143-137F-4F45-A8DA-FCAEB62B37B8}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/LoginDemo/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/LoginDemo/Form3.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace LoginDemo
12 | {
13 | public partial class Form3 : Form
14 | {
15 | public Form3()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void button1_Click(object sender, EventArgs e)
21 | {
22 | this.userTableAdapter1.InsertQuery(textBox1.Text.Trim(),textBox2.Text.Trim());
23 |
24 | this.Close();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/LoginDemo/Form4.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace LoginDemo
12 | {
13 | public partial class Form4 : Form
14 | {
15 | public Form4()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | public Form4(string str)
21 | {
22 | InitializeComponent();
23 | textBox1.Text = str;
24 | textBox1.Enabled = false;
25 | }
26 |
27 | private void button1_Click(object sender, EventArgs e)
28 | {
29 | this.userTableAdapter1.UpdateQuery(textBox2.Text, textBox1.Text);
30 | this.Close();
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/LoginDemo/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace LoginDemo
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/LoginDemo/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("LoginDemo")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("LoginDemo")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("042e51a9-8bbf-4089-91fe-141e93aa2cc7")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/LoginDemo/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace LoginDemo.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
29 | [global::System.Configuration.DefaultSettingValueAttribute("Data Source=.;Initial Catalog=Test;Persist Security Info=True;User ID=sa;Password" +
30 | "=sql")]
31 | public string TestConnectionString {
32 | get {
33 | return ((string)(this["TestConnectionString"]));
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/LoginDemo/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <?xml version="1.0" encoding="utf-16"?>
7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8 | <ConnectionString>Data Source=.;Initial Catalog=Test;Persist Security Info=True;User ID=sa;Password=sql</ConnectionString>
9 | <ProviderName>System.Data.SqlClient</ProviderName>
10 | </SerializableConnectionString>
11 | Data Source=.;Initial Catalog=Test;Persist Security Info=True;User ID=sa;Password=sql
12 |
13 |
14 |
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/LoginDemo/TestDataSet.xsc:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/ReadMe.md:
--------------------------------------------------------------------------------
1 | # 使用说明
2 | 1. 数据库新建表,并插入一条数据
3 | ```
4 | CREATE TABLE [dbo].[usertable](
5 | [userid] [nchar](10) NOT NULL,
6 | [password] [nchar](10) NOT NULL
7 | )
8 |
9 | INSERT INTO [dbo].[usertable] ([userid] ,[password])
10 | VALUES ('abc' ,'123')
11 | ```
12 | 2. 更改数据库连接为自己的数据库
13 | ```
14 | 例如:Data Source=.;Initial Catalog=Test;Persist Security Info=True;User ID=sa;Password=sql
15 | ```
16 | 3. 写tableadapter的相关函数
17 |
18 | 
19 |
20 | 4. 编写代码,打开数据库,完成登录验证,关闭数据库。
21 |
22 | 5. 写tableadapter的相关函数,完成增\删\改\查。
23 |
24 |
25 | # 界面:
26 |
27 | 
28 |
29 | 
30 |
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/picture/dataset.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/LoginDemo/picture/dataset.jpg
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/picture/login.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/LoginDemo/picture/login.jpg
--------------------------------------------------------------------------------
/CsharpDB/LoginDemo/picture/main.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/LoginDemo/picture/main.jpg
--------------------------------------------------------------------------------
/CsharpDB/NF.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/NF.doc
--------------------------------------------------------------------------------
/CsharpDB/NFanswer.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/NFanswer.doc
--------------------------------------------------------------------------------
/CsharpDB/NewTable/NewTable.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27703.2035
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NewTable", "NewTable\NewTable.csproj", "{D3E37EBB-1F0D-4E0F-9BBE-CD36976EC6C1}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {D3E37EBB-1F0D-4E0F-9BBE-CD36976EC6C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {D3E37EBB-1F0D-4E0F-9BBE-CD36976EC6C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {D3E37EBB-1F0D-4E0F-9BBE-CD36976EC6C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {D3E37EBB-1F0D-4E0F-9BBE-CD36976EC6C1}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {0D839032-5FE4-4AAF-9302-60C8A13DF35C}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CsharpDB/NewTable/NewTable/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CsharpDB/NewTable/NewTable/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace NewTable
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CsharpDB/NewTable/NewTable/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("NewTable")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("NewTable")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("d3e37ebb-1f0d-4e0f-9bbe-cd36976ec6c1")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CsharpDB/NewTable/NewTable/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace NewTable.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CsharpDB/NewTable/NewTable/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CsharpDB/ReadMe.md:
--------------------------------------------------------------------------------
1 | # C# 数据库 DEMO
2 | 编程环境:
3 | - Windows 10
4 | - Visual Studio 2019 community (C#)
5 | - SQLserver 2017 Developer edition
6 |
7 | ----------------------------
8 |
9 | DBdemo 学习通过设置数据源,在datagridview中显示数据库中的数据。
10 |
11 | LoginDemo 学习登录部分代码。此例程完成了增删改查,但操作较复杂,建议熟练VS后再学习。
12 |
13 | CRUD 学习增删改查操作。代码较多,但操作并不复杂。
14 |
15 | ---------------------------------
16 |
17 |
18 |
--------------------------------------------------------------------------------
/CsharpDB/SQL答案.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/SQL答案.doc
--------------------------------------------------------------------------------
/CsharpDB/SQL练习题.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/SQL练习题.doc
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp1/WindowsFormsApp1.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27428.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApp1", "WindowsFormsApp1\WindowsFormsApp1.csproj", "{D185E6D9-55E7-4EAD-8E8F-6A3CE7483BFC}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {D185E6D9-55E7-4EAD-8E8F-6A3CE7483BFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {D185E6D9-55E7-4EAD-8E8F-6A3CE7483BFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {D185E6D9-55E7-4EAD-8E8F-6A3CE7483BFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {D185E6D9-55E7-4EAD-8E8F-6A3CE7483BFC}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {554BAA21-ABD1-45A6-B561-2C715F5A4BF8}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp1/WindowsFormsApp1/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp1/WindowsFormsApp1/Form2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace WindowsFormsApp1
12 | {
13 | public partial class Form2 : Form
14 | {
15 | public Form2()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void Form2_Load(object sender, EventArgs e)
21 | {
22 | // TODO: 这行代码将数据加载到表“pythonDataSet.persons”中。您可以根据需要移动或删除它。
23 | this.personsTableAdapter.Fill(this.pythonDataSet.persons);
24 |
25 | }
26 |
27 | private void button1_Click(object sender, EventArgs e)
28 | {
29 | Application.Exit();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp1/WindowsFormsApp1/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace WindowsFormsApp1
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp1/WindowsFormsApp1/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("WindowsFormsApp1")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("WindowsFormsApp1")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("d185e6d9-55e7-4ead-8e8f-6a3ce7483bfc")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp1/WindowsFormsApp1/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WindowsFormsApp1.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
29 | [global::System.Configuration.DefaultSettingValueAttribute("Data Source=.;Initial Catalog=Python;Persist Security Info=True;User ID=sa;Passwo" +
30 | "rd=sql")]
31 | public string PythonConnectionString {
32 | get {
33 | return ((string)(this["PythonConnectionString"]));
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp1/WindowsFormsApp1/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <?xml version="1.0" encoding="utf-16"?>
7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8 | <ConnectionString>Data Source=.;Initial Catalog=Python;Persist Security Info=True;User ID=sa;Password=sql</ConnectionString>
9 | <ProviderName>System.Data.SqlClient</ProviderName>
10 | </SerializableConnectionString>
11 | Data Source=.;Initial Catalog=Python;Persist Security Info=True;User ID=sa;Password=sql
12 |
13 |
14 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp1/WindowsFormsApp1/PythonDataSet.xsc:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp1/WindowsFormsApp1/PythonDataSet.xss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp2/WindowsFormsApp2.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27428.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApp2", "WindowsFormsApp2\WindowsFormsApp2.csproj", "{5376CCF4-3475-43FC-A510-8BF97BB25DB1}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {5376CCF4-3475-43FC-A510-8BF97BB25DB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {5376CCF4-3475-43FC-A510-8BF97BB25DB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {5376CCF4-3475-43FC-A510-8BF97BB25DB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {5376CCF4-3475-43FC-A510-8BF97BB25DB1}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {08FFB8C1-CA94-4129-AB2E-0D7E438C2F71}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp2/WindowsFormsApp2/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp2/WindowsFormsApp2/Form2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace WindowsFormsApp2
12 | {
13 | public partial class Form2 : Form
14 | {
15 | public Form2()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void Form2_Load(object sender, EventArgs e)
21 | {
22 | // TODO: 这行代码将数据加载到表“pythonDataSet.persons”中。您可以根据需要移动或删除它。
23 | this.personsTableAdapter.Fill(this.pythonDataSet.persons);
24 |
25 | }
26 |
27 | private void button5_Click(object sender, EventArgs e)
28 | {
29 | Application.Exit();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp2/WindowsFormsApp2/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace WindowsFormsApp2
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp2/WindowsFormsApp2/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("WindowsFormsApp2")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("WindowsFormsApp2")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("5376ccf4-3475-43fc-a510-8bf97bb25db1")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp2/WindowsFormsApp2/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WindowsFormsApp2.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
29 | [global::System.Configuration.DefaultSettingValueAttribute("Data Source=.;Initial Catalog=Python;Persist Security Info=True;User ID=sa;Passwo" +
30 | "rd=sql")]
31 | public string PythonConnectionString {
32 | get {
33 | return ((string)(this["PythonConnectionString"]));
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp2/WindowsFormsApp2/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <?xml version="1.0" encoding="utf-16"?>
7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8 | <ConnectionString>Data Source=.;Initial Catalog=Python;Persist Security Info=True;User ID=sa;Password=sql</ConnectionString>
9 | <ProviderName>System.Data.SqlClient</ProviderName>
10 | </SerializableConnectionString>
11 | Data Source=.;Initial Catalog=Python;Persist Security Info=True;User ID=sa;Password=sql
12 |
13 |
14 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp2/WindowsFormsApp2/PythonDataSet.xsc:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CsharpDB/WindowsFormsApp2/WindowsFormsApp2/PythonDataSet.xss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CsharpDB/db6课后题.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/db6课后题.doc
--------------------------------------------------------------------------------
/CsharpDB/实验界面参考图/0.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/实验界面参考图/0.bmp
--------------------------------------------------------------------------------
/CsharpDB/实验界面参考图/1.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/实验界面参考图/1.bmp
--------------------------------------------------------------------------------
/CsharpDB/实验界面参考图/2.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/实验界面参考图/2.bmp
--------------------------------------------------------------------------------
/CsharpDB/实验界面参考图/3.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/实验界面参考图/3.bmp
--------------------------------------------------------------------------------
/CsharpDB/实验界面参考图/4.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/实验界面参考图/4.bmp
--------------------------------------------------------------------------------
/CsharpDB/实验界面参考图/5.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/实验界面参考图/5.bmp
--------------------------------------------------------------------------------
/CsharpDB/实验界面参考图/6.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/实验界面参考图/6.bmp
--------------------------------------------------------------------------------
/CsharpDB/实验界面参考图/7.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/实验界面参考图/7.bmp
--------------------------------------------------------------------------------
/CsharpDB/实验界面参考图/ReadMe.md:
--------------------------------------------------------------------------------
1 | 
2 | 
3 | 
4 | 
5 | 
6 | 
7 | 
8 | 
9 |
--------------------------------------------------------------------------------
/CsharpDB/标准SQL与Tsql.wps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/标准SQL与Tsql.wps
--------------------------------------------------------------------------------
/CsharpDB/标准SQL语言与Transact-SQL的部分差异.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/CsharpDB/标准SQL语言与Transact-SQL的部分差异.doc
--------------------------------------------------------------------------------
/PPT/PPT2019/DB期末复习.ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB期末复习.ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第01章.ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第01章.ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第02章.ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第02章.ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第03章(1).ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第03章(1).ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第03章(2).ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第03章(2).ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第03章(3).ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第03章(3).ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第04章.ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第04章.ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第05章.ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第05章.ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第06章.ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第06章.ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第07章(1).ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第07章(1).ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第07章(2).ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第07章(2).ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第08章.ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第08章.ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第09章.ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第09章.ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第10章.ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第10章.ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/DB第11章.ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/DB第11章.ppt
--------------------------------------------------------------------------------
/PPT/PPT2019/候选码求解.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2019/候选码求解.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/2019-2020春-数据库教学日历.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/2019-2020春-数据库教学日历.doc
--------------------------------------------------------------------------------
/PPT/PPT2020/DB期末复习.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB期末复习.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第01章-2020.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第01章-2020.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第02章-2020.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第02章-2020.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第03章(1)-2020.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第03章(1)-2020.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第03章(2)-2020.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第03章(2)-2020.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第03章(3)-2020.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第03章(3)-2020.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第04章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第04章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第05章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第05章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第06章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第06章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第07章(1).pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第07章(1).pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第07章(2).pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第07章(2).pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第08章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第08章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第09章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第09章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第10章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第10章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/DB第11章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/DB第11章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2020/候选码求解.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2020/候选码求解.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/2020-2021春-数据库教学日历.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/2020-2021春-数据库教学日历.doc
--------------------------------------------------------------------------------
/PPT/PPT2021/DB期末复习.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB期末复习.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第01章-2021.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第01章-2021.pdf
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第01章-2021.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第01章-2021.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第02章-2021.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第02章-2021.pdf
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第02章-2021.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第02章-2021.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第03章(1)-2021.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第03章(1)-2021.pdf
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第03章(1)-2021.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第03章(1)-2021.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第03章(2).pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第03章(2).pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第03章(3).pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第03章(3).pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第04章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第04章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第05章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第05章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第06章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第06章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第07章(1).pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第07章(1).pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第07章(2).pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第07章(2).pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第08章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第08章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第09章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第09章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第10章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第10章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/DB第11章.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/DB第11章.pptx
--------------------------------------------------------------------------------
/PPT/PPT2021/候选码求解.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/PPT/PPT2021/候选码求解.pptx
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 数据库教学相关资料
2 |
3 | - 【PPT】 每章讲完后更新到最新版
4 | - 【SQL】 教学使用SQL语句
5 | - 【Csharp】 实验要求 & C#操作数据库例程
6 | - 【CsharpDB】 学习材料 & C#操作数据库例程
7 | - 【SQL_Injection】 SQL注入实例(ASP.net)
8 |
9 | ##### [教材:数据库系统概论](http://www.hep.com.cn/book/details?uuid=bae52acd-15ae-1000-bd5e-d52640b36cd2)
10 | 
11 |
12 | DataBase/CsharpDB/Histogram 直方图
13 |
--------------------------------------------------------------------------------
/SQL/CREATE-INSERT/CREATE-TABLE-Course.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE Course
2 | (Cno CHAR(4) PRIMARY KEY,
3 | Cname CHAR(40),
4 | Cpno CHAR(4),
5 | Ccredit SMALLINT,
6 | FOREIGN KEY (Cpno) REFERENCES Course(Cno)
7 | );
8 |
--------------------------------------------------------------------------------
/SQL/CREATE-INSERT/CREATE-TABLE-SC.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE SC
2 | (Sno CHAR(9),
3 | Cno CHAR(4),
4 | Grade SMALLINT,
5 | PRIMARY KEY (Sno,Cno),
6 | /* 主码由两个属性构成,必须作为表级完整性进行定义*/
7 | FOREIGN KEY (Sno) REFERENCES Student(Sno),
8 | /* 表级完整性约束条件,Sno是外码,被参照表是Student */
9 | FOREIGN KEY (Cno)REFERENCES Course(Cno)
10 | /* 表级完整性约束条件, Cno是外码,被参照表是Course*/
11 | );
12 |
--------------------------------------------------------------------------------
/SQL/CREATE-INSERT/CREATE-TABLE-Student.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE Student
2 | (Sno CHAR(9) PRIMARY KEY, /* 列级完整性约束条件,Sno是主码*/
3 | Sname CHAR(20) UNIQUE, /* Sname取唯一值*/
4 | Ssex CHAR(2),
5 | Sage SMALLINT,
6 | Sdept CHAR(20)
7 | );
8 |
--------------------------------------------------------------------------------
/SQL/CREATE-INSERT/Create_Schema_Table.sql:
--------------------------------------------------------------------------------
1 | -- 创建模式,并在该模式下创建基本表
2 | CREATE SCHEMA TEST AUTHORIZATION WANG
3 | CREATE TABLE TAB1
4 | (
5 | COL1 SMALLINT,
6 | COL2 INT,
7 | COL3 CHAR(20),
8 | COL4 NUMERIC(10,3),
9 | COL5 DECIMAL(5,2)
10 | );
11 |
12 |
13 |
14 | -- 删除模式
15 | -- 需要先删除该模式下的基本表,不能支持cascade.
16 | -- 例如:
17 | DROP TABLE TEST.TAB1
18 | DROP SCHEMA TEST
19 | -- REF:https://zhidao.baidu.com/question/552968343.html
20 |
--------------------------------------------------------------------------------
/SQL/CREATE-INSERT/INSERT-INTO-Course.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO Course(Cno,Cname,Cpno,Ccredit)
2 | VALUES ('1','数据库',NULL,4);
3 |
--------------------------------------------------------------------------------
/SQL/CREATE-INSERT/INSERT-INTO-SC.sql:
--------------------------------------------------------------------------------
1 | INSERT
2 | INTO SC(Sno,Cno)
3 | VALUES ('201215128 ','1');
4 |
--------------------------------------------------------------------------------
/SQL/CREATE-INSERT/INSERT-INTO-Student.sql:
--------------------------------------------------------------------------------
1 | INSERT
2 | INTO Student (Sno,Sname,Ssex,Sdept,Sage)
3 | VALUES ('201215128','王辉','男','IS',18);
4 |
--------------------------------------------------------------------------------
/SQL/CREATE-INSERT/INSERT-INTO-Student1.sql:
--------------------------------------------------------------------------------
1 | INSERT
2 | INTO Student
3 | VALUES ('201215126','张老三','男',18,'CS');
4 |
--------------------------------------------------------------------------------
/SQL/CREATE-INSERT/OneKeyCreateDB.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/CREATE-INSERT/OneKeyCreateDB.sql
--------------------------------------------------------------------------------
/SQL/CREATE-INSERT/Readme.md:
--------------------------------------------------------------------------------
1 | # T-SQL标准,部分细节内容可能与课本上的标准SQL不同
2 |
3 | 创建数据库:OneKeyCreateDB.sql
4 |
5 | 创建学生表:CREATE-TABLE-Student.sql
6 |
7 | 创建课程表:CREATE-TABLE-Course.sql
8 |
9 | 创建选课表:CREATE-TABLE-SC.sql
10 |
11 | 创建模式:Create_Schema_Table.sql
12 |
13 | 学生表插入数据:INSERT-INTO-Student.sql 表名+属性
14 |
15 | 课程表插入数据:INSERT-INTO-Course.sql 表名+属性
16 |
17 | 选课表插入数据:INSERT-INTO-SC.sql 表名+属性
18 |
19 | 学生表另一种方法插入数据:INSERT-INTO-Student1.sql 只有表名
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/SQL/CURSOR.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/CURSOR.sql
--------------------------------------------------------------------------------
/SQL/Chapter03.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/Chapter03.sql
--------------------------------------------------------------------------------
/SQL/GRANT-REVOKE/CREATE_USER.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/GRANT-REVOKE/CREATE_USER.sql
--------------------------------------------------------------------------------
/SQL/GRANT-REVOKE/E4_1.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/GRANT-REVOKE/E4_1.sql
--------------------------------------------------------------------------------
/SQL/GRANT-REVOKE/E4_2.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/GRANT-REVOKE/E4_2.sql
--------------------------------------------------------------------------------
/SQL/GRANT-REVOKE/E4_3.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/GRANT-REVOKE/E4_3.sql
--------------------------------------------------------------------------------
/SQL/GRANT-REVOKE/E4_4.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/GRANT-REVOKE/E4_4.sql
--------------------------------------------------------------------------------
/SQL/GRANT-REVOKE/E4_5.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/GRANT-REVOKE/E4_5.sql
--------------------------------------------------------------------------------
/SQL/GRANT-REVOKE/E4_6_7.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/GRANT-REVOKE/E4_6_7.sql
--------------------------------------------------------------------------------
/SQL/INSERT-UPDATE-DELETE/E-3.72.sql:
--------------------------------------------------------------------------------
1 | --第一步:建表
2 | CREATE TABLE Dept_age
3 | ( Sdept CHAR(15), /*系名*/
4 | Avg_age SMALLINT); /*学生平均年龄*/
5 |
6 | --第二步:插入数据
7 | INSERT
8 | INTO Dept_age(Sdept,Avg_age)
9 | SELECT Sdept,AVG(Sage)
10 | FROM Student
11 | GROUP BY Sdept;
12 |
13 | SELECT * FROM Dept_age
14 |
--------------------------------------------------------------------------------
/SQL/INSERT-UPDATE-DELETE/E-3.73.sql:
--------------------------------------------------------------------------------
1 | SELECT * FROM Student
2 |
3 |
4 | UPDATE Student
5 | SET Sage=22
6 | WHERE Sno='201215121';
7 |
8 | SELECT * FROM Student
9 |
--------------------------------------------------------------------------------
/SQL/INSERT-UPDATE-DELETE/E-3.74.sql:
--------------------------------------------------------------------------------
1 | SELECT * FROM Student
2 | UPDATE Student SET Sage= Sage+1;
3 | SELECT * FROM Student
4 |
--------------------------------------------------------------------------------
/SQL/INSERT-UPDATE-DELETE/E-3.75.sql:
--------------------------------------------------------------------------------
1 | SELECT * FROM SC
2 | UPDATE SC
3 | SET Grade=1
4 | WHERE Sno IN
5 | (SELECT Sno
6 | FROM Student
7 | WHERE Sdept= 'CS' );
8 | SELECT * FROM SC
9 |
--------------------------------------------------------------------------------
/SQL/INSERT-UPDATE-DELETE/E-3.80.sql:
--------------------------------------------------------------------------------
1 | SELECT * FROM Student
2 | UPDATE Student
3 | SET Sdept = NULL
4 | WHERE Sno='201215121';
5 | SELECT * FROM Student
6 |
--------------------------------------------------------------------------------
/SQL/INSERT-UPDATE-DELETE/readme.md:
--------------------------------------------------------------------------------
1 | E-3.72 即 第三章的例子:【例3.72】
2 |
--------------------------------------------------------------------------------
/SQL/Login_With_sa .md:
--------------------------------------------------------------------------------
1 | # 新装SQLserver没有开放sa登录,需要自己配置。
2 | 参考资料:
3 | https://blog.csdn.net/zhanghan18333611647/article/details/50450183
4 |
--------------------------------------------------------------------------------
/SQL/PROCEDURE/CreateProc.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/PROCEDURE/CreateProc.sql
--------------------------------------------------------------------------------
/SQL/PROCEDURE/CreateTableAccount.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE IF EXISTS Account;
2 |
3 | CREATE TABLE Account
4 | (
5 | accountnum CHAR(3), -- 账户编号
6 | total FLOAT -- 账户余额
7 | );
8 |
9 | INSERT INTO Account VALUES(101,50);
10 | INSERT INTO Account VALUES(102,100);
11 |
12 | SELECT * FROM Account
13 |
--------------------------------------------------------------------------------
/SQL/PROCEDURE/TestProc.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/PROCEDURE/TestProc.sql
--------------------------------------------------------------------------------
/SQL/PROCEDURE/proc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/PROCEDURE/proc.jpg
--------------------------------------------------------------------------------
/SQL/ReadMe.md:
--------------------------------------------------------------------------------
1 | # 教学相关SQL语句
2 | ### [Transact-SQL 语句 官方帮助文档](https://docs.microsoft.com/zh-cn/sql/t-sql/language-reference)
3 |
4 | ### RDBMS: SQLserver 2017 Developer [官网下载](https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads)
5 |
6 | SQL Server 2017 Developer 是一个全功能免费版本,许可在非生产环境下用作开发和测试数据库。
7 |
8 | -------------
9 | | 文件夹/文件 | 内容 |
10 | | :--- | :--- |
11 | |CREATE-INSERT |创建教材上的三张表:学生表、课程表、选课表;在三张表中插入数据;创建模式。|
12 | |SELECT |查询---教材例题:3.16-3.64|
13 | |INSERT-UPDATE-DELETE |更新---教材例题:3.72-3.75,3.80|
14 | |VIEW |视图---教材例题:3.84,3.89,3.94;with check option 测试|
15 | |PROCEDURE| [例8.8] 利用存储过程来实现下面的应用:从账户1转指定数额的款项到账户2中。|
16 | |Trigger| 触发器 使用说明及例题|
17 | |CURSOR.sql |游标|
18 | |OneKeyCreateThreeTable.sql| 创建教材上的三张表:学生表、课程表、选课表,并插入全部教材实例数据|
19 | |Chapter03.sql| 部分第三章课后题答案|
20 | |Login_With_sa.md| 新装SQLserver没有开放sa登录,需要自己配置的解决方案|
21 |
22 | ----------------------
23 | Database:
24 |
25 | 
26 |
27 | Table:
28 |
29 | 
30 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.16-3.17.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/SELECT/E-3.16-3.17.sql
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.18.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/SELECT/E-3.18.sql
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.19-20-21.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/SELECT/E-3.19-20-21.sql
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.22-23-24.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/SELECT/E-3.22-23-24.sql
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.25-26.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/SELECT/E-3.25-26.sql
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.27-28.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/SELECT/E-3.27-28.sql
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.29-3.35.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/SELECT/E-3.29-3.35.sql
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.36-37-38.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/SELECT/E-3.36-37-38.sql
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.39.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/SELECT/E-3.39.sql
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.40.sql:
--------------------------------------------------------------------------------
1 | SELECT *
2 | FROM Student
3 | ORDER BY Sdept, Sage DESC;
4 |
5 |
6 | SELECT *
7 | FROM Student
8 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.41-3.45.sql:
--------------------------------------------------------------------------------
1 | --[例3.41] 查询学生总人数。
2 | SELECT COUNT(*)
3 | FROM Student;
4 | --[例3.42] 查询选修了课程的学生人数。
5 | SELECT COUNT(DISTINCT Sno)
6 | FROM SC;
7 | --[例3.43] 计算1号课程的学生平均成绩。
8 | SELECT AVG(Grade)
9 | FROM SC
10 | WHERE Cno= '1';
11 | --[例3.44] 查询选修1号课程的学生最高分数。
12 | SELECT MAX(Grade)
13 | FROM SC
14 | WHERE Cno='1';
15 | --[例3.45] 查询学生201215012选修课程的总学分数。
16 | SELECT SUM(Ccredit)
17 | FROM SC,Course
18 | WHERE Sno='201215012' AND SC.Cno=Course.Cno;
19 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.46.sql:
--------------------------------------------------------------------------------
1 | SELECT Cno,COUNT(Sno)
2 | FROM SC
3 | GROUP BY Cno;
4 |
5 | SELECT * FROM SC
6 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.47.sql:
--------------------------------------------------------------------------------
1 | SELECT Sno
2 | FROM SC
3 | GROUP BY Sno
4 | HAVING COUNT(*) >2;
5 |
6 | SELECT * FROM SC
7 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.48.sql:
--------------------------------------------------------------------------------
1 | SELECT Sno, AVG(Grade)
2 | FROM SC
3 | GROUP BY Sno
4 | HAVING AVG(Grade)>=86;
5 |
6 | SELECT * FROM SC
7 |
8 | --错误的使用:
9 |
10 | --SELECT Sno, AVG(Grade)
11 | --FROM SC
12 | --WHERE AVG(Grade)>=90
13 | --GROUP BY Sno;
14 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.49.sql:
--------------------------------------------------------------------------------
1 |
2 | --等值连接
3 | SELECT Student.*, SC.*
4 | FROM Student, SC
5 | WHERE Student.Sno = SC.Sno;
6 |
7 |
8 | --自然连接
9 | SELECT Student.Sno,Sname,Ssex,Sage,Sdept,Cno,Grade
10 | FROM Student,SC
11 | WHERE Student.Sno = SC.Sno;
12 |
13 |
14 | --等值连接
15 | SELECT *
16 | FROM Student, SC
17 | WHERE Student.Sno = SC.Sno;
18 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.50.sql:
--------------------------------------------------------------------------------
1 | --[例 3.50] 对[例 3.49]用自然连接完成。
2 | SELECT Student.Sno,Sname,Ssex,Sage,Sdept,Cno,Grade
3 | FROM Student,SC
4 | WHERE Student.Sno = SC.Sno;
5 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.51.sql:
--------------------------------------------------------------------------------
1 | SELECT Student.Sno,Sname
2 | FROM Student, SC
3 | WHERE Student.Sno=SC.Sno AND SC.Cno='2' AND SC.Grade>86;
4 |
5 |
6 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.52.sql:
--------------------------------------------------------------------------------
1 |
2 | SELECT FIRST_TABLE.Cno, SECOND_TABLE.Cpno
3 | FROM Course FIRST_TABLE, Course SECOND_TABLE
4 | WHERE FIRST_TABLE.Cpno = SECOND_TABLE.Cno;
5 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.53.sql:
--------------------------------------------------------------------------------
1 |
2 | SELECT Student.Sno,Sname,Ssex,Sage,Sdept,Cno,Grade
3 | FROM Student LEFT OUTER JOIN SC ON (Student.Sno=SC.Sno);
4 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.54-3.55.sql:
--------------------------------------------------------------------------------
1 | --嵌套查询
2 | --一个SELECT-FROM-WHERE语句称为一个查询块
3 | --将一个查询块嵌套在另一个查询块的WHERE子句或HAVING短语的条件中的查询称为嵌套查询
4 |
5 | SELECT * /*外层查询/父查询*/
6 | FROM Student
7 | WHERE Sno IN
8 | (SELECT Sno /*内层查询/子查询*/
9 | FROM SC
10 | WHERE Cno= '2');
11 |
12 |
13 | --不相关子查询
14 | SELECT Sno, Sname, Sdept
15 | FROM Student
16 | WHERE Sdept IN
17 | (SELECT Sdept
18 | FROM Student
19 | WHERE Sname= '刘晨');
20 |
21 |
22 | --相关子查询
23 | SELECT Sno, Cno
24 | FROM SC x
25 | WHERE Grade >=( SELECT AVG(Grade)
26 | FROM SC y
27 | WHERE y.Sno=x.Sno);
28 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.54.sql:
--------------------------------------------------------------------------------
1 | SELECT Student.Sno, Sname, Cname, Grade
2 | FROM Student, SC, Course --多表连接
3 | WHERE Student.Sno = SC.Sno AND SC.Cno = Course.Cno;
4 |
5 |
6 | SELECT *
7 | FROM Student, SC, Course --多表连接
8 | WHERE Student.Sno = SC.Sno AND SC.Cno = Course.Cno;
9 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.55.sql:
--------------------------------------------------------------------------------
1 | --不相关子查询
2 | SELECT Sno, Sname, Sdept
3 | FROM Student
4 | WHERE Sdept IN
5 | (SELECT Sdept
6 | FROM Student
7 | WHERE Sname= '刘晨');
8 |
9 | --连接查询(自身连接)
10 | SELECT S1.Sno, S1.Sname,S1.Sdept
11 | FROM Student S1,Student S2
12 | WHERE S1.Sdept = S2.Sdept AND S2.Sname = '刘晨';
13 |
14 | --可以用带EXISTS谓词的子查询替换:
15 | SELECT Sno,Sname,Sdept
16 | FROM Student S1
17 | WHERE EXISTS
18 | (SELECT *
19 | FROM Student S2
20 | WHERE S2.Sdept = S1.Sdept AND S2.Sname = '刘晨');
21 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.56.sql:
--------------------------------------------------------------------------------
1 | SELECT Sno,Sname -- ③ 最后在Student关系中取出Sno和Sname
2 | FROM Student
3 | WHERE Sno IN
4 | (SELECT Sno -- ② 然后在SC关系中找出选修了3号课程的学生学号
5 | FROM SC
6 | WHERE Cno IN
7 | (SELECT Cno --① 首先在Course关系中找出“信息系统”的课程号,为3号
8 | FROM Course
9 | WHERE Cname= '信息系统'
10 | )
11 | );
12 |
13 | SELECT Student.Sno,Sname
14 | FROM Student,SC,Course
15 | WHERE Student.Sno = SC.Sno AND
16 | SC.Cno = Course.Cno AND
17 | Course.Cname='信息系统';
18 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.57+.sql:
--------------------------------------------------------------------------------
1 | SELECT Sno, Cno
2 | FROM SC, (SELECT Sno, Avg(Grade)
3 | FROM SC
4 | GROUP BY Sno)
5 | AS Avg_sc(avg_sno,avg_grade)
6 | WHERE SC.Sno = Avg_sc.avg_sno and SC.Grade >=Avg_sc.avg_grade
7 |
8 |
9 | SELECT Sname
10 | FROM Student,
11 | (SELECT Sno FROM SC WHERE Cno='1') AS SC1
12 | WHERE Student.Sno=SC1.Sno;
13 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.57.sql:
--------------------------------------------------------------------------------
1 |
2 | SELECT Sno, Cno
3 | FROM SC x
4 | WHERE Grade >=( SELECT AVG(Grade)
5 | FROM SC y
6 | WHERE y.Sno=x.Sno);
7 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.58.sql:
--------------------------------------------------------------------------------
1 | SELECT Sname,Sage
2 | FROM Student
3 | WHERE Sage < ANY ( SELECT Sage
4 | FROM Student
5 | WHERE Sdept= 'CS')
6 | AND Sdept <> 'CS'; /*父查询块中的条件 */
7 |
8 |
9 |
10 | SELECT Sname,Sage
11 | FROM Student
12 | WHERE Sage <
13 | (SELECT MAX(Sage)
14 | FROM Student
15 | WHERE Sdept= 'CS ')
16 | AND Sdept <> 'CS';
17 |
18 | SELECT * FROM Student
19 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.59.sql:
--------------------------------------------------------------------------------
1 | SELECT Sname,Sage
2 | FROM Student
3 | WHERE Sage < ALL ( SELECT Sage
4 | FROM Student
5 | WHERE Sdept= 'CS')
6 | AND Sdept <> 'CS'; /*父查询块中的条件*/
7 |
8 |
9 | SELECT Sname,Sage
10 | FROM Student
11 | WHERE Sage <
12 | (SELECT MIN(Sage)
13 | FROM Student
14 | WHERE Sdept= 'CS ')
15 | AND Sdept <> 'CS';
16 |
17 | SELECT * FROM Student
18 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.60.sql:
--------------------------------------------------------------------------------
1 |
2 | SELECT Sname
3 | FROM Student
4 | WHERE EXISTS
5 | (SELECT *
6 | FROM SC
7 | WHERE Sno=Student.Sno AND Cno= '1');
8 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.61.sql:
--------------------------------------------------------------------------------
1 |
2 | SELECT Sname
3 | FROM Student
4 | WHERE NOT EXISTS
5 | (SELECT *
6 | FROM SC
7 | WHERE Sno = Student.Sno AND Cno='1');
8 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.62-HARD.sql:
--------------------------------------------------------------------------------
1 |
2 | SELECT Sname
3 | FROM Student
4 | WHERE NOT EXISTS
5 | (SELECT *
6 | FROM Course
7 | WHERE NOT EXISTS
8 | (SELECT *
9 | FROM SC
10 | WHERE Sno= Student.Sno
11 | AND Cno= Course.Cno
12 | )
13 | );
14 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.63-HARD.sql:
--------------------------------------------------------------------------------
1 |
2 | SELECT DISTINCT Sno
3 | FROM SC SCX
4 | WHERE NOT EXISTS
5 | (SELECT *
6 | FROM SC SCY
7 | WHERE SCY.Sno = '201215122' AND
8 | NOT EXISTS
9 | (SELECT *
10 | FROM SC SCZ
11 | WHERE SCZ.Sno=SCX.Sno AND
12 | SCZ.Cno=SCY.Cno));
13 |
--------------------------------------------------------------------------------
/SQL/SELECT/E-3.64.sql:
--------------------------------------------------------------------------------
1 |
2 | SELECT *
3 | FROM Student
4 | WHERE Sdept= 'CS'
5 |
6 | UNION
7 |
8 | SELECT *
9 | FROM Student
10 | WHERE Sage<=19;
11 |
--------------------------------------------------------------------------------
/SQL/SELECT/Readme.md:
--------------------------------------------------------------------------------
1 | E-3.72 即 第三章的例子:【例3.72】
2 |
--------------------------------------------------------------------------------
/SQL/Trigger/E-5.22 CreateTrigger.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/Trigger/E-5.22 CreateTrigger.sql
--------------------------------------------------------------------------------
/SQL/Trigger/E-5.22 CreateTriggerLogTime.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/Trigger/E-5.22 CreateTriggerLogTime.sql
--------------------------------------------------------------------------------
/SQL/Trigger/E-5.22 TestTrigger.sql:
--------------------------------------------------------------------------------
1 | INSERT
2 | INTO Student
3 | VALUES ('201215135','王五','男',18,'CS');
4 |
5 | SELECT * FROM Student
6 | SELECT * FROM StudentInsertLog
7 | SELECT * FROM StudentInsertLogUser
8 |
--------------------------------------------------------------------------------
/SQL/Trigger/ReadMe.md:
--------------------------------------------------------------------------------
1 | # 触发器使用说明
2 | ### 1. 参考课本内容,新建Student表
3 | ### 2. 新建表StudentInsertLog
4 | 存储学生人数
5 | ```
6 | CREATE TABLE StudentInsertLog
7 | (
8 | Numbers INT
9 | )
10 | ```
11 | ### 3. 新建表StudentInsertLogUser
12 | 存储用户名和操作时间
13 | ```
14 | CREATE TABLE StudentInsertLogUser
15 | (
16 | UserName nchar(10),
17 | DateAndTime datetime
18 | )
19 | ```
20 | ### 4. 新建触发器Student_Count
21 | 当插入新的学生记录时,触发器启动,自动在StudentInsertLog记录学生人数
22 | ```
23 | CREATE TRIGGER Student_Count
24 | ON Student
25 | AFTER
26 | INSERT
27 | AS
28 | INSERT INTO StudentInsertLog(Numbers)
29 | SELECT COUNT(*) FROM Student
30 | ```
31 | ### 5. 新建触发器Student_Time
32 | 当插入新的学生记录时,触发器启动,自动在StudentInsertLogUser记录用户名和操作时间
33 | ```
34 | CREATE TRIGGER Student_Time
35 | ON Student
36 | AFTER
37 | INSERT
38 | AS
39 | declare @UserName nchar(10)
40 | declare @DateTime datetime
41 |
42 | select @UserName = system_user
43 | select @DateTime = CONVERT(datetime,GETDATE(),120) --2018-04-11 16:33:10
44 |
45 | INSERT INTO StudentInsertLogUser(UserName,DateAndTime)
46 | VALUES (@UserName,@DateTime)
47 | ```
48 | ### 6. 测试触发器效果
49 | ```
50 | INSERT
51 | INTO Student
52 | VALUES ('201215135','王五','男',18,'CS');
53 | SELECT * FROM Student
54 | SELECT * FROM StudentInsertLog
55 | SELECT * FROM StudentInsertLogUser
56 | ```
57 |
58 | 
59 |
--------------------------------------------------------------------------------
/SQL/Trigger/trigger.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/Trigger/trigger.jpg
--------------------------------------------------------------------------------
/SQL/VIEW/E-3.84.sql:
--------------------------------------------------------------------------------
1 | GO
2 | CREATE VIEW IS_Student
3 | AS
4 | SELECT Sno,Sname,Sage
5 | FROM Student
6 | WHERE Sdept= 'IS';
7 | GO
8 | SELECT * FROM IS_Student
9 |
--------------------------------------------------------------------------------
/SQL/VIEW/E-3.89.sql:
--------------------------------------------------------------------------------
1 | GO
2 | CREATE VIEW S_G(Sno,Gavg)
3 | AS
4 | SELECT Sno,AVG(Grade)
5 | FROM SC
6 | GROUP BY Sno;
7 | GO
8 | SELECT * FROM S_G
9 |
--------------------------------------------------------------------------------
/SQL/VIEW/E-3.94.sql:
--------------------------------------------------------------------------------
1 | SELECT *
2 | FROM (SELECT Sno,AVG(Grade)
3 | FROM SC
4 | GROUP BY Sno) AS S_G(Sno,Gavg)
5 | WHERE Gavg>=86;
6 |
--------------------------------------------------------------------------------
/SQL/VIEW/WithCheckOption.sql:
--------------------------------------------------------------------------------
1 | create view View_Stu_1
2 | as
3 | select Sno,Sname,Ssex,Sage,Sdept
4 | from Student
5 | where Sdept='IS'
6 |
7 | go
8 |
9 | create view View_Stu_2
10 | as
11 | select Sno,Sname,Ssex,Sage,Sdept
12 | from Student
13 | where Sdept='IS'
14 | with check option;
15 |
16 | go
17 |
18 | insert into View_Stu_1(Sno,Sname,Ssex,Sage)--无With check option: 执行正确。 Sdept会自动补充Null。
19 | values ('95007111','张兰11','F','19')
20 |
21 | insert into View_Stu_2(Sno,Sname,Ssex,Sage) --有With check option: 执行错误。 没有Sdept会报错,不能够为Sdept自动补充IS。
22 | values ('950072000','李勇00','F','19')
23 |
24 | insert into View_Stu_2(Sno,Sname,Ssex,Sage,Sdept) --有With check option: 执行错误。有Sdept为CS,不正常执行。
25 | values ('951000071','王1五','F2','19','CS')
26 |
27 | insert into View_Stu_2(Sno,Sname,Ssex,Sage,Sdept) --有With check option: 执行正确。有Sdept为IS,可以正常执行。
28 | values ('95007211','李勇11','F','19','IS')
29 |
30 | select * from Student
31 | select * from View_Stu_1
32 | select * from View_Stu_2
33 |
34 | -- 结论:
35 | -- 标准SQL中,view 定义中有 with check option,insert 语句可以自动加条件 Sdept = IS,并最终写入表Student。
36 | -- TSQL中,view 定义中有 with check option,insert并不能完成标准SQL的操作,执行语句会报错;仅能完成对 Sdept的 检查。
37 | -- 也就是说,TSQL中,insert必须写Sdept。当 Sdept = IS 时,正确;Sdept = CS 时,报错。
38 |
--------------------------------------------------------------------------------
/SQL/pic/database.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/pic/database.jpg
--------------------------------------------------------------------------------
/SQL/pic/table.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/pic/table.jpg
--------------------------------------------------------------------------------
/SQL/pic/user.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/SQL/pic/user.jpg
--------------------------------------------------------------------------------
/SQL_Injection/Login/Login/Login.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29009.5
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Login", "Login\Login.csproj", "{E7690BF9-0D2A-48C3-86EA-B60E086963F4}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {E7690BF9-0D2A-48C3-86EA-B60E086963F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {E7690BF9-0D2A-48C3-86EA-B60E086963F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {E7690BF9-0D2A-48C3-86EA-B60E086963F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {E7690BF9-0D2A-48C3-86EA-B60E086963F4}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {B95D4D66-9EB4-44B8-B39D-8F1D93C66D6B}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/SQL_Injection/Login/Login/Login/Main.aspx:
--------------------------------------------------------------------------------
1 | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Main.aspx.cs" Inherits="Login.Main" %>
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
21 |
22 |
23 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/SQL_Injection/Login/Login/Login/Main.aspx.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.UI;
6 | using System.Web.UI.WebControls;
7 |
8 | namespace Login
9 | {
10 | public partial class Main : System.Web.UI.Page
11 | {
12 | protected void Page_Load(object sender, EventArgs e)
13 | {
14 |
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/SQL_Injection/Login/Login/Login/Main.aspx.designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | // <自动生成>
3 | // 此代码由工具生成。
4 | //
5 | // 对此文件的更改可能导致不正确的行为,如果
6 | // 重新生成代码,则所做更改将丢失。
7 | // 自动生成>
8 | //------------------------------------------------------------------------------
9 |
10 | namespace Login {
11 |
12 |
13 | public partial class Main {
14 |
15 | ///
16 | /// form1 控件。
17 | ///
18 | ///
19 | /// 自动生成的字段。
20 | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
21 | ///
22 | protected global::System.Web.UI.HtmlControls.HtmlForm form1;
23 |
24 | ///
25 | /// GridView1 控件。
26 | ///
27 | ///
28 | /// 自动生成的字段。
29 | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
30 | ///
31 | protected global::System.Web.UI.WebControls.GridView GridView1;
32 |
33 | ///
34 | /// SqlDataSource1 控件。
35 | ///
36 | ///
37 | /// 自动生成的字段。
38 | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
39 | ///
40 | protected global::System.Web.UI.WebControls.SqlDataSource SqlDataSource1;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/SQL_Injection/Login/Login/Login/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过下列特性集
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Login")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Login")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要
19 | // 从 COM 访问此程序集中的某个类型,请针对该类型将 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
23 | [assembly: Guid("e7690bf9-0d2a-48c3-86ea-b60e086963f4")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订版本
31 | //
32 | // 可以指定所有值,也可以使用“修订号”和“内部版本号”的默认值,
33 | // 方法是按如下所示使用 "*":
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/SQL_Injection/Login/Login/Login/Properties/PublishProfiles/CustomProfile.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | FileSystem
9 | Release
10 | Any CPU
11 |
12 | True
13 | False
14 | E:\发布
15 | False
16 |
17 |
--------------------------------------------------------------------------------
/SQL_Injection/Login/Login/Login/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
30 |
31 |
--------------------------------------------------------------------------------
/SQL_Injection/Login/Login/Login/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
31 |
32 |
--------------------------------------------------------------------------------
/SQL_Injection/Login/Login/Login/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/SQL_Injection/Login/Login/Login/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 河北大学 网络空间安全与计算机学院 2019.6
9 |
10 |
--------------------------------------------------------------------------------
/SQL_Injection/Login/Login/Login/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/SQL_Injection/Login_sql_injection/Login_sql_injection.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29009.5
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Login_sql_injection", "Login_sql_injection\Login_sql_injection.csproj", "{E4040A2D-AA3C-4B4A-A5FA-FF157589D83F}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {E4040A2D-AA3C-4B4A-A5FA-FF157589D83F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {E4040A2D-AA3C-4B4A-A5FA-FF157589D83F}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {E4040A2D-AA3C-4B4A-A5FA-FF157589D83F}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {E4040A2D-AA3C-4B4A-A5FA-FF157589D83F}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {865FA522-5E0C-42BA-B120-EA60C121AA7E}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/SQL_Injection/Login_sql_injection/Login_sql_injection/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过下列特性集
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Login_sql_injection")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Login_sql_injection")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要
19 | // 从 COM 访问此程序集中的某个类型,请针对该类型将 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
23 | [assembly: Guid("e4040a2d-aa3c-4b4a-a5fa-ff157589d83f")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订版本
31 | //
32 | // 可以指定所有值,也可以使用“修订号”和“内部版本号”的默认值,
33 | // 方法是按如下所示使用 "*":
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/SQL_Injection/Login_sql_injection/Login_sql_injection/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
30 |
31 |
--------------------------------------------------------------------------------
/SQL_Injection/Login_sql_injection/Login_sql_injection/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
31 |
32 |
--------------------------------------------------------------------------------
/SQL_Injection/Login_sql_injection/Login_sql_injection/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/SQL_Injection/Login_sql_injection/Login_sql_injection/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/SQL_Injection/readme.md:
--------------------------------------------------------------------------------
1 | sql injection
2 |
3 | 简介:https://www.cnblogs.com/hbuwyg/p/11037356.html
4 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-slate
--------------------------------------------------------------------------------
/database.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HBU/DataBase/442a5c7c2757e1fc624dcca4a983a1d20bfb5510/database.jpg
--------------------------------------------------------------------------------