【SQL】-- Chapter1 Introduction to Databases(数据库概述)

1.Introduction: Some Basic Concepts

2 File-Based Approach(基于文件的方法)

3 DB Approach

4 History of DBMSs

5  Advantages & Disadvantages of DBMS


【SQL】-- Chapter1 Introduction to Databases(数据库概述)_第1张图片

1.Introduction: Some Basic Concepts

  • Data: symbolic records of objective things(描述客观事物的符号记录)
  • DB: a collection of related data.
  • DBMS: a software that manages DB. 数据库管理系统(Database Management System)
  • DB app: a program that accesses DB.
  • DBS: a collection of DB apps 数据库系统(Database System).

【SQL】-- Chapter1 Introduction to Databases(数据库概述)_第2张图片

How to manage data involved in Apps?  There are 2 approaches: ① File-based approachDB approach

2 File-Based 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).           【SQL】-- Chapter1 Introduction to Databases(数据库概述)_第3张图片

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:

  • File  (文件)    A file is simply a collection of records (文件是记录的集合).
  • Record (记录) A record contains a logically connected set of fields (记录是逻辑上关联的字段构成的集合).
  • Fields   (字段、域)  A field represents a characteristic of the real-world object that is being modeled (字段是现实对象的一个特征).
  • Separation and isolation of data(数据不能共享)
    • Each program maintains its own set of data (每个程序拥有和维护自己的数据集).
  • Duplication of data(数据冗余)
    • Same data is held by different programs (不同的程序存储相同的数据).
    • Wasted space  & Potentially different values or formats for the same item (浪费空间; 会导致潜在的数据不一致)
  • Data dependence (数据不具独立性)
    • Definition of data was embedded in app programs, rather than being stored separately and independently (数据定义(文件结构)被嵌入到应用程序中, 而不是独立地分开存放: 文件系统方法缺陷的根源).

App programs cannot impose necessary controls over access and manipulation of data (文件系统中的程序无法实施必要的数据存取控制).   数据库方法(Database approach)可以很好地解决上述问题

3 DB 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 (为满足一个组织的信息需求而设计的逻辑相关的数据及其描述共享集合).

【SQL】-- Chapter1 Introduction to Databases(数据库概述)_第4张图片

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 is a distinct object (a person, place, thing, concept, or event) that is to be represented in the DB(是要在数据库中表示的可区分的对象).
  • An attribute is a property of an entity(实体的特性).
  • A relationship is an association between entities(实体间的关联).

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相同:自联系)

【SQL】-- Chapter1 Introduction to Databases(数据库概述)_第5张图片     【SQL】-- Chapter1 Introduction to Databases(数据库概述)_第6张图片

【SQL】-- Chapter1 Introduction to Databases(数据库概述)_第7张图片

如何画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(实现数据库定义创建维护存取控制的软件系统).

  • Hardware: range from a PC to a network of computers.
  • Software: DBMS, OS, network software and app programs
  • Data: describes information involved in business.
  • Procedures(规程)
    • Instructions and rules that should be applied to the design & use of the database and DBMS (设计和使用数据库和DBMS应遵守的指令规则).
  • People involved in DBMS Environment:
    • DA(数据管理员):规划管理数据资源的人
    • DBA(数据库管理员):设计实现运行DBS的负责人
    • Database Designers:逻辑数据库设计人员、物理
    • Application Programmers:编程实现所需功能的人
    • End Users(最终用户: DBS的使用者): naive users(普通用户)、sophisticated users (熟练用户).

4 History of DBMSs

【SQL】-- Chapter1 Introduction to Databases(数据库概述)_第8张图片

5  Advantages & Disadvantages of DBMS

1. Advantages of DBMSs (DBMS的优点)

  • 数据冗余度低、一致性高:数据集中管理降低了数据冗余、提高了数据一致性.
  • 数据共享:数据库可被所有合法用户共享.
  • 提供数据完整性安全性并发控制能力
  • 提供数据库备份恢复能力
  • 提供数据独立性,改善了维护能力

2. Disadvantages of DBMSs (DBMS的缺点)

  • 复杂软件规模大软件费用高、可能需要额外的硬件转换费用.
  • 性能问题:DBMS是为许多应用程序写的通用功能,一些应用程序的运行速度可能没有文件系统快.
  • 数据库失败的后果很严重:数据集中管理增加了系统的脆弱性:任何成分失效都会导致数据库不能使用.

 

你可能感兴趣的:(SQL)