database

letcure1

A glimpse!

定义

schemas(表头,模式) and instances

physical – logical – subschema

independence

structure

data models

关系型数据库

line tuple 一行 元组
column field 一列

E-R relationship model

Entities (objects) described by attributes
Relationships between entities

database language

DDL 数据定义语言 (表的定义)
DML 数据操纵语言 (数据的增删)
DCL 数据控制语言 (drop create table)

DDL

数据字典包含metadata :database schema ,storage structure,access methods,constraints,authorization,statistical inforXX

DML

增删改查 Procedural 包含如何查找 Non-XXX 只关注查找结果(ex:SQL)

结构化查询语言 SQL

user-administator与事务管理

lecture2 (chapter 2 :relational moodel)

relationship entities之间的联系
relation 数学上的关系?

what is relation

一个由N元组构成的集合
若干attribute(每个attribute在一定的domain上)组成的(domain包含null value 即空值)
第一范式 Attribute 的anomic属性 i.e. 不可再分
笛卡尔积

relation schema – virable type

r(R) r is an instance of schema R

tuple

  1. 乱序不重复
  2. tuple t[name]
  3. SuperKey 唯一区分元组的属性

KEY 相关

key
superkey
minimakey
primary key
foreign key 是另外一张表中的主键 会做检查 不能乱填