北邮国院–数据库系统笔记
创建日期:2024年2月29日
说明:更新到开学第一周内的全部内容。
1 Introduction
Data
Facts and analysis collected together for reference and analysis.
Database
A shared collection of logically related data (and a description of this data) designed to meet the information need of an organization.
DBMS
A software system that enables users to define, create, maintain, and control access to the database.
Database Schema
The description of the database.
Objectives of three level ANSI-SPARC architecture
Separate each user’s view of the database from way that database is physically represented.(还没太理解这句话的意思)
2 Relational Model and Relational Algebra
Relational Model
In a relational model, all the data is logically structured within relations.
Relation
A relation is a two-dimensional table arranged in columns and rows.
Attribute
An attribute is a named column of data.
Domain
A set of allowable values for one or more attributes.
Tuple
A tuple is a row of relation.
Degree
The number of attributes in a relation.
Cardinality
The number of tuples in a relation.
Relational Database
A collection of normalized(规范化的) relations with distinct relation name.
Candidate (Primary) Key
Selected to identify tuples uniquely within relation.
Foreign Key
Foreign key is an attribute or a set of attributes, within one relation that matches candidate(primary) key of another relation.
Relational Schema
A relation can be represented in the format: Relation name(attribute 1, attribute 2, …, attribute n)
Relational Algebra
Relational Algebra is formal language associated with relational model.
3 ER Modelling Students
Data Model
A data model is a graphical description of the components of database.
Composite Key
A candidate key that consists of two or more attributes.
Recursive Relationship
Relationship type where same entity type participates more than once in different roles.
Multiplicity
Main type of constraint on relationship is call multiplicity.