实验一

This commit is contained in:
2024-11-10 16:29:45 +08:00
parent 1e904f5a7b
commit c8a0bba472
10 changed files with 166 additions and 1 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
### 课程实验🧪
- ~~实验一 敬请期待~~
- [实验一](实验一.md)
- ~~实验二 敬请期待~~
Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

+165
View File
@@ -0,0 +1,165 @@
# 实验一🧪
## 题目一
### 原题
创建一个名称为`test1_学号`的数据库。该数据库的主数据文件逻辑名称为`test1_学号_order_dat`,物理文件名为`test1_学号_orderdat.mdf`,初始大小为`10MB`,最大尺寸为`50MB`,增量为`5MB`;数据库的事务日志文件逻辑名称为`test1_学号_order_log`,物理文件名为`test1_学号_orderlog.ldf`,初始大小为`5MB`,最大尺寸为`25MB`,增量为`5MB`。并且要求主数据文件和事务日志文件的物理位置在不同的硬盘上。
### 分析
创建数据库,名称:`test1_学号`
| | 主数据文件 | 事务日志文件 |
| ---------- | ------------------------- | ------------------------- |
| 逻辑名称 | `test1_学号_order_dat` | `test1_学号_order_log` |
| 物理文件名 | `test1_学号_orderdat.mdf` | `test1_学号_orderlog.ldf` |
| 初始大小 | `10MB` | `5MB` |
| 最大尺寸 | `50Mb` | `25MB` |
| 增量 | `5MB` | `5MB` |
### 实现
#### 1. 点击新建数据库
<img src="img/test1/1.1.1.png" alt="1.1.1.png" style="zoom:50%;" />
#### 2. 输入数据库名称
![1.2.1.png](img/test1/1.2.1.png)
#### 3. 设置文件属性
3.1 设置文件逻辑名称、初始大小、物理文件名
![1.3.1.png](img/test1/1.3.1.png)
3.2 设置最大大小和增量
- 设置主数据文件
<img src="img/test1/1.3.2.png" alt="1.3.2.png" style="zoom:50%;" />
- 设置事务日志文件
<img src="img/test1/1.3.2.2.png" alt="1.3.2.2.png" style="zoom:50%;" />
3.3 设置文件路径
- 设置主数据文件
<img src="img/test1/1.3.3.1.png" alt="1.3.3.1.png" style="zoom:50%;" />
- 设置事务日志文件
<img src="img/test1/1.3.3.2.png" alt="1.3.3.2.png" style="zoom:50%;" />
- ⚠注意:题目要求设置两个文件在不同盘符
#### 4. 点击`确定`创建
## 题目二
### 原题
创建一个指定多个数据文件和日志文件的数据库。该数据库名称为`test2_学号`,有1个`10MB`和1个`20MB``数据文件`和1个`10MB``事务日志文件`。数据文件逻辑名称为`test2_1_学号”和“test2_2_学号`,物理文件名为`test2_1_学号.mdf``test2_2_学号.ndf`。主文件是`test2_1_学号`,由primary指定,两个数据文件的最大尺寸分别为`无限大``100MB`,增长速度分别为`10%``1MB`。事务日志文件的逻辑名为`test2_log1`,物理文件名为`test2_log1.ldf`,最大尺寸均为`50MB`,文件增长速度为`1MB`
### 分析
<table>
<tr>
<td></td>
<td colspan="2"><center>数据文件</center></td>
<td><center>事务日志文件</center></td>
</tr>
<tr>
<td>逻辑名称</td>
<td>
<code>
test2_1_学号
</code>
</td>
<td>
<code>
test2_2_学号
</code>
</td>
<td>
<code>
test2_log1
</code>
</td>
</tr>
<tr>
<td>物理文件名</td>
<td>
<code>
test2_1_学号.mdf
</code>
</td>
<td>
<code>
test2_2_学号.ndf
</code>
</td>
<td>
<code>
test2_1_log1.ldf
</code>
</td>
</tr>
<tr>
<td>主文件</td>
<td>
<input type="checkbox" checked disabled>
</td>
<td>
<input type="checkbox" disabled>
</td>
<td>
<input type="checkbox" disabled>
</td>
</tr>
<tr>
<td>最大尺寸</td>
<td>
<code>
无限大
</code>
</td>
<td>
<code>
100MB
</code>
</td>
<td>
<code>
50MB
</code>
</td>
</tr>
<tr>
<td>增量</td>
<td>
<code>
10%
</code>
</td>
<td>
<code>
1MB
</code>
</td>
<td>
<code>
1MB
</code>
</td>
</tr>
</table>
### 实现
其他**略**,只介绍如何增加文件
![2.png](img/test1/2.png)