SQL server
A typical relational database management system released by Microsoft, powerful, easy to operate, reliable security.
Database concept: a place to store data, long-term storage is required in the computer can be organized and shared data collection.
Type: hierarchical, network, relationship
level
Mesh
relationship
relational database
Features: Each data having the same attribute exist independently of a table. For any table, the user can add, delete and modify data in the table.
Components: building yards, the primary key, candidate key, public key, foreign key
Integrity rules: entity, with reference to the user-defined
Paradigm theory: Three Paradigms
The first paradigm: Each column indivisible;
The second paradigm: the first based on the paradigm to any non-primary key dependent on the primary key
Third paradigm: the third paradigm based on any two non-primary key transfer rely absent
ER model
Entity - Relationship Model
SQL server 2008 Architecture
Including: database engine, Analysis services reporting services and intergration services
Books Online SQL server
We can help improve problem-solving skills
This is a kit that includes all aspects of development; equivalent to Chinese Dictionary;
Five different roles written for the crowd: Structure and Design, administrators, developers, information workers and analysts.
SQL server configuration manager
BIDS: Business intelligence development studio Business Intelligence project development environment
For the analysis service, integration service, reporting service to help, such as some templates.
Composition Database
table
view
Stored Procedures
trigger
Purpose and Role
Other portions of the database
Create a database
Use management tools or by using T-SQL statement
Create database database_name
[
On[primary]
[name = logical_name, filename='path' [,size=database_size][,maxsize=database_maxsize] [,filegrowth=growth_increment]
]
查看数据库状态
1.使用目录视图
2.使用函数
SELECT DATABASEPROPERTYEX(‘教务管理系统’,version)
3.使用系统存储过程
Sp_helpdb
能够查看数据库所有信息
修改数据库
1.修改名称
重命名 或者 属性-文件-该名称 或者 ALTER DATABASE 原有名称 MODIFY NAME = 现有名称
2.修改大小
添加一个新的文件或者修改初始大小,在属性--文件里
删除数据库
drop database -database name
分离和附加数据库
收缩数据库
放到数据库处,右击-任务-收缩-数据库或文件
数据库快照
优点
维护历史数据生成报表
将查询实施在数据库的快照上,释放主体资源
加快恢复操作效率
限制
不能删除,分离或还原
源数据库的性能受到影响
不能从源数据库中或任何快照中删除文件
源数据库必须处于在线状态
创建数据库快照