1.Introduction: Some Basic Concepts
2 File-Based Approach(基于文件的方法)
3 DB Approach
4 History of DBMSs
5 Advantages & Disadvantages of DBMS
How to manage data involved in Apps? There are 2 approaches: ① File-based approach ② DB approach
File-Based Approach:employ a file-based system to manage data.
file-based system: a collection of app programs that perform services for end users.(为最终用户提供服务的应用程序集)
Each program defines and manages its own data(file).
It were an early attempt to computerize the manual filing system (基于文件的系统是用计算机处理手工文件系统业务的最初尝试).
-----manual filing system-----
A file is set up to hold all related correspondence(将所有相关函件放在一起构成文件,用文件夹来保存).
It works well when the number of stored items is small, or we only store and retrieve them via item numbers(当所存数据项很少、或仅进行基于数据项编号的存储和检索时,手工文件系统工作得很好).
It breaks down when we have to cross-reference or process the info in the files (当需要对文件中的信息进行交叉索引、或交叉处理时,手工文件系统会失效)
----- Features: file-based system -----
It was developed for more efficient data access (为提高数据访问效率而开发).
It takes a decentralized approach, where each department stored and controlled its own data (采用数据分散存放策略,每个部门都存储和控制自己的数据).
Some terminologies(术语) used in file-based systems:
App programs cannot impose necessary controls over access and manipulation of data (文件系统中的程序无法实施必要的数据存取控制). 数据库方法(Database approach)可以很好地解决上述问题
3.1 The Database
Database: A shared collection of logically related data, and a description of this data, designed to meet the information needs of an organization (为满足一个组织的信息需求而设计的逻辑相关的数据及其描述的共享集合).
System catalog (metadata) 系统目录(元数据)
which provides description of data to enable program–data independence(数据独立性).
Logically related data means that an organization’s info is composed of entities(实体), attributes(属性), and relationships(联系).
An Entity-Relationship (ER) diagram is often used to describe entities, attributes, and relationships existing in an organization(常用ER图来描述一个组织涉及的实体、属性和联系).
两个实体集之间的联系有三类:一对一联系(1:1)、一对多联系(1:n)、多对多联系(m:n)
多个实体集之间的联系(多元联系)
同一实体集内各实体之间的联系(A和B相同:自联系)
如何画E-R图:我的另一篇博客
3.2 DBMS
DBMS: A software system that enables users to define, create, and maintain the database, and that provides controlled access to this database(实现数据库定义、创建、维护和存取控制的软件系统).
1. Advantages of DBMSs (DBMS的优点)
2. Disadvantages of DBMSs (DBMS的缺点)