数据库系统
提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档
这里写目录标题
数据库简介
前言
提示:以下是本篇文章正文内容,下面案例可供参考
Lecture1:数据库简介
示例:pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而创建的。
1、基于文件的系统
-
Def:==为终端用户提供服务的一组应用程序,==如生成报表等。每一组程序定义和管理它的数据。
-
局限性(limitations):
Big volume大容量
Concurrent Access并发存取
Data integrity issue
Program-data dependence
Ad-hoc queries are not welcome即席查询
Data security
Crash recovery数据被孤立和分离 数据存在冗余 数据存在依赖性 文件格式不相容 查询一成不变/应用程序需要不断翻新
2、数据库
1) 数据库方法:
被提出的原因:
- Definition of data was embedded in application programs, rather than being stored separately and independently.
数据的定义被嵌入到应用程序当中,而不是分开和独立控制 - No control over access and manipulation of data beyond that imposed by application program.
除了应用程序规定之外的那些数据访问和操作无法得到控制
2)数据库DB:
DEF:数据库是长期存储在计算机内、有组织的、可共享的大量数据的集合。
数据库特点
-
shared collection of Logically related data(and a description of this data),designed to meet the information needs of an organization.
-
System catalog(metadata) provides description of data to enable program-data independence.
元数据提供对数据的自描述,使得程序-数据独立 -
Logically related data comprises entities, attributes and relationships of an organization’s information.
逻辑相关数据包括组织信息的实体、属性和关系。
-entity(实体):是组织中一个独立的、将要在数据库中体现出来的对象(人、地点、东西、概念或事件)
-attribute(属性):描述我们要记录的对象的某一方面的特性
-relationship(关系):描述实体之间的联系
数据库优点
- Data independence
数据独立性 - Efficient data access
高效数据存取 - Data ingtegrity (consistency) and security
数据完整性和安全性 - Redundancy management
冗余管理 - Concurrent access and Crash recovery
并发存取和故障修复 - Reduced application development time
减少开发时间 - Presistent storage
永久存储
3、数据库管理系统
DBMS定义
A software system that enable users to define, create, maintain, and control access to the databases.
一个支持用户对数据进行定义、创建、维护和控制访问的控制系统
4、DBMS的主要功能
- 数据定义:提供数据定义语言(Data Definition Language, DDL) , 用于定义数据库中的数据对象和它们的结构
- 数据操纵:提供数据操作语言(Data Manipulation Language, DML),用于操作数据:插入、更新、删除和检索数据
- 提供对数据库的受控访问 ,例如:
- a security system(安全系统):禁止未授权的用户访问
- an integrity system(完整的系统):保持所存储数据的一致性
- a concurency control system(并发控制系统):允许数据库的共享访问
- a recovery control system(恢复控制系统):能够将数据库回复到出现软硬件故障之前的某一个状态
- a user-accessible catalog(用户可访问的目录):该目录描述了数据库中所存储的数据
5、DBMS的优缺点
6、视图
1)视图机制:
DEF:允许每一位用户对数据有其自己的视图(一个views相当于是DB一个子集)
2) 优点
- Reduce Complexity
- Provide a level of security
- Provide a mechanism to customize the appearance of the database
- Present a consistent, unchanging picture of the structure of the database, even if the underlying database is changed.
总结
提示:这里对文章进行总结: